Posted by
David E Jones-2 on
Nov 02, 2006; 3:30am
URL: http://ofbiz.116.s1.nabble.com/db2-express-c-and-ofbiz-tp142441p142458.html
On Nov 1, 2006, at 3:16 PM, Jason Lane wrote:
> I have just started looking at the OFBiz project as a replacement
> (or complimentary offering) for some other eCommerce solutions that
> we currently offer to our customers. My goal is to take the OFBiz
> project and getit up and running on some of the open source
> solutions that are the entry points for our higher end options to
> our customers (We offer higher end DB2 and WebSphere deployments
> currently, so I want to base OFBiz on DB2 Express-C and Websphere
> Community Edition, AKA geronimo).
>
> I have managed to get OFBiz up and running fine with Derby and the
> embedded jetty/geronimo app server, and now I want to move over to
> db2 and Websphere CE. So I have two issues/questions:
>
> 1) The out of the box ant script that seeds the database fails due
> to the name of the primary keys on many of the tables that it tries
> to create. DB2 only allows 18 chars and so it fails. I saw a few
> pages in a google search I did that talked about this being a
> problem, but I did not see a solution and some of those posts were
> from 2002. Has anyone managed a work around for this? If not, I
> guess I will have to start modifying the scripts to shorten the
> primary key names and just assume that it won't be an issue as long
> as the tables exist (meaning the code is not referencing those PK
> names directly).
There is an attribute on the datasource element in the
entityengine.xml file called "constraint-name-clip-length" that
defaults to 30. If you set this to 18 it will automatically shorten
the names. The trick is that the names may conflict at this point,
unless DB2 does something helpful (most databases don't) and only
requires constraint names to be locally unique, like relative to a
table name or something. Anyway, you can try this and you'll see if
it works pretty quickly...
> 2) Has anyone done any work on getting OFBiz to work under
> WebSphere CE or WebSphere in general? I have not looked at depth
> into the layout of all the pieces of the project, but I was
> planning on trying to migrate the layout into a standard EAR
> structure (based on Websphere base practices for file and directory
> locations, etc). The goal would be to create an EAR that could be
> deployed to WebSphere CE but would just as easily be deployed to a
> full WebSphere server.
You could certainly try this. The main requirements for deploying
OFBiz are:
1. JTA transaction manager (usually through JNDI)
2. JDBC datasource with connection pool (usually through JNDI)
3. mount a whole bunch of webapps
4. have a bunch of classpath resources that are shared between the
webapps
The trick is #4. The EAR standard has nothing to add resources to the
classpath that are shared between webapps, and that is required for
certain parts of OFBiz. Certain app servers have proprietary
extensions that allow you to do this (like Weblogic, for instance),
but I don't know about Websphere or the IBM Geronimo variant.
-David