• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Modular Java: Web Container Modules

 
author
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For us the most interesting thing with OSGi is to have a modular Web container application that allows to manage also JSF pages/backing beans as loadable modules. I read in the past that this will be possible with Spring in the future. Can we use this already in production? What do we have to keep in mind when we refactor a Spring based Web application with JSF frontend for this?
 
author
Posts: 422
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rainer Eschen wrote:For us the most interesting thing with OSGi is to have a modular Web container application that allows to manage also JSF pages/backing beans as loadable modules. I read in the past that this will be possible with Spring in the future. Can we use this already in production? What do we have to keep in mind when we refactor a Spring based Web application with JSF frontend for this?



Honestly, I'm not much of a JSF expert and I've never done JSF in the context of OSGi. So, I'm not sure I'm qualified to answer this particular question.

That said, there is a lot of working being done in the area of formalizing how we do webapps in OSGi. There are already a handful of ways to do this (I cover one such way in the book that supports JSP). But OSGi R4.2 includes a specification for web bundles that formalizes how to develop web applications in OSGi. SpringSource is providing the RI for that part of the spec and is retrofitting their dm Server to be based on it.

The one thing I'd keep in mind when developing web bundles (no matter how you do it) is to keep your WEB-INF/lib as empty as possible and your WEB-INF/classes as focused on web-stuff as possible. Instead of depending on libraries in WEB-INF/lib, your web bundle should depend on packages and services exposed by other bundles in the OSGi framework. Aside from that, building a web bundle isn't much different than building a regular WAR file. (Again, I'm not sure if JSF presents any special challenges in this regard.)
 
Rainer Eschen
author
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The suggestion not to use many frameworks is a bit difficult ;-). So, you may think it is better to wait for OSGi compatible implementations of the currently used frameworks before it makes sense to refactor?
 
Craig Walls
author
Posts: 422
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Rainer Eschen wrote:The suggestion not to use many frameworks is a bit difficult ;-). So, you may think it is better to wait for OSGi compatible implementations of the currently used frameworks before it makes sense to refactor?



I'm not sure I ever suggested that you shouldn't/couldn't use those frameworks. I just don't know enough about how well JSF and OSGi work together, so I can't make any claims one way or the other.

I'd say it's worthwhile to put together a tracer-bullet project to drive out JSF through OSGi. Nothing fancy...just something to see if it can do what you want it to do. The key thing to watch out for in OSGi is anything that uses classloader trickery. That's because in OSGi, the classloader works a bit different than you'd expect.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic