The classes are shared, not the instances. The same classloader loads JBoss' modules for all apps.
This is what Igor meant with 'static caches'. If you have a static field then it is also shared for all apps. On Thu, Jun 14, 2012 at 11:27 AM, Martin Funk <mafulaf...@googlemail.com> wrote: > given that I have not dug deep into the contract that JBoss promises for > jar Files in the <JBOSS_HOME>/modules folder, I'd still be > quite surprised that putting the jars into a shared folder would imply that > the class instances created from those jars would be shared between > applications on a single JBoss container. > > Isn't it the responsibility of the container to keep separate class > instances for each application it is running? > > mf > > 2012/6/13 Martin Grigorov <mgrigo...@apache.org> > >> Hi, >> >> Wicket uses ThreadLocal for the Application, Session and RequestCycle. >> There are no JVM singletons. >> >> Some people are against putting jars in the shared lib folder. I >> personally see the benefit and I'd do it if I need to >> If you use shared jars then make sure that none of the applications >> provide these jars or another version of them because in this case you >> will see some ClassLoader related problems, e.g.: ClassCastException: >> o.a.w.Session class is not o.a.w.Session. >> >> On Tue, Jun 12, 2012 at 11:04 PM, Martin Sachs <sachs.mar...@gmail.com> >> wrote: >> > Hello, >> > >> > i think that is in general not a good idea. If you deploy the wicket-lib >> > outside the war and run multiple Wicket-Applications, then you could not >> use >> > all applications, because wicket stores (as far as i know) e.g. the >> > application instance in a static field. There is one application per >> > WAR-deployment with wicket, but if you use the libs from ear/lib or >> modules >> > there will be only one application. >> > >> > best >> > Martin >> > >> > Илья Нарыжный schrieb: >> > >> >> Hello, >> >> >> >> I have several projects which use wicket and various wicket sun-modules. >> >> Every project (*.ear file) took about 10Mb and about 8Mb is for wicket >> >> libraries. >> >> Recently I have move my projects to Jboss AS 7 and now I'm thinking >> >> about putting all wicket related jars to <JBOSS_HOME>/modules. >> >> >> >> Have anyone tried that? Do you have some suggestions for Jboss module >> >> structure for this? >> >> It will be great to have >> >> >> >> IMPLICIT( >> https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments >> ) >> >> deploy of wicket related jars to the project. >> >> >> >> Thanks, >> >> >> >> Ilia >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >> >> >> >> >> > >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> > For additional commands, e-mail: users-h...@wicket.apache.org >> > >> >> >> >> -- >> Martin Grigorov >> jWeekend >> Training, Consulting, Development >> http://jWeekend.com >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org