[jboss-jira] [JBoss JIRA] Created: (JBAS-5048) Lookup of resource bound via ExternalContext using a CompondName results in serialization of org.jnp.interfaces.FastNamingProperties
Mike Clark (JIRA)
jira-events at lists.jboss.org
Tue Dec 4 13:23:51 EST 2007
Lookup of resource bound via ExternalContext using a CompondName results in serialization of org.jnp.interfaces.FastNamingProperties
------------------------------------------------------------------------------------------------------------------------------------
Key: JBAS-5048
URL: http://jira.jboss.com/jira/browse/JBAS-5048
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Naming
Affects Versions: JBossAS-4.0.5.GA
Reporter: Mike Clark
Assigned To: Scott M Stark
When a user registers resources using the org.jboss.naming.ExternalContext, they can only successfully lookup resources on the remote JNDI system if they first lookup the Context registered in the ExternalContext and then look up resources on the returned Context. Looking up the full name results in the use of the org.jnp.interfaces.FastNamingProperties class which is not generally available on the remote JNDI implementation.
So, for example, a user might register "external/foreign_jndi" using the ExternalContext. Looking up resource, a/b/c as follows works:
Context initialContext = new InitialContext();
Context remoteContext = (Context) initialContext.lookup("external/foreign_jndi");
Object obj = remoteContext.lookup("a/b/c");
while, the more direct
Context initialContext = new InitialContext();
Object obj = initialContext.lookup("external/foreign_jndi/a/b/c");
results in a "java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties" exception on the remote JNDI system.
It appears to occur because the FastNamingProperties class is used in the construction of the CompoundName in the org.jnp.interfaces.NamingParser. So, in the first case, the parsing of "a/b/c" is handled by the foreign JNDI system, while in the latter, the CompoundName containing the FastNamingProperties is passed to the foreign JNDI system.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list