geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Geronimo EJB Help - Remote EJB Client Invocation
Date Wed, 21 Feb 2007 22:16:13 GMT
It's a good start to work with Rick.  Thank you very much.  I'll setup the
appropriate classpath.  I'm also betting that the JNDI name is throwing me off. 
I'm just tyring to get a client to run from a seperate project in Eclipse at this point. 
I was using the app client syntax and probably only need to look for just "ejb/Helloworld"?<BR>
<div   name="wmMessageComp">&nbsp;</DIV>
<DIV name="wmMessageComp">
It also appears that your running your Swing client on the same machine
as the server.&nbsp; Any experience running it on another workstation?&nbsp;<BR><BR>
<BLOCKQUOTE style="PADDING-LEFT: 8px; MARGIN-LEFT: 8px; BORDER-LEFT: blue 2px solid">--------
Original Message --------<BR>Subject: RE: Geronimo EJB Help - Remote EJB Client Invocation<BR>From:
"Carragher Jr, Richard" &lt;;<BR>Date: Wed, February
21, 2007 3:07 pm<BR>To: &lt;;<BR><BR>
<DIV dir=ltr align=left><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff
We have a Swing client that accesses remote EJBs.&nbsp; I'm not sure
that all of these are required, but this gets the job done. Here's our classpath:</FONT></SPAN></DIV>
<DIV><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff size=2>&nbsp;&nbsp;&nbsp;
lib/geronimo-kernel-1.1.1.jar<BR>&nbsp;&nbsp;&nbsp; repository/geronimo/geronimo-security/1.1.1/geronimo-security-1.1.1.jar<BR>&nbsp;&nbsp;&nbsp;
<DIV><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff size=2>
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.</FONT></SPAN></DIV>
<DIV><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff size=2>Our
jndi properties are:</FONT></SPAN></DIV>
<DIV><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff size=2>java.naming.factory.initial=org.openejb.client.RemoteInitialContextFactory<BR>java.naming.provider.url=localhost:4201<BR><BR></FONT></SPAN></DIV>
<DIV><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff size=2>Hope
this helps....</FONT></SPAN></DIV>
<DIV><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff size=2>Rick</FONT></SPAN></DIV>
<DIV><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=465210222-21022007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> []
<BR><B>Sent:</B> Wednesday, February 21, 2007 4:00 PM<BR><B>To:</B><BR><B>Cc:</B><BR><B>Subject:</B>
Geronimo EJB Help - Remote EJB Client Invocation <BR></FONT><BR></DIV>
<DIV>Hi All,</DIV>
I've moved beyond a web application and am dabbling in EJB's.&nbsp; I'm
running Geronimo 1.1.1 with a current version of Eclipse and the MyEclipse Plug-in as a development
environment.&nbsp; I've managed to educate myself on the MyEclipse way of EJB's using
thier XDoclet support.&nbsp; I've successfully produced an openejb-jar.xml&nbsp;deployment
descriptor that results in a simple HelloWorld&nbsp;EJB deployed on the server.&nbsp;
Woo Hoo!&nbsp; Hold the&nbsp;applause and party please, because I can't seem to call
the damn thing!&nbsp; 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)</DIV>
1)&nbsp; Remote client library requirements.&nbsp; I've located the
openejb-core-2.1.1.jar.&nbsp; I presumed this was all I might need for client access.&nbsp;
I've discovered the javax.ejb libraries aren't incorporated into this. (Specifically the javax.ejb.CreateException
asserted the fact,&nbsp;but I'm sure this cascades&nbsp;catastrophically into many
classes)&nbsp; I know I can get them from a JBoss jar that MyEclipse includes, or maybe
from the Eclipse Web Tools Project.&nbsp; I worked with Visual Age for Java once upon
a time and remember generating stubs and skeletons and client jar packaging.</DIV>
Can someone direct me appropriately on Geronimo/OpenEJB client jar
generation from inside Eclipse?</DIV>
Are all of the required client libraries for a remote call to OpenEJB
contained in the Geronimo distribution? i.e. javax.ejb&nbsp; 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.&nbsp; This
would be really helpful.</DIV>
2)&nbsp; JNDI naming.&nbsp; I think I might have gotten past this, but
want to confirm.&nbsp; A remote object context lookup for an EJB will utilize a naming
convention of "java:comp/env" concantenated ("/" presumed)&nbsp;with the value of the
&lt;jndi-name&gt; from the beans openejb-jar.xml deployment descriptor.&nbsp;
i.e. &lt;jndi-name&gt;ejb/HelloWorld&lt;/jndi-name&gt; = "java:/comp/env"&nbsp;+
"/" + "ejb/HelloWorld" = ctx.lookup("java:comp/env/ejb/HelloWorld")&nbsp; Is this correct?</DIV>
I've downloaded MC4J in an attempt to view and validate the JNDI
tree.&nbsp; It doesn't appear to be exposed via an MBean and there is no component of
the console that appears to provide this information.&nbsp; Is there anyway to actually
see/validate the container directory entries?</DIV>
3) Security Principal and Credentials.&nbsp; I presumed the God
parameters of "system" and "manager" would suffice here.&nbsp;However, I appear to be
catching an Authentication&nbsp;Exception.&nbsp; I haven't seen any decent documentation
on EJB deployment security configuration.&nbsp; Is there a document somewhere specific
for Geronimo/OpenEJB that clearly defines the deployment descriptor requirements in conjunction
with a remote&nbsp;EJB client?</DIV>
4) Provider URL. Pretty basic.&nbsp; "localhost:4201" as the default
local server, "server.domain.gtld:4201" for remote network clients.&nbsp; Obviously Name
Services, Firewalls, and Nat impact this information.&nbsp; What other container configuration
might be required for remote EJB client access to EJB's?&nbsp; I've seen reference to
&lt;Allow&gt; descriptors for the GBean of OpenEJB.&nbsp; Can someone confirm
the default and necessary requirements to make it accessible from the localhost, a specific
address,&nbsp;a subnet, or globally?</DIV>
5) How consistent is this going forward to 1.2 and 2.0?&nbsp; I presume
2.0 is EJB 3.0 compliant.&nbsp; I'd like to follow this lesson through to an EJB 3.0 with
Web Service Exposure.&nbsp; Maybe even some web service transaction examples!</DIV>
BTW, I'm running this development concurrently on my Windows platform
and OS X:)&nbsp;</DIV>
<DIV>Thanks for any help.&nbsp; I greatly appreciate it!</DIV>
<DIV>Mark Aufdencamp</DIV>
<DIV><A href=""></A></DIV></BLOCKQUOTE></DIV>

View raw message