$URL: svn+ssh://christianc@svn.forge.objectweb.org/svnroot/barracudamvc/Barracuda2/trunk/WEB-INF/src_docs/getting_started/using_barracuda.html $ - $Revision: 141 $
Put all your content below this line

Using Barracuda

There are two ways to use Barracuda:

1. Using Barracuda within your webapp

If you just want to use Barracuda within your webapp, all you need to do is copy the appropriate jars into your webapp (and possibly your appserver). While there are a number of possibilities (and the details may vary depending on you appserver), here's a typical setup for Tomcat 4.x/5.x:
 

First, run ant jars.master to generate a single unified barracuda.jar (or download it from the latest binary release). Next, put the following jars in these locations:

2. Installing the Barracuda project locally

If you want to actually install the Barracuda project locally (to run the samples, see the Barracuda docs, etc), you will need to get Barracuda, compile it, and then setup your local appserver (eg. Tomcat 5.x) to point to the /Barracuda2 root directory. There are several ways to do this.

OPT 1 - it may be easiest to go to <CATALINA_HOME>\conf\Catalina\localhost and create a Barracuda.xml that looks something like this:

<Context docBase="D:/svnroot/Barracuda2" path="/Barracuda">
</Context>

Now all you have to do is cycle Tomcat and Barracuda should automatically be running as a webapp. You should be able to see it listed through the Tomcat admin interface, and you should be able to access it at http://localhost:8080/Barracuda/.

Note: if you are using Tomcat 4.1, the directory will be CATALINA_HOME/webapps

OPT 2 - alternately, you may generate a .war file using "ant war" and copy the .war file into the directories specified above in the first option

OPT 3 - use the Catalina Ant manager tasks which use the Ant build to deploy Barracuda. This involves a number of initial steps to set up, but is recommended because it makes things much more flexible and convenient...

  1. configure manager application access
  2. create a file called ".build.properties" in USER_HOME. For example, here is my path to USER_HOME under Win2k: "C:\Documents and Settings\jkjome". Note that under Windows, you will have to use the command line to create this file because Windows Explorer won't allow the creation of files prefixed with non-alphnumeric characters. This file will override Barracuda's local Barracuda/src/build.properties file when running Ant. Add the username/password combo you configured in the last step to the properties "manager.username" and "manager.password", respectively, in the ".build.properties" file.
  3. Make sure Tomcat has been restarted since the time your performed step #1

You can now cd to Barracuda/WEB-INF/bin and type "ant catalina-install". This will install the Barracuda webapp into Tomcat's memory. Access it at http://localhost:8080/Barracuda. You can access the GUI for the manager app by visiting http://localhost:8080/manager/html/list

There are actually a few ways to install/deploy Barracuda to Tomcat as well as manipulate the running context and query it for information. Certain tasks are paired and shouldn't be intermixed (catalina-install/catalina-remove and catalina-deploy/catalina-undeploy). Here are the Catalina Ant Manager targets (named for their tasks) and descriptions of their functionality...

Also available are a few convenience targets...

For more information, see the Manager app howto and the HTML Manager app howto. Additionally, see the Barracuda contrib package howto for information about using the Catalina Ant Manager tasks in conjunction with the contrib apps, making them a cinch to install/deploy under Tomcat.

 


Put all your content above this linee

$Date: 2006-01-23 11:02:29 -0500 (Mon, 23 Jan 2006) $