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.com>wrote: > > 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