[jboss-user] [JNDI and Naming] - JBoss 4 to JBoss 5 (JNDI question)
New Close
do-not-reply at jboss.com
Tue May 11 10:02:25 EDT 2010
New Close [http://community.jboss.org/people/new_open_close] created the discussion
"JBoss 4 to JBoss 5 (JNDI question)"
To view the discussion, visit: http://community.jboss.org/message/542318#542318
--------------------------------------------------------------
I've searched, but haven't seen anyone bring up this issue... so I'm assuming we have a configuration problem. We're trying to test our code with JBoss 5 (jboss-5.1.0.GA), and have run into trouble when looking up the datasource (DefaultDS and XAOracleDS) in JNDI. It appears in the JMX console:
h1. java: Namespace
+- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement)
+- comp (class: javax.namingMain.Context)
+- DeploymentManager (class: org.jboss.aop.generatedproxies.AOPProxy$4)
+- policyRegistration (class: org.jboss.security.plugins.JBossPolicyRegistration)
+- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
+- app (class: org.jnp.interfaces.NamingContext)
| +- Manager (class: javax.inject.manager.Manager)
+- Mail (class: javax.mail.Session)
+- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
+- *DefaultDS* (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- jaas (class: javax.naming.Context)
| +- profileservice (class: org.jboss.security.plugins.SecurityDomainContext)
+- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- *XAOracleDS* (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)
+- timedCacheFactory (class: javax.naming.Context)
Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
+- ManagementView (class: org.jboss.aop.generatedproxies.AOPProxy$3)
but in the code all we see is:
Using bound name < java: > found class < javax.namingMain.Context > with object name < comp >
Using bound name < java: > found class < org.jnp.interfaces.NamingContext > with object name < app >
Using bound name < java: > found class < javax.inject.manager.Manager > with object name < Manager >
Using bound name < java: > found class < org.jboss.security.SubjectSecurityProxyFactory > with object name < SecurityProxyFactory >
Using bound name < java: > found class < javax.naming.Context > with object name < timedCacheFactory >
which appears to be a subset of the available objects. The above log statements were output by:
Context context = new InitialContext();
listContext(context, "java:");
private void listContext(Context ctx, String bName)
{
try
{
NamingEnumeration<Binding> list = ctx.listBindings(bName);
while (list.hasMore())
{
Binding item = (Binding) list.next();
String className = item.getClassName();
String objectName = item.getName();
log.info("Using bound name < " + bName + " > found class < "
+ className + " > with object name < " + objectName + " >");
Object o = item.getObject();
if (o instanceof javax.naming.Context)
{
listContext((Context) o, bName);
}
}
}
catch (NamingException ex)
{
log.warn("JNDI failure: ", ex);
}
}
There were no errors and/or warnings at this point in our code. Any help would be appreciated. Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/542318#542318]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100511/e1329e81/attachment.html
More information about the jboss-user
mailing list