Hi,
I have many web apps sharing the same cayenne/mapping objects. I want to
share my cayenne classes among these web apps. I have packaged the classes
successfully in a jar together with the cayenne.xml using a jndi data source
and the Map xml file. I have put this jar in the shared lib level of tomcat.
Now every web app deployed can use the mapping files without any cayenne
reference in its local WEB-INF lib. Super!
I can obviously even use
DataContext dataContext = ServletUtil.getSessionContext(session);
to bind the DataContext to the session.
I am a bit worried now - is it really this easy?
I have not configured a org.objectstyle.cayenne.conf.WebApplicationListener
in the web apps web.xml.
Is it only used for finding the cayenne.xml in the Web-INF scope? I have
packaged the cayenne.xml with the jar in the global scope of tomcat I
therefore would not need this discovery feature.
Or is this listener used to clean up the DataContexts attached to the web
apps session? Do I need this Listener? Will the DataContexts attached lto
the session via ServletUtil leak if I do not have the WebApplication
listener defined?
Is this setup save?
thanks a lot.
Tobias
This archive was generated by hypermail 2.0.0 : Mon Mar 15 2010 - 09:46:14 EDT