users@glassfish.java.net

Re: minimal client setup for EJB call

From: <thomas_at_randspringer.de>
Date: Wed, 4 Aug 2010 15:45:49 +0200 (CEST)

I have a remark to my second question:
 
First I looked up the context with:
 
props.setProperty("org.omg.CORBA.ORBInitialHost", "porschberg.osp-dd.de");
props.setProperty("org.omg.CORBA.ORBInitialPort", "20001");
bean = (TraceEJBRemote) new InitialContext(props).lookup("de.otto.cobra.business.TraceEJB");
 
Now I use the default constructor -->
bean = (TraceEJBRemote) new InitialContext().lookup("de.otto.cobra.business.TraceEJB");
 
and start the client with
-Dorg.omg.CORBA.ORBInitialHost=porschberg.osp-dd.de -Dorg.omg.CORBA.ORBInitialPort=20001
 
This lead not to a solution on the bluebird non-local machine but to a new kind of error on client side-->
 
>snip
org.omg.CORBA.COMM_FAILURE:   vmcid: SUN  minor code: 208 completed: Maybe
        at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectionAbort(ORBUtilSystemException.java:3603)
>snip
 
In the server.log I see no output.
 
Any ideas?
 
Thomas
 
 

"thomas_at_randspringer.de" <thomas_at_randspringer.de> hat am 4. August 2010 um 14:45 geschrieben:

> Hi,
>  
> I wrote a tiny SWING-GUI which calls an EJB in my glassfish server.
> On the SWING-GUI machine I have no glassfish installation so I started the GUI in this way:
>  
> #from my shell skript
>  
> >snip
>  
> BASE=`pwd`/lib
> java -cp $BASE/gf-client.jar:$BASE/trace-minimal-01.jar:. SwingMeetsGlassfish
>  
> >snip
>  
> I had to create a directory "modules" parallel to "lib" which contains the jars referenced from MANIFEST.MF in gf-client.jar.
>  
> This works on my machine.
>  
> My fist question is: Is this the preferred way to start a client which communicates with a glassfish server?
>  
>  
> I have a further question:
> I copied this client-installation to another machine say bluebird and called the script from there. I get an
> Exception in thread "main" javax.naming.NamingException: Lookup failed for 'de.otto.cobra.business.TraceEJB' in SerialContext targetHost=porschberg.osp-dd.de,targetPort=3700,orb'sInitialHost=localhost,orb'sInitialPort=3700 [Root exception is javax.naming.NameNotFoundException: de.otto.cobra.business.TraceEJB not found]
>         at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
>  
> porschberg.osp-dd.de is the glassfish server.
> Why does it work on my own machine but not from another? I could do a "telnet porschberg.osp-dd.de 3700" from this bluebird machine.
>  
> Any ideas?
>  
> Thomas
>