logo       

Related Msgs: audio.musicbrai...    enbd.general/20...    ietf.idr/2002-0...    java.ant-contri...    gnu.make.genera...    qplus.devel/200...    video.freevo.cv...    os.netbsd.ports...    yellowdog.gener...    xfree86.cvs/200...    search.nutch.us...    freedesktop.xse...    programming.swi...    capabilities.ge...    telephony.pbx.a...    mail.sylpheed.c...    db.firebase.por...    boot-loaders.u-...    recreation.radi...    netbsd.bugs/200...    web.zope.plone....    user-groups.lin...   

Re: Config is a singleton: msg#00123

Subject: Re: Config is a singleton
Ronald van Kuijk wrote:

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
thanks for the insight. yep, would be good to mention that somewhere in the docs. - sigh, so much work, so little time ;)

Joern


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
_______________________________________________
Chiba-developer mailing list
Chiba-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@xxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/chiba-developer




-------------------------------------------------------
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 ...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Home | blog view | USPTO Patent Archive (NEW!) | advertise | OSDir is an inevitable website. super tiny logo