Archive for May, 2008

OpenBD + Tomcat Example Setup

May 7, 2008

This is how I’ve setup OpenBD on Tomcat to easily upgrade when a new version is released, AND to eliminate the need of having the OpenBD runtime inside every webapp.

I’m using Tomcat 6.x but I imagine this applies to jetty etc. as well with a little tweaking.

It’s not battle tested in any way, And I’m sure there are gotchas to this approach, but it have worked so far (approx. 5 hrs)…

I have not needed /bluedragon/jars + /bluedragon/scripts yet, so they are not mapped or linked.

1. Download the openbluedragon.war distro.

2. Unzip the WAR package to your directory of choice, for simplicity let’s make this /path/to/openbd/

3. In /tomcat/conf/catalina.properties, make sure the OpenBD libs are available to the shared class loader (and therefore all apps) in Tomcat, like this:

shared.loader=/path/to/openbd/WEB-INF/lib/*.jar

4. Copy both /path/to/openbd/WEB-INF/web.xml and /path/to/openbd/WEB-INF/bluedragon/bluedragon.xml to yourwebapp/WEB-INF/

5. Change the attribute BLUEDRAGON_XML in web.xml to /WEB-INF/bluedragon.xml

That’s it. You now have a centralized place for OpenBD runtime files, and full config options pr. webapp. Also, when a new version arrives, just unzip (explode) .war file to /path/to/openbd/ and you are good to go :)

Gotchas

May 7, 2008

This is just a random collection of gotchas and other stuff I stumble over trying to port my apps from CF to OpenBD.

CFFTP: The attribute connection must be a valid variable name. In CF a connection named “123abc” is valid, in OpenBD it’s not.

cffunction: When the returntype is set to date OpenBD always returns a date object, but in CF you can return an integer, like the epoch.

Hello world!

May 7, 2008

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!