You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by "Carragher Jr, Richard" <ri...@sap.com> on 2007/02/21 23:07:04 UTC

RE: Geronimo EJB Help - Remote EJB Client Invocation

We have a Swing client that accesses remote EJBs.  I'm not sure that all
of these are required, but this gets the job done. Here's our classpath:
    repository/openejb/openejb-core/2.1.1/openejb-core-2.1.1.jar
    lib/geronimo-j2ee-deployment_1.1.1_spec-1.0.1.jar
    lib/geronimo-kernel-1.1.1.jar
 
repository/geronimo/geronimo-security/1.1.1/geronimo-security-1.1.1.jar
 
repository/org/apache/geronimo/specs/geronimo-ejb_2.1_spec/1.0.1/geronim
o-ejb_2.1_spec-1.0.1.jar
 
repository/org/apache/geronimo/specs/geronimo-j2ee-jacc_1.0_spec/1.1.1/g
eronimo-j2ee-jacc_1.0_spec-1.1.1.jar
    lib/cglib-nodep-2.1_3.jar
 
For JNDI names, if you're running an Application Client, then you're
right about java:comp naming, but if you're running a standalone JVM,
you have to use the jndi-name that the ejb publishes in the ejb-jar.xml.
 
Our jndi properties are:
java.naming.factory.initial=org.openejb.client.RemoteInitialContextFacto
ry
java.naming.provider.url=localhost:4201
java.naming.security.principal=system
java.naming.security.credentials=manager
 
Hope this helps....
Rick
 
 

________________________________

From: mark@aufdencamp.com [mailto:mark@aufdencamp.com] 
Sent: Wednesday, February 21, 2007 4:00 PM
To: user@geronimo.apache.org
Cc: j2ee@cojug.org
Subject: Geronimo EJB Help - Remote EJB Client Invocation 


Hi All,
 
I've moved beyond a web application and am dabbling in EJB's.  I'm
running Geronimo 1.1.1 with a current version of Eclipse and the
MyEclipse Plug-in as a development environment.  I've managed to educate
myself on the MyEclipse way of EJB's using thier XDoclet support.  I've
successfully produced an openejb-jar.xml deployment descriptor that
results in a simple HelloWorld EJB deployed on the server.  Woo Hoo!
Hold the applause and party please, because I can't seem to call the
damn thing!  Sooo, I thought I've done enough RTFM and I was ready to
ask for help:) (As in not wasting anyones time, but ready to go see the
professor before class)
 
1)  Remote client library requirements.  I've located the
openejb-core-2.1.1.jar.  I presumed this was all I might need for client
access.  I've discovered the javax.ejb libraries aren't incorporated
into this. (Specifically the javax.ejb.CreateException asserted the
fact, but I'm sure this cascades catastrophically into many classes)  I
know I can get them from a JBoss jar that MyEclipse includes, or maybe
from the Eclipse Web Tools Project.  I worked with Visual Age for Java
once upon a time and remember generating stubs and skeletons and client
jar packaging.
 
Can someone direct me appropriately on Geronimo/OpenEJB client jar
generation from inside Eclipse?
 
Are all of the required client libraries for a remote call to OpenEJB
contained in the Geronimo distribution? i.e. javax.ejb  This might
cascade to the web container, as in documenting what standard libraries
are provided by Geronimo and what libraries are expected from other
sources that might affect standard usage.  This would be really helpful.
 
 
2)  JNDI naming.  I think I might have gotten past this, but want to
confirm.  A remote object context lookup for an EJB will utilize a
naming convention of "java:comp/env" concantenated ("/" presumed) with
the value of the <jndi-name> from the beans openejb-jar.xml deployment
descriptor.  i.e. <jndi-name>ejb/HelloWorld</jndi-name> =
"java:/comp/env" + "/" + "ejb/HelloWorld" =
ctx.lookup("java:comp/env/ejb/HelloWorld")  Is this correct?
 
I've downloaded MC4J in an attempt to view and validate the JNDI tree.
It doesn't appear to be exposed via an MBean and there is no component
of the console that appears to provide this information.  Is there
anyway to actually see/validate the container directory entries?
 
 
3) Security Principal and Credentials.  I presumed the God parameters of
"system" and "manager" would suffice here. However, I appear to be
catching an Authentication Exception.  I haven't seen any decent
documentation on EJB deployment security configuration.  Is there a
document somewhere specific for Geronimo/OpenEJB that clearly defines
the deployment descriptor requirements in conjunction with a remote EJB
client?
 
 
4) Provider URL. Pretty basic.  "localhost:4201" as the default local
server, "server.domain.gtld:4201" for remote network clients.  Obviously
Name Services, Firewalls, and Nat impact this information.  What other
container configuration might be required for remote EJB client access
to EJB's?  I've seen reference to <Allow> descriptors for the GBean of
OpenEJB.  Can someone confirm the default and necessary requirements to
make it accessible from the localhost, a specific address, a subnet, or
globally?
 
 
 
5) How consistent is this going forward to 1.2 and 2.0?  I presume 2.0
is EJB 3.0 compliant.  I'd like to follow this lesson through to an EJB
3.0 with Web Service Exposure.  Maybe even some web service transaction
examples!
 
 
 
BTW, I'm running this development concurrently on my Windows platform
and OS X:) 
 
Thanks for any help.  I greatly appreciate it!
 
Mark Aufdencamp
Mark@Aufdencamp.com