We have developed two applications. Both use OJB for persistence. When we deploy them together on Sun One Application server, we find the one deployed last doesn't work.[...]
By the way, we rebuild our applications as .WAR files, deployed them on Tomcat and found them to work fine.
WAR files deployed in Tomcat will run as two separate servlet instances with two separate class-loaders (loading OJB from each webapps WEB-INF/lib and/or WEB-INF/classes).
It looks like your deployment in Sun One Application Server loads OJB with the same class-loader, which will give you headaches if trying to use two different repository-mappings and/or different OJB.properties.
When OJB is first referenced it will bootstrap it's metadata manager and statically load OJB.properties, which in turn references the repository-files that are also loaded statically. I.e. "first application wins" in your scenario.
To overcome this you can either try to separate class-loading between your apps in Sun One or use OJB profiles to load the repository on a per-thread-basis at runtime.
For more on OJB profiles, see e.g.
http://nagoya.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=9705
In that mail I outline how we use OJB with an empty global (static) repository and load the correct class-descriptors from the thread that needs them.
With this pattern we can run a Cocoon-servlet in Tomcat, use only one OJB instance in cocoon/WEB-INF/lib, but still have multiple Cocoon "applications" in sub-sitemaps running with separate repository descriptors and class-mappings.
-- Martin Kal�n Curalia AB Web: http://www.curalia.se Orrspelsv�gen 2B Mail: [EMAIL PROTECTED] SE-182 79 Stocksund Tel: +46-8-410 064 40
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
