users@glassfish.java.net

minimal client setup for EJB call

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

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