Re: Multi-module applications in Wicket
What you call modules really sounds like different web applications (in the java servlet sense). Is there a reason you cannot have multiple WARs? Thomas On Sun, Feb 1, 2009 at 2:09 PM, Daniel Lipski daniel.lipski...@gmail.comwrote: Hi Im working on web application divided into multiple 'modules' and Im wondering how to use Wicket in such scenario. Because 'module' means a lot, I'll specify what I would like to achive: 1)diffrent home pages for each module 2)diffrent session classes for each module (WebApplication.newSession) 3)diffrent authentications (ie. module A - SSO, module B - web form) I can imagine two approaches: 1)one Wicket application 'handling' both modules.But...: -because there is one appication I'll have to check logged user in WebApplication.newSession WebApplication.getHomePage and return proper session object/home page class. Decision is taken on logged user, so in that methods Ill have to know which user has logged in. Is it possible to check logged user in this methods ? (arent they called before authentication ?) The other way is to make a decission not on logged user but on accessed Page (all pages in moduleA inherit from ModuleAWebPage and pages in moduleB inherit from ModuleBWebPage). But I doubt if requested page is avaliable in this two methods... -module A uses SSO to authenticate user, module B uses usual page, where should I choose how to authenticate user ? Which authenticating framework should I choose for this purpose ? (auth-roles, WASP ?) 2)Two Wicket applications each 'handling' one module. Because there are two WebApplications there is no problem with determinig which session object/home page class return. There is no problem with diffrent authentications either. But...: -Is it possible ? Can I map WicketFilter few times in web.xml ? I know that Wicket does a lots internal and I dont know if multiple Wicket 'instances' can be run in one classloader. Are there any caveats/limitations when multiple Wicket instances work in parell (does Application.get() or other static methods still work - I saw that they are implemened with ThreadLocal but ...?) -How running multiple Wicket instances influences session size and other resources ? -Ther is a lot of settings (DI, mounting startegies, 'global' converters, global resources) that need to be shared beetweend this two modules. For majority of them I can make super class for both ModuleAWebApplication and ModuleBWebApplication and put common code there, but does moduleA can access shared by moduleB resources ? -It looks a little bit strange for me to create diffrent Wicket Web applications for each module. From the 'outside'(servlet container) its still one apllication (one war) so there is a little mismatch. Of course this is the least siginificant reason but I would like to use proper solutions rather then stretch the wrong one. For now Im closer to solution 2), but I worry about things which I havnt foreseen. Maybe there is general rule/pattern/solution for writing multi-module web applciaions ? Im sure its common issue and many of you could share some experience. Thanks for any help. Regards Daniel -- View this message in context: http://www.nabble.com/Multi-module-applications-in-Wicket-tp21774998p21774998.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Thomas Mäder www.devotek-it.ch
Re: Multi-module applications in Wicket
Thanks for your help. I havnt tried this yet becaouse this involves some refactoring and I wanted to be sure that I'll choose correct solution. Daniel Stoch-2 wrote: No, I don't say you need OSGi container, but in more complex environments it may be helpful. Of course you can, as you wrote, map WicketFilter multiple times and this should work - why you didn't try this yet? :) -- Daniel On Mon, Feb 2, 2009 at 12:03 PM, Daniel Lipski daniel.lipski...@gmail.com wrote: Do I really need OSGi container ?(OSGi is great idea, but I would like to keep this simple) Why I cant just map WicketFilter multiple times ? I would like to stay with one war deployed on Tomcat container. Daniel Stoch-2 wrote: Maybe you should look at OSGi? Then each of your application can be defined inside a different bundle and runs on the same JVM. We are using such approach in our environment and it works very well. A small downside of such solution is that you have to learn what is it and how to use OSGi (unless you already know it ;)). -- Daniel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Multi-module-applications-in-Wicket-tp21774998p21788104.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Multi-module applications in Wicket
I've had your exact use case a few month ago. I did just what you propose : One War and multiple filter mappings pointing to a different Wicket Application in the same web.xml. Works like a charm ! You still get a separate session for each application, but reuse the same underneath layers... and even your standard homegrown wicket components spread around your applications. Hope this help, Cheers, Antoine. Daniel Lipski wrote: Do I really need OSGi container ?(OSGi is great idea, but I would like to keep this simple) Why I cant just map WicketFilter multiple times ? I would like to stay with one war deployed on Tomcat container. Daniel Stoch-2 wrote: Maybe you should look at OSGi? Then each of your application can be defined inside a different bundle and runs on the same JVM. We are using such approach in our environment and it works very well. A small downside of such solution is that you have to learn what is it and how to use OSGi (unless you already know it ;)). -- Daniel On Mon, Feb 2, 2009 at 10:39 AM, Daniel Lipski daniel.lipski...@gmail.com wrote: yes, they use the same service layer and the same caches. Whats more its easier to deploy build one war insted of many. Does your question suggests that there are problems with few Wicket filters in one webapp ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Antoine Angénieux Associé Clinigrid 5, avenue Mozart 75016 Paris, France +336 60 21 09 18 aangeni...@clinigrid.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Multi-module applications in Wicket
Do I really need OSGi container ?(OSGi is great idea, but I would like to keep this simple) Why I cant just map WicketFilter multiple times ? I would like to stay with one war deployed on Tomcat container. Daniel Stoch-2 wrote: Maybe you should look at OSGi? Then each of your application can be defined inside a different bundle and runs on the same JVM. We are using such approach in our environment and it works very well. A small downside of such solution is that you have to learn what is it and how to use OSGi (unless you already know it ;)). -- Daniel On Mon, Feb 2, 2009 at 10:39 AM, Daniel Lipski daniel.lipski...@gmail.com wrote: yes, they use the same service layer and the same caches. Whats more its easier to deploy build one war insted of many. Does your question suggests that there are problems with few Wicket filters in one webapp ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Multi-module-applications-in-Wicket-tp21774998p21787722.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Multi-module applications in Wicket
Maybe you should look at OSGi? Then each of your application can be defined inside a different bundle and runs on the same JVM. We are using such approach in our environment and it works very well. A small downside of such solution is that you have to learn what is it and how to use OSGi (unless you already know it ;)). -- Daniel On Mon, Feb 2, 2009 at 10:39 AM, Daniel Lipski daniel.lipski...@gmail.com wrote: yes, they use the same service layer and the same caches. Whats more its easier to deploy build one war insted of many. Does your question suggests that there are problems with few Wicket filters in one webapp ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Multi-module applications in Wicket
yes, they use the same service layer and the same caches. Whats more its easier to deploy build one war insted of many. Does your question suggests that there are problems with few Wicket filters in one webapp ? Thomas Mäder wrote: What you call modules really sounds like different web applications (in the java servlet sense). Is there a reason you cannot have multiple WARs? Thomas On Sun, Feb 1, 2009 at 2:09 PM, Daniel Lipski daniel.lipski...@gmail.comwrote: Hi Im working on web application divided into multiple 'modules' and Im wondering how to use Wicket in such scenario. Because 'module' means a lot, I'll specify what I would like to achive: 1)diffrent home pages for each module 2)diffrent session classes for each module (WebApplication.newSession) 3)diffrent authentications (ie. module A - SSO, module B - web form) I can imagine two approaches: 1)one Wicket application 'handling' both modules.But...: -because there is one appication I'll have to check logged user in WebApplication.newSession WebApplication.getHomePage and return proper session object/home page class. Decision is taken on logged user, so in that methods Ill have to know which user has logged in. Is it possible to check logged user in this methods ? (arent they called before authentication ?) The other way is to make a decission not on logged user but on accessed Page (all pages in moduleA inherit from ModuleAWebPage and pages in moduleB inherit from ModuleBWebPage). But I doubt if requested page is avaliable in this two methods... -module A uses SSO to authenticate user, module B uses usual page, where should I choose how to authenticate user ? Which authenticating framework should I choose for this purpose ? (auth-roles, WASP ?) 2)Two Wicket applications each 'handling' one module. Because there are two WebApplications there is no problem with determinig which session object/home page class return. There is no problem with diffrent authentications either. But...: -Is it possible ? Can I map WicketFilter few times in web.xml ? I know that Wicket does a lots internal and I dont know if multiple Wicket 'instances' can be run in one classloader. Are there any caveats/limitations when multiple Wicket instances work in parell (does Application.get() or other static methods still work - I saw that they are implemened with ThreadLocal but ...?) -How running multiple Wicket instances influences session size and other resources ? -Ther is a lot of settings (DI, mounting startegies, 'global' converters, global resources) that need to be shared beetweend this two modules. For majority of them I can make super class for both ModuleAWebApplication and ModuleBWebApplication and put common code there, but does moduleA can access shared by moduleB resources ? -It looks a little bit strange for me to create diffrent Wicket Web applications for each module. From the 'outside'(servlet container) its still one apllication (one war) so there is a little mismatch. Of course this is the least siginificant reason but I would like to use proper solutions rather then stretch the wrong one. For now Im closer to solution 2), but I worry about things which I havnt foreseen. Maybe there is general rule/pattern/solution for writing multi-module web applciaions ? Im sure its common issue and many of you could share some experience. Thanks for any help. Regards Daniel -- View this message in context: http://www.nabble.com/Multi-module-applications-in-Wicket-tp21774998p21774998.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Thomas Mäder www.devotek-it.ch -- View this message in context: http://www.nabble.com/Multi-module-applications-in-Wicket-tp21774998p21786663.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Multi-module applications in Wicket
No, I don't say you need OSGi container, but in more complex environments it may be helpful. Of course you can, as you wrote, map WicketFilter multiple times and this should work - why you didn't try this yet? :) -- Daniel On Mon, Feb 2, 2009 at 12:03 PM, Daniel Lipski daniel.lipski...@gmail.com wrote: Do I really need OSGi container ?(OSGi is great idea, but I would like to keep this simple) Why I cant just map WicketFilter multiple times ? I would like to stay with one war deployed on Tomcat container. Daniel Stoch-2 wrote: Maybe you should look at OSGi? Then each of your application can be defined inside a different bundle and runs on the same JVM. We are using such approach in our environment and it works very well. A small downside of such solution is that you have to learn what is it and how to use OSGi (unless you already know it ;)). -- Daniel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Multi-module applications in Wicket
Hi Im working on web application divided into multiple 'modules' and Im wondering how to use Wicket in such scenario. Because 'module' means a lot, I'll specify what I would like to achive: 1)diffrent home pages for each module 2)diffrent session classes for each module (WebApplication.newSession) 3)diffrent authentications (ie. module A - SSO, module B - web form) I can imagine two approaches: 1)one Wicket application 'handling' both modules.But...: -because there is one appication I'll have to check logged user in WebApplication.newSession WebApplication.getHomePage and return proper session object/home page class. Decision is taken on logged user, so in that methods Ill have to know which user has logged in. Is it possible to check logged user in this methods ? (arent they called before authentication ?) The other way is to make a decission not on logged user but on accessed Page (all pages in moduleA inherit from ModuleAWebPage and pages in moduleB inherit from ModuleBWebPage). But I doubt if requested page is avaliable in this two methods... -module A uses SSO to authenticate user, module B uses usual page, where should I choose how to authenticate user ? Which authenticating framework should I choose for this purpose ? (auth-roles, WASP ?) 2)Two Wicket applications each 'handling' one module. Because there are two WebApplications there is no problem with determinig which session object/home page class return. There is no problem with diffrent authentications either. But...: -Is it possible ? Can I map WicketFilter few times in web.xml ? I know that Wicket does a lots internal and I dont know if multiple Wicket 'instances' can be run in one classloader. Are there any caveats/limitations when multiple Wicket instances work in parell (does Application.get() or other static methods still work - I saw that they are implemened with ThreadLocal but ...?) -How running multiple Wicket instances influences session size and other resources ? -Ther is a lot of settings (DI, mounting startegies, 'global' converters, global resources) that need to be shared beetweend this two modules. For majority of them I can make super class for both ModuleAWebApplication and ModuleBWebApplication and put common code there, but does moduleA can access shared by moduleB resources ? -It looks a little bit strange for me to create diffrent Wicket Web applications for each module. From the 'outside'(servlet container) its still one apllication (one war) so there is a little mismatch. Of course this is the least siginificant reason but I would like to use proper solutions rather then stretch the wrong one. For now Im closer to solution 2), but I worry about things which I havnt foreseen. Maybe there is general rule/pattern/solution for writing multi-module web applciaions ? Im sure its common issue and many of you could share some experience. Thanks for any help. Regards Daniel -- View this message in context: http://www.nabble.com/Multi-module-applications-in-Wicket-tp21774998p21774998.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org