File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Adding dynamic class loading (OSGi) to a Spring project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Adding dynamic class loading (OSGi) to a Spring project" Watch "Adding dynamic class loading (OSGi) to a Spring project" New topic
Author

Adding dynamic class loading (OSGi) to a Spring project

Chris Zaremba
Ranch Hand

Joined: Nov 22, 2010
Posts: 54

I have a Spring MVC project to which I would like to add and update a number of classes without having to restart the server. From what I have read, OSGi is the way to go. The obvious choice of implementation is Spring DM (or it's replacement Gemini Blueprint). What I can't work out is how you actually add it to a Spring project. Does Spring run within Gemini Blueprint or does Gemini Blueprint run within Spring? The official documentation has left me somewhat confused. I don't mind getting a book on the subject but not until I know it will do what I want it to.


SCJA, OCPJP, OCMJD
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1632
    
    7

You would run Spring in an OSGI container. See the Virgo website
http://www.eclipse.org/virgo/

Gemini Blueprint supports both Spring DM and Blueprint programming models.
http://www.eclipse.org/virgo/documentation/virgo-documentation-3.5.0.RELEASE/docs/virgo-user-guide/htmlsingle/virgo-user-guide.html#concepts.springdm


You need the Spring enterprise service bundles which support OSGI. These come bundled with Virgo but you can easily use different versions of Spring if you want to:
http://www.eclipse.org/virgo/documentation/virgo-documentation-3.5.0.RELEASE/docs/virgo-user-guide/htmlsingle/virgo-user-guide.html#repository-brits

I think reading over that document and checking out their samples will give you a good start. Any examples/blogs you find online regarding Spring DM server will most likely work with little to no changes on Virgo as well.


[How To Ask Questions][Read before you PM me]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Adding dynamic class loading (OSGi) to a Spring project
 
Similar Threads
Annotations and OSGI
OSGi with Spring Web MVC
Beginner needs help with Eclipse plugins, RCP and OSGI
What are Eclipse Virgo and Eclipse Gemini?
Spring DM versus JSR-291