On 4/4/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
> I've never used J2EE packaging of WO apps, so I am not sure how its
> class loading works internally, but I would expect WO to "flatten"
> all resources into the container application ClassLoader.
From what I can tell, it copies all of the jar files out of
Library/Frameworks/*.framework/Resources/Java/*.jar into WEB-INF/lib.
So I'd be very surprised if it added a jar file in
*.woa/Contents/Resources/Java/*.jar to the classpath! On the other
hand, my application was written under 5.0, and failing to find a
clean upgrade path, I build a new WO 5.2.4 project, and manually
merged my 5.0 project into it, so my project might not be "standard".
Wonder, in short, I recommend
a) copying your cayenne.xml files into the top level of your
WEB-INF/classes directory.
b) test it to make sure they're found.
c) Then try moving them into a package under classes (ie,
com.xyz.cayenne.model/*.xml)
d) Add the package classpath to the configuration:
DefaultConfiguration conf = new DefaultConfiguration();
conf.addClassPath("com/xyz/cayenne/model");
Configuration.initializeSharedConfiguration(conf);
e) test to make sure they're found.
This archive was generated by hypermail 2.0.0 : Tue Apr 04 2006 - 10:54:00 EDT