Bojan Kraut Messages: 22 Registered: July 2009 Location: Maribor
Junior Member
I'm new to OSGI and Snaps. I tried to implement modular web application some time ago, but I wanted a core module (platform) and application modules. Our application uses ExtJS, Hibernate, Spring, Spring Security etc...
When I saw Snaps I thought that this is what I need. I successfully implemented a test case but finished with a host module which has web.xml and an application module which has web.xml.
My question is - can I use host module as module, where I have Spring modules, security, JAWR etc and my snaps just have module specific classes and css and javascript files? I don't want to configure each module almost as an independent application. Can I see anywhere an example how to do that?
If snap is not the solution then how can I achieve that?
Chris Frost Messages: 222 Registered: January 2010 Location: Southampton, England
Senior Member
Hi,
A Snaps application has a single Servlet Context, the web.xml files are effectively merged in to a single application. Each Bundle/Snap will still have its own Bundle context though and Snaps manages the integration of all that.
I would expect your use case to be supported but I don't have any experience of what Spring is doing under the covers. I suspect this is where the problems are coming from. I would expect the host and every snap to have a web.xml but there shouldn't be any duplication between them.
If you are willing to submit your test case with a bug then we could have a look at what is going on.
Thanks, Chris.
------------------------------------------------
Chris Frost, Twitter @cgfrost
Springsource, a divison of VMware.
The project is organized as greenpages example, with a difference that I'm trying to use snaps to modularize my application horizontally not vertically as greenpages is.
I think that module should have all css, js, java contained.
In attached example core is a host and crm is a snap.
Bojan Kraut Messages: 22 Registered: July 2009 Location: Maribor
Junior Member
I'm using Spring MVC project templates form my web application. One of those should be host and other snaps. I'm considering host as a platform and other - snaps are modules.