[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] question regarding buddy class loading

Heiko,

Thank you very much for your replay and pointing me where to look. I'll certainly take a closer look to the specification...

I've been using services for other things. In fact I have been using a service that allows to dynamically register entities.... But how can I force "legacy" software like Hibernate or Quartz to work that way? My problem is: I have I have a bundle A that is encapsulating Hibernate and all the database related functionality. Let's say I want to use the same bundle in building application B (in bundle B) and application C (in bundle C), Hibernate (or quartz), living on bunlde A, will try to do a classForName() on my entities on bundle B or C, but they are not "visible". So, thats why I'm using the buddy-classloading. How can I use a service on that situation?

Best regards,

Ernesto

Heiko Seeberger wrote:
Ernesto,

If you want to stick to OSGi, use the manifest header Dynamic-ImportPackage (please take a look at the very good OSGi spec. for details). As in contrast to Buddy Loading (with registered policy) you can only see exported packages, but often that will be what you need.

Please by caution to Dynamic-ImportPackage or Buddy Loading. Often there are other ways. Have you been thinking about using OSGi services?

Heiko

Am 14.06.2008 um 06:40 schrieb Ernesto Reinaldo Barreiro:

Hi All,

My apologies if this is not the right place  to ask these questions....

I have been using Equinox extensions:

Eclipse-BuddyPolicy: registered
Eclipse-RegisterBuddy: xxx, yyy

to develop OSGi enabled WEB applications (using Wicket, Hibernate, quartz, and so on). I need to do this because the basic functionality of is encapsulated on some bundles, that are common to all applications (let's say they are part of my development framework), and they need to load classes from bundles that are specific to each application. This approach is fine for me, but I want to know if there is something similar in standard OSGi? I would like to get rid of the restriction of my applications only working on Equinox... Or if there is a better-cleaner-more standard way of achieving the same results? Is there a place where I can read/learn more about all this?

Thanks in advance,

Ernesto
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________ equinox-dev mailing list equinox-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/equinox-dev