Anand Krishnan [
http://community.jboss.org/people/anandhakrishnank] replied to the
discussion
"$Proxy60 - returned by JBOSS JNDI Context"
To view the discussion, visit:
http://community.jboss.org/message/547602#547602
--------------------------------------------------------------
I had come across the $proxy60, by using Context{line 3}, instead of InitialContext as
given below:
/*[1]*/PrintWriter w = response.getWriter();
/*[2]*/NamingContext envCtx = (NamingContext) intialCtx.lookup("java:");
/*[3]*/Context ldapCtx = (Context) envCtx.lookup("external/ldap/jboss");
/*[4]*/InitialContext initialContext = new InitialContext(ldapCtx.getEnvironment());
/*[5]*/w.println(initialContext.toString()+"<br/>");
/*[6]*/w.println(initialContext.getEnvironment());
{line 5 prints :}
javax.naming.InitialContext@1cece51
{line 6 prints :}
{java.naming.factory.initial=org.jnp.interfaces.LocalOnlyContextFactory,
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces:org.jboss.naming:org.jnp.interfaces}
I need to convert this object to LocalOnlyContextFactory, thats how I could use in my
application.
Please suggest!
If try type-casting, it gives ClassCastException:
LocalOnlyContextFactory typeCtx =(LocalOnlyContextFactory)ldapctx;{ldapCtx from line:3}
Please suggest solution to get the right context to use in my application.
Thanks,
Anand
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/547602#547602]
Start a new discussion in JNDI and Naming at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]