No, I didn't mean to imply that Hibernate could not be packaged as a
bundle, rather what I wanted to say was neither have I used it as a
bundle nor have I come across anyone using it as a bundle in GlassFish.
I once read one blog where someone had packaged Hibernate it as a bundle
and it involved some effort.
Since you have already got it working by packaging it inside your bundle
as a local resource, you will probably be better of using it that way.
What exactly blueprint helping you solve? The second spring war which
used to be on Tomcat will now be collocated along with the OSGi app in
GlassFish, correct? If yes, why can't you just reference the OSGi
services published by the first app via JNDI lookup or @Resource [1]?
There also must be a way to configure spring to make available JNDI
objects as Spring beans for use within a Spring app.
Sahoo
[1] We have a non-portable and rudimentary feature where OSGI services
are also available in JNDI. The mapping is not well defined at all. It
was done to come up with a quick and dirty hack to support SCR based
services via JNDI. This will change when we properly implement OSGi/JNDI
spec. Until it is changed, you could leverage it like this: just add a
component.name property in your service registration property, then you
can look up in JNDI using the name that you specified as a value of the
property.
On Tuesday 07 February 2012 12:32 AM, forums_at_java.net wrote:
> Sahoo,
>
> This could be another topic, but since we already mentioned it.. we
> got to a
> point where we need to have hiberante as an osgi bundle.
> The reason we need it is because we want to share services between our
> osgi
> app deployed on glassfish and a spring war of another app that used to
> run on
> tomcat.
> In order to do that, we are trying to use eclipse gemini blueprint
> (formerly
> spring-dm). The blueprint extender bundle depends on spring-orm bundle
> which
> in turn..depends on hibernate. We're using hiberante 3.5.6 and
> couldn't find
> it as an osgi bundle.
> Since you were implying that it probably shouldn't work and I wonder
> if we
> should go down that road or better look for alternatives.
>
>
>
>
> --
>
> [Message sent by forum member 'Karo']
>
> View Post: http://forums.java.net/node/882978
>
>