joern turner wrote:
Ronald van Kuijk wrote:
Flavio Costa wrote:
as far as i'm informed tomcat separates those instances in its own
classloaders so it should be possible to have different config
instances
- correct me, if i'm wrong.
As Tomcat organizes its classloaders, if you place Chiba jar in
common/lib or shared/lib, probably there will be only one instance. If
placed in WEB-INF/lib, one instance will be created for every
application (context).
This is true for standalone tomcat. With tomcat embedded in JBoss,
the default is the flat classloader of JBoss. This means that
although it's put in WEB-INF/lib, it's shared by all apps. It's the
same then as putting it in common/lib or shared/lib
really? isn't this a violation of the servlet spec? do you think we
have to react on this or is there a way to overwrite this default in
JBoss?
Joern
Yes it's violating the specs, but on purpose. Many jboss customers
prefere this, since you do not have t o deploy stubs/skeletons for ejb's
if the have to be shared across multiple ear files. You also get the
additional bonus that all calls can between code in a war and ejb's in
separate jar file (so not in the same ear) to be local in stead of remote.
You can override this, either for the complete server, or per war/ear
file. There can be all kinds of classcast errors or duplicate class
errors found because of this. If you know how to take advantage of it,
it's real great. And it's called a unified classloader instead of a flat
classloader, mea culpa.
See http://heanet.dl.sourceforge.net/sourceforge/jboss/ClassLoading.pdf,
page 20 and beyond (according to acrobat, page 60 on the 'sheets')
I think there should/could be a releasenote or something that indicates
the problem when you try to use multiple chiba instances with different
config files on a default jboss server
Ronald
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|