users@glassfish.java.net

Re: overriding osgi-module with endorsed jar does not work

From: <forums_at_java.net>
Date: Thu, 1 Dec 2011 03:27:02 -0600 (CST)

Hi,

I just stumbled accross this thread and would like to add something, just for
the sake of completeness:

In your case it may work, but it really is not the recommended solution,
because:

If you export the same packages in two different bundles, it just takes the
desired bundle by luck. From an OSGi package wiring/resolver perspective it
doesn't matter which bundle gets used, as long as the requirements for the
importing bundle matches. However, if you have one bundle with a patch in it
that you really need you'll have to make sure that the OSGi resolver has no
other chance than taking your bundle.

Hence, you really should replace the jar within glassfish/modules.
Additionally, with the newer versions of GlassFish 3.1.1+ the OSGi framework
start-level are being used to make sure, that all bundles in
glassfish/modules are resolved before considering anything from
autodeploy/bundles. Hence, your approach might not work as expected.


--
[Message sent by forum member 'chaoslayer']
View Post: http://forums.java.net/node/869180