tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarek Gawor (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENEJB-1117) ServiceManager does not work in OSGi environment
Date Thu, 10 Dec 2009 06:26:18 GMT
ServiceManager does not work in OSGi environment
------------------------------------------------

                 Key: OPENEJB-1117
                 URL: https://issues.apache.org/jira/browse/OPENEJB-1117
             Project: OpenEJB
          Issue Type: Improvement
          Components: osgi
    Affects Versions: 3.1.x
            Reporter: Jarek Gawor


ServiceManager essentially looks for the ServerService resource files in its classloader hierarchy.
This works well in regular Java environment where usually the openejb-server jar would be
in the same classloader as any of the ServerService implementations. However, in OSGi environment
the openejb-server and the different ServerService implementations are separate bundles and
effectively have separate classloaders. As a result, the ServiceManager in OSGi environment
is unable to discover the ServerService resource files provided by the different "server"
bundles.

Side note: There are actually a number of problems here. One main problem is in the xbean
ResourceFinder class. It does not understand how to deal with "bundle" urls returned by classloader.getResource()
lookup. But even if it was fixed to support the "bundle" urls it would still not   find the
ServerService resources in other bundles since they would not be accessible from openejb-server
bundle classloader. There are ways of making the ServerService resources in other bundles
visible to openejb-server bundle but they are not desirable solutions (e.g. making "server"
bundles into fragment bundles or making openejb-server Require-Bundle the different "server"
bundles, etc.).


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message