The question to ask is really - why are
you doing it this way and making your
client code vendor specific? Why not
use app client?
Dyego Souza Dantas Leal wrote:
> I change the code to:
>
>
>
> System.setProperty("org.omg.CORBA.ORBInitialHost", "192.168.0.1");
> System.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
> System.setProperty("com.sun.appserv.iiop.endpoints",
> "192.168.0.1:3700");
> System.setProperty("com.sun.CORBA.connection.ORBSocketFactory",
> "com.sun.enterprise.iiop.IIOPSSLSocketFactory");
> InitialContext ic = new InitialContext();
>
> System.out.println("Hey The Obj is !
> "+ic.lookup(MyLittleSessionBeanRemote.class.getName()));
>
>
> And everythink works fine... i'm afraid with this !!!!
>
> The question is , Why ?
>
>
>
> Dyego Souza Dantas Leal escreveu:
>
>> I have a EJB Application deployed in host 192.168.0.1
>>
>> And i writing a client in my workstation (192.168.0.2)
>>
>> I need to write an EJB3 CLIENT APP to execute my session ben (inside
>> 192.168.0.1)
>>
>> I'm using on client:
>>
>>
>> System.setProperty("java.naming.factory.initial",
>> "com.sun.jndi.cosnaming.CNCtxFactory");
>> System.setProperty("java.naming.provider.url",
>> "iiop://192.168.0.1:3700");
>> InitialContext ic = new InitialContext(System.getProperties());
>> System.out.println("Hey The Obj is !
>> "+ic.lookup(MyLittleSessionBeanRemote.class.getName()));
>>
>>
>> But i got an error :
>>
>>
>> javax.naming.NameNotFoundException [Root exception is
>> org.omg.CosNaming.NamingContextPackage.NotFound:
>> IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]
>> at
>> com.sun.jndi.cosnaming.ExceptionMapper.mapException(ExceptionMapper.java:44)
>>
>> at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:453)
>> at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:492)
>> at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:470)
>> at javax.naming.InitialContext.lookup(InitialContext.java:351)
>> at
>> br.com.escriba.document5.session.TabelaCustaSessionBeanTest.testPing(TabelaCustaSessionBeanTest.java:42)
>>
>> Caused by: org.omg.CosNaming.NamingContextPackage.NotFound:
>> IDL:omg.org/CosNaming/NamingContext/NotFound:1.0
>> at
>> org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:72)
>>
>> at
>> org.omg.CosNaming._NamingContextExtStub.resolve(_NamingContextExtStub.java:406)
>>
>> at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:440)
>> ... 19 more
>>
>>
>>
>> * BUT * If goto ADMIN CONSOLE and click in "JNDI BROWSING" the object
>> is published in JNDI Tree...
>>
>>
>> What's wrong ?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>