users@glassfish.java.net

Re: Pb with remote bean lookup from an AS (host1) toward another AS(host2)

From: <glassfish_at_javadesktop.org>
Date: Thu, 30 Apr 2009 12:28:48 PDT

Yes, I do use EJB 3 and remote interface.

Thank you. Yes, the reference you mention will work ... I probably should have narrowed my question...

This:
Properties props = new Properties();
    props.setProperty("java.naming.factory.initial",
                             "com.sun.enterprise.naming.SerialInitContextFactory");
    props.setProperty("java.naming.factory.url.pkgs",
                             "com.sun.enterprise.naming");
    props.setProperty("java.naming.factory.state",
                             "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
    props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
    props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
    InitialContext ic = new InitialContext(props);

Will let me connect to host 2 and to session bean but it can not handle a cluster, unless there is way to specify multiple ORBInitialHost and ORBInitialPost (which I have not found)?
On the other hand the corbaname can contain multiple hosts and ports.
 
corbaname:iiop:host1:3700,host2:3700#B

So, if my problem is that I want to be able to connect to a Remote EJB bean in a cluster using EJB 3.0, what do I have to do then?
[Message sent by forum member 'baboune' (baboune)]

http://forums.java.net/jive/thread.jspa?messageID=344550