On Feb 23, 2007, at 7:14 AM, Tom Purcell wrote:


David

Thanks for the response. I got it to work When my ear deploys I see the
following log message:

09:45:29,976 WARN [OpenEJB] Auto-deploying ejb ConferenceCallSchedulerBean: EjbDeployment(deployment-id=geronimo-deploymentUtil5840.tmpdir/ ConferenceCallSchedulerBean,
container-id=Default Stateless Container)

So based on the "Geronimo has it set to "{moduleId}/{ejbName}"." formula I
tried the look up string:
"geronimo-deploymentUtil5840.tmpdir/ ConferenceCallSchedulerBeanBusinessRemote"

Well that's not right at all. We should be using the name of the ejb jar file as you have it in your ear. Can you raise a bug for this in the Geronimo JIRA and I'll make sure it's fixed in G M3 which is getting released in the next week.

That worked. Now I still have a problem in that the
"geronimo-deploymentUtil<some number>" will change each time I deploy so I need to implement a schem along the lines of the code you included (appId == new File(earFilePath).getName() ...) but I'm not sure where to put that
code or how to invoke it. Could you give me another push in the right
direction?

You likely won't need it once the fix is in, but should you want it you simply set a system property

java "-Dopenejb.deploymentId.format=app/{appId}/ejb/{moduleId}/ {ejbName}" -jar bin/server.jar ...

Obviously, the format above is a little long. Just showing you can mix non-replaced words with replaceable ones.


-David



Thanks
Tom

David Blevins wrote:


On Feb 22, 2007, at 7:05 AM, Marco Mistroni wrote:

Hi,
 i have deployed EJB3 in jboss (not sure if it matters but it might
give
you an idea)

some time (while spec was evolving), my lookup was
nameOfYourEarFile/nameOfYourBean

That's also the format used by Geronimo's integration of OpenEJB.
IIRC, though it may be nameOfYourJarFile/nameOfYourBean.

Definitely an area we need to document better.  The rules are
currently as such (all that is not yet configurable will be soon
enough):

JNDI names that clients use are not yet configurable as such,
strictly, but are based in the deployment-id of your bean, which is
the unique id of the bean in the system.  The deployment-id is
configurable and even the default deployment-id is configurable.

The default deployment-id format is set with a system property called
"openejb.deploymentId.format".  The OpenEJB embedded and standalone,
it's currently set to "{ejbName}".  Geronimo has it set to
"{moduleId}/{ejbName}".  A few input choices are available:

appId       == new File(earFilePath).getName()
moduleId    == new File(jarPath).getName()
ejbClass    == bean.getClass().getName()
ejbClass.simpleName == bean.getClass().getSimpleName()
ejbName     == bean.getEjbName()

So you can really take control of how those names are set.

Now, the JNDI names themselves will soon have the above formatting
functionality, but currently they are hard coded to be:

             switch (ejbInterfaceType) {
                 case REMOTE_HOME:
                     return deploymentId;
                 case LOCAL_HOME:
                     return deploymentId + "Local";
                 case BUSINESS_LOCAL:
                     return deploymentId + "BusinessLocal";
                 case BUSINESS_REMOTE:
                     return deploymentId + "BusinessRemote";
             }

Hope that helps!

-David


or try to use just the name of your bean as you specify it with name
attribute of your annotation..

hth
marco

On 2/22/07, Mohammad Nour El-Din <[EMAIL PROTECTED]> wrote:

Hi Tom...

What combinations you have used ? does this EJB supports EJB2.1
home and
object interfaces or EJB3.0 business interface(s) ?



On 2/22/07, Tom Purcell <[EMAIL PROTECTED]> wrote:


Hello

I have created an EJB3 stateless session bean using annotations (no
deployment descriptors) and packed it into a jar and packed the
jar into
an
ear (there is no web app yet and, therefore, no war). The ear
successfully
deploys to a Geronimo/Tomcat 2.0-M2 server.

The problem I'm having is in the lookup from my client. I'm new to
OpenEJB
and Geronimo but not to EJB. I'm setting properties, giving them
to the
InitialContext and doing a lookup. But a lookup on what? What is
the
format
for the JNDI name I wnat to find? I've tried a number of
combinations
with
no luck.

Thanks
Tom
--
View this message in context:

http://www.nabble.com/InitialContext-JNDI-Lookup-
tf3273209s2756.html#a9101357
Sent from the OpenEJB User mailing list archive at Nabble.com.




--
Thanks
- Mohammad Nour





--
View this message in context: http://www.nabble.com/InitialContext- JNDI-Lookup-tf3273209s2756.html#a9120402
Sent from the OpenEJB User mailing list archive at Nabble.com.


Reply via email to