tags:

views:

78

answers:

1

Hello,

I'm trying to use JACORB from am OSGI-Bundle. I read about people, who had a lot of trouble getting it up and running. Does anyone of you have any experience with including JaCORB into an OSGi-Bundle?

Thanks Moritz

+1  A: 

CORBA generally needs to create a lot of class-specific code, and I doubt that JACORB is going to do that in a class-safe way from a bundle (since it will no doubt need access to other classes to make it happen).

If you really need to do this, then adding a:

DynamicImport-Package: *

to the bundle will give the JACORB full access to your (exported) bundles. Note that what this means is that when JACORB becomes bound to your specific version of the package, it won't be dynamic (i.e. it will wire itself up permanently for the lifetime of your bundle).

You may want to look into OSGi remote services; there are a number of different implementations that provide services over the network; for example, Eclipse ECF or Apache CXF.

If you just need to call a client over OSGi, then it may be better to bundle an internal copy of JACORB in your bundle (so it will see what your bundle sees) and then set up the bundle's classpath with:

Bundle-ClassPath: .,jacorb.jar

That way, your client will be able to call out to a remote CORBA service, but not (easily) incoming requests. Note also that there may be a number of singleton resources (such as the IIOR port) which may mean you're limited to using this trick once per OSGi VM.

AlBlue