[jboss-user] [JNDI and Naming] - Re: Make a call to an EJB3 this on a machine with weblogic through JNDI

Javier Godoy do-not-reply at jboss.com
Thu Sep 9 09:20:20 EDT 2010


Javier Godoy [http://community.jboss.org/people/suter] created the discussion

"Re: Make a call to an EJB3 this on a machine with weblogic through JNDI"

To view the discussion, visit: http://community.jboss.org/message/560392#560392

--------------------------------------------------------------
The solution is the next:

Properties properties = new Properties();
            properties.put( javax.naming.Context.PROVIDER_URL, "T3://IP:PORT/" );
            properties.put( javax.naming.Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
        
            context = new InitialContext( properties );
            Object initialReference = context.lookup(key_jndi); 
            objValue = (Object)javax.rmi.PortableRemoteObject.narrow(initialReference, Object.class );
            return objValue;

Thanks for all.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/560392#560392]

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/20100909/60067617/attachment.html 


More information about the jboss-user mailing list