You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Илья Нарыжный <ph...@ydn.ru> on 2012/06/12 20:53:10 UTC
Wicket as Jboss Modules
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket as Jboss Modules
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
Well done!
Let us know if there are any problems with this shared usage.
On Thu, Jun 14, 2012 at 4:57 AM, Илья Нарыжный <ph...@ydn.ru> wrote:
> Finally I did it!
> As jboss module I created 2 modules: wicket and wicketstuff. Configuration:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <module xmlns="urn:jboss:module:1.0" name="org.apache.wicket">
> <resources>
> <resource-root path="wicket-core-1.5.7.jar"/>
> <resource-root path="wicket-request-1.5.7.jar"/>
> <resource-root path="wicket-auth-roles-1.5.7.jar"/>
> <resource-root path="wicket-extensions-1.5.7.jar"/>
> <resource-root path="wicket-datetime-1.5.7.jar"/>
> <resource-root path="wicket-util-1.5.7.jar"/>
> </resources>
> <dependencies>
> <module name="org.apache.commons.collections"/>
> <module name="javaee.api"/>
> <module name="org.jboss.logging"/>
> <module name="org.jboss.as.web"/>
> <module name="org.slf4j"/>
> </dependencies>
> </module>
>
> and
>
> <?xml version="1.0" encoding="UTF-8"?>
> <module xmlns="urn:jboss:module:1.0" name="org.wicketstuff">
> <resources>
> <resource-root path="wicketstuff-autocomplete-tagit-1.5.5.jar"/>
> <resource-root path="wicketstuff-tinymce-1.5.5.jar"/>
> <resource-root path="jazzy-0.5.2-rtext-1.4.1.jar"/>
> </resources>
> <dependencies>
> <module name="org.apache.commons.collections"/>
> <module name="org.apache.wicket"/>
> <module name="org.slf4j"/>
> <!--<module name="org.springframework" export="true"/>-->
> </dependencies>
> </module>
>
> But I found that wicketstuff-anotation can't be organized as a module
> because in class org.wicketstuff.config.MatchingResources in method
> getClass page class is constructed in current classloader. I would
> like to recommend to rewrite this class in a way when classloader for
> corresponding initial application is used.
File an issue in WicketStuff issue tracker. Send a Pull Request with
the fix too ;-)
>
> Thanks,
>
> Ilia
>
> 2012/6/13 Martin Grigorov <mg...@apache.org>:
>> Good point!
>> https://issues.apache.org/jira/browse/WICKET-4604
>>
>> On Wed, Jun 13, 2012 at 9:31 AM, Igor Vaynberg <ig...@gmail.com> wrote:
>>> we have to be sure we do not use any static fields anywhere in the
>>> code...it's not just the singletons that break this use case. eg we do not
>>> want caches to be shared across applications because it's not performant
>>> and can result in cross application object leakage.
>>>
>>> -igor
>>>
>>> On Tuesday, June 12, 2012, Martin Grigorov wrote:
>>>
>>>> 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.martin@gmail.com<javascript:;>>
>>>> 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-unsubscribe@wicket.apache.org<javascript:;>
>>>> >> For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
>>>> >>
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org<javascript:;>
>>>> > For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
>>>> >
>>>>
>>>>
>>>>
>>>> --
>>>> Martin Grigorov
>>>> jWeekend
>>>> Training, Consulting, Development
>>>> http://jWeekend.com
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org <javascript:;>
>>>> For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
>>>>
>>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket as Jboss Modules
Posted by Илья Нарыжный <ph...@ydn.ru>.
Finally I did it!
As jboss module I created 2 modules: wicket and wicketstuff. Configuration:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.apache.wicket">
<resources>
<resource-root path="wicket-core-1.5.7.jar"/>
<resource-root path="wicket-request-1.5.7.jar"/>
<resource-root path="wicket-auth-roles-1.5.7.jar"/>
<resource-root path="wicket-extensions-1.5.7.jar"/>
<resource-root path="wicket-datetime-1.5.7.jar"/>
<resource-root path="wicket-util-1.5.7.jar"/>
</resources>
<dependencies>
<module name="org.apache.commons.collections"/>
<module name="javaee.api"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.as.web"/>
<module name="org.slf4j"/>
</dependencies>
</module>
and
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.wicketstuff">
<resources>
<resource-root path="wicketstuff-autocomplete-tagit-1.5.5.jar"/>
<resource-root path="wicketstuff-tinymce-1.5.5.jar"/>
<resource-root path="jazzy-0.5.2-rtext-1.4.1.jar"/>
</resources>
<dependencies>
<module name="org.apache.commons.collections"/>
<module name="org.apache.wicket"/>
<module name="org.slf4j"/>
<!--<module name="org.springframework" export="true"/>-->
</dependencies>
</module>
But I found that wicketstuff-anotation can't be organized as a module
because in class org.wicketstuff.config.MatchingResources in method
getClass page class is constructed in current classloader. I would
like to recommend to rewrite this class in a way when classloader for
corresponding initial application is used.
Thanks,
Ilia
2012/6/13 Martin Grigorov <mg...@apache.org>:
> Good point!
> https://issues.apache.org/jira/browse/WICKET-4604
>
> On Wed, Jun 13, 2012 at 9:31 AM, Igor Vaynberg <ig...@gmail.com> wrote:
>> we have to be sure we do not use any static fields anywhere in the
>> code...it's not just the singletons that break this use case. eg we do not
>> want caches to be shared across applications because it's not performant
>> and can result in cross application object leakage.
>>
>> -igor
>>
>> On Tuesday, June 12, 2012, Martin Grigorov wrote:
>>
>>> 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.martin@gmail.com<javascript:;>>
>>> 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-unsubscribe@wicket.apache.org<javascript:;>
>>> >> For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org<javascript:;>
>>> > For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
>>> >
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org <javascript:;>
>>> For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
>>>
>>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket as Jboss Modules
Posted by Martin Grigorov <mg...@apache.org>.
Good point!
https://issues.apache.org/jira/browse/WICKET-4604
On Wed, Jun 13, 2012 at 9:31 AM, Igor Vaynberg <ig...@gmail.com> wrote:
> we have to be sure we do not use any static fields anywhere in the
> code...it's not just the singletons that break this use case. eg we do not
> want caches to be shared across applications because it's not performant
> and can result in cross application object leakage.
>
> -igor
>
> On Tuesday, June 12, 2012, Martin Grigorov wrote:
>
>> 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.martin@gmail.com<javascript:;>>
>> 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-unsubscribe@wicket.apache.org<javascript:;>
>> >> For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org<javascript:;>
>> > For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org <javascript:;>
>> For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
>>
>>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket as Jboss Modules
Posted by Igor Vaynberg <ig...@gmail.com>.
we have to be sure we do not use any static fields anywhere in the
code...it's not just the singletons that break this use case. eg we do not
want caches to be shared across applications because it's not performant
and can result in cross application object leakage.
-igor
On Tuesday, June 12, 2012, Martin Grigorov wrote:
> 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.martin@gmail.com<javascript:;>>
> 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-unsubscribe@wicket.apache.org<javascript:;>
> >> For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
> >>
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org<javascript:;>
> > For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org <javascript:;>
> For additional commands, e-mail: users-help@wicket.apache.org<javascript:;>
>
>
Re: Wicket as Jboss Modules
Posted by Martin Funk <ma...@googlemail.com>.
Just read
SRV.9.7.1
Dependencies On Extensions
in the servlet 2.5 specs.
Obviously my assumption was wrong...
mf
2012/6/14 Martin Grigorov <mg...@apache.org>
> 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 <ma...@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 <mg...@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 <sa...@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-unsubscribe@wicket.apache.org
> >> >> For additional commands, e-mail: users-help@wicket.apache.org
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> > For additional commands, e-mail: users-help@wicket.apache.org
> >> >
> >>
> >>
> >>
> >> --
> >> Martin Grigorov
> >> jWeekend
> >> Training, Consulting, Development
> >> http://jWeekend.com
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Wicket as Jboss Modules
Posted by Martin Grigorov <mg...@apache.org>.
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 <ma...@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 <mg...@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 <sa...@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-unsubscribe@wicket.apache.org
>> >> For additional commands, e-mail: users-help@wicket.apache.org
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket as Jboss Modules
Posted by Martin Funk <ma...@googlemail.com>.
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 <mg...@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 <sa...@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-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Wicket as Jboss Modules
Posted by Martin Grigorov <mg...@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 <sa...@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-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket as Jboss Modules
Posted by Martin Sachs <sa...@gmail.com>.
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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org