Hi:
I'm interested in using spring social in an OSGI container. Any plans to osgi-ify the jars? The 1.0.2 version manifests are empty.
I can embed the dependencies but would prefer not to.
Thanks,
Derek
Hi:
I'm interested in using spring social in an OSGI container. Any plans to osgi-ify the jars? The 1.0.2 version manifests are empty.
I can embed the dependencies but would prefer not to.
Thanks,
Derek
I'd certainly be willing to do that, but it's not high on the priority list (in fact, at the moment it's not on the list at all). To remedy that, I've created https://jira.springsource.org/browse/SOCIAL-302, https://jira.springsource.org/browse/SOCIALFB-74, https://jira.springsource.org/browse/SOCIALTW-34, and https://jira.springsource.org/browse/SOCIALLI-20.
These currently aren't scheduled, but I'll consider them for the 1.1.0 releases of Social Core, Twitter, and Facebook...and the 1.0.0 release of LinkedIn.
I don't want to simply generate a proper manifest and call it done, though...If I do this, I'll want to be sure that they are fully tested in an OSGi runtime and (as appropriate) expose services that lend themselves to the OSGi programming model. So, this is a bit bigger than just generating a manifest. If you're interested in working with OSGi, I'll welcome any pull requests you can send my way to help move these toward OSGi.
Craig Walls
Spring Social Project Lead
Thanks for the reply and Jira tickets. I agree the changes should be fully tested before release. For now, I'll inline the spring-social* jars in my bundle.
Do you want to know of any obstacles I encounter in the OSGI runtime?
Any non-bundle JAR (or JARs) can be "wrapped" in a bundle JAR. You simply create a JAR file that itself contains the non-bundle JARs. As you do it, you decide whether you want to export the packages from the wrapped JARs to that they're exposed to other bundles or if you only need to use those JARs internally to that bundle (in which case you wouldn't export them). In either case you set the Bundle-ClassPath manifest header to reference all of the embedded JAR files. And then if you want to export their packages you do so in the typical way using Export-Package.
Peter Kriens' BND tool can help with this: http://www.aqute.biz/Bnd/Wrapping. The Pax Construct project (http://www.ops4j.org/projects/pax/construct/) can also help you with this using its pax-wrap-jar command.
Note that creating Bundle-ified Spring Social JARs still isn't very high on the priority list. As mentioned before, creating them is the easy part...testing them to ensure that they are useful in an OSGi container is a completely separate and more involved thing.
Even though this is not high on the Spring Social priority list, I'd be eager to hear if any has created Bundle-ified Spring Social JARs (even if they're just wrapped JARs) and are using them in an OSGi project. I'd be especially eager to see working code (e.g., a GitHub repo).
Last edited by habuma; Nov 2nd, 2012 at 10:10 PM.
Craig Walls
Spring Social Project Lead