[
https://issues.jboss.org/browse/AS7-5271?page=com.atlassian.jira.plugin.s...
]
David Bosschaert commented on AS7-5271:
---------------------------------------
Quite a bit of work around this has been done in the context of JBOSGI-81. This relates to
using the Apache Aries OSGi/JNDI implementation in AS.
One thing we should do to see where we stand in relation to compliance is run the
OSGi/JNDI TCK and see what the current result is.
Complete support for OSGi JNDI
------------------------------
Key: AS7-5271
URL:
https://issues.jboss.org/browse/AS7-5271
Project: Application Server 7
Issue Type: Feature Request
Components: Naming, OSGi
Reporter: Thomas Diesler
Fix For: 7.2.0.CR1
As expected because of the missing integration with the NamingManger singletons, all
tests that go through NamingManager to obtain the InitialContextFactory or the
ObjectFactory fail.
{code}
Running org.jboss.test.osgi.example.jndi.JNDITestCase
Tests run: 12, Failures: 1, Errors: 2, Skipped: 2, Time elapsed: 15.574 sec <<<
FAILURE!
Results :
Failed tests:
testContextManagerReferenceBinding(org.jboss.test.osgi.example.jndi.JNDITestCase):
expected:<bar> but was:<Reference Class Name: java.lang.String(..)
Tests in error:
testTraditionalAPIValueBinding(org.jboss.test.osgi.example.jndi.JNDITestCase):
JBAS011843: Failed instantiate InitialContextFactory
org.jboss.test.osgi.example.jndi.bundle.JNDITestActivator$SimpleInitalContextFactory from
classloader ModuleClassLoader for Module "deployment.arquillian-service:main"
from Service Module Loader
testTraditionalAPIReferenceBinding(org.jboss.test.osgi.example.jndi.JNDITestCase):
JBAS011843: Failed instantiate InitialContextFactory
org.jboss.test.osgi.example.jndi.bundle.JNDITestActivator$SimpleInitalContextFactory from
classloader ModuleClassLoader for Module "deployment.arquillian-service:main"
from Service Module Loader
{code}
In reality it means that OSGi Bundles cannot use JNDI with object References and cannot
expect the traditional JNDI API to work. These findings generally raise the question how a
spec compliant OSGI JNDI Implementation is supposed to work in a container environment.
Specifically, in an environment that has already set the NamingManager singletons.
IMHO there is a layer of abstraction missing. Perhaps the container should register a
NamingManger service that the JNDI Implementation can use to register its
InitialContextFactoryBuilder and ObjectFactoryBuilder.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira