• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Spring Dynamic Modules and OSGi

 
Ranch Hand
Posts: 686
Netbeans IDE Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want to take a step back but please bear with me. I have used Spring MVC and Spring web services extensively on Tomcat.

What is Spring Dynamic Modules and OSGi addressing? Sorry I am new to this and could not get a good reference to understand
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://www.javaworld.com/javaworld/jw-03-2008/jw-03-osgi1.html
 
Vyas Sanzgiri
Ranch Hand
Posts: 686
Netbeans IDE Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok from what I read it looks like I need to have some more libraries or containers which support OSGi. Tomcat "as is" will not work
 
author
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vyas,

You're right! When using OSGi, all the needed dependencies must now be present within the OSGi container as components. You can convert classic jar files into bundles (i.e. adding OSGi manifest headers) with tools like Bnd or Bundlor but this task can be tricky. That's why SpringSource provides a repository (http://www.springsource.com/repository) containing a huge set of bundles for enterprise application development with OSGi. When getting all you need, you have to provision your OSGi container with these components. After this first stage done, you can begin to develop your component... with Spring DM or not ;-)

Regarding Tomcat, the approach is similar. As a matter of fact, corresponding components must be added within the container. SpringSource provides such components which simply wrap the standard tool and start/stop it programmatically. Same features of Tomcat are usable! In addition, Spring DM provides a mechanism to manage components containing Web application based on component lifecycle. When a Web component is started, Spring DM deploys it within the Web container (Tomcat or Jetty) and undeploys it when stopped. You can notice that the standization of this mechanim is in progress through the RFC 66 (OSGi Web container).

Whereas it's possible to embed an OSGi container within a Web app, it's recommanded to embed the Web container within an OSGi container...

Thierry

PS: See also the following thread in this forum - https://coderanch.com/t/482120/Spring/Application-Frameworks/Spring-DM-Web-Applications
 
reply
    Bookmark Topic Watch Topic
  • New Topic