Skip to main content

Re: How to find out the actual JNDI name of a EJB 2.1 Compatibility

2 replies [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Anonymous
Markus Karg

Sahoo,

yes, it is very similar to what I have:

* EJB 3.0 Stateless Session Bean with NO EJB 3.0 Interfaces, but solely EJB 2.1 Compatibility View (@RemoteHome).
* No usage of ejb-jar.xml
* No manually provided JNDI name, so GlassFish is using defaults
* EJB 2.1 client running in GlassFish 9.1u1 application client container (ACC), NOT using standalone client!
* No use of WebStart currently, using appclient.bat instead
* Client is NOT using @EJB, but is using new InitialContext().lookup("java:comp/env/ejb/X").
* Using the following client side deployment descriptors:

My application-client.xml is:


ejb/X

And my sun-application-client.xml ist:


ejb/X
de.quipsy.sessions.escalationplanmanager.EscalationPlanManagerHome

That is the fully qualified classname of the EJB 2.1 Compatibility View, just as the FAQ says that it will like in my case (having EJB 2.1 View, not having EJB 3.0 Business Interface).

At runtime, the ACC says:

"javax.naming.NameNotFoundException: de.quipsy.sessions.escalationplanmanager.EscalationPlanManagerHome#null not found"

(See, the error message is NOT that java:comp/env/X is not found -- so the problem is not at my lookup() but inside of the ACC when it tries to bind to the EJB 2.1 Compatibility View!)

Still the question is: Why is that not working and how to make it work?

Maybe I must use instead of providing a sun-application-client.xml?

Thanks! :-)
Markus

-----Original Message-----
From: Sanjeeb.Sahoo@Sun.COM [mailto:Sanjeeb.Sahoo@Sun.COM] On Behalf Of Sahoo
Sent: Sonntag, 1. Juni 2008 20:35
To: users@glassfish.dev.java.net
Subject: Re: How to find out the actual JNDI name of a EJB 2.1 Compatibility

Markus,

So, you have an 3.0 EJB which has adapted a 2.x interface? Is it
something similar to [1]? Else, can you describe relevant portions your
EJB using some pseudo code? We need to know how is it annotated or
described using XML file?

Thanks,
Sahoo

[1] https://glassfish.dev.java.net/javaee5/ejb/examples/Adapted.html

Markus Karg wrote:
> Sahoo,
>
> thanks for you kind help.
>
> I read the FAQ a second time now as you suggested, but still do not understand why I shall use "#": I neither run a standalone client nor have multiple remote interfaces. I am using ACC client, and have only 1 EJB 2.1 interface and ZERO EJB 3.0 business interfaces. And the FAQ says, only in that cases the hash is needed. So in my case, regardingthe FAQ, the hash is not needed.
>
> Before telling me to read the FAQ a third time, can you please be so kind and tell me where it says that in my case (having EJB 3.0 session bean with ONLY ONE EJB 2.1 remote view looked up from within the client container) I must use the syntax that you are suggesting?
>
> Point "4. If no global JNDI name has been specified, a default global JNDI name will be generated according to the following table :" says that in my case (Bean has 2.x Home: YES, Total No. of EJB 3.0 Remot Business Intf: ZERO, Default: fully-qualified name of Home interface". This is exactly what I did as you can see in the code sample that I have sent to you.
>
> So I do not understand why I must use "#" as you said.
>
> Can you elaborate on that please? :-)
>
> Thanks a lot! :-)
> Markus
>
> -----Original Message-----
> From: Sanjeeb.Sahoo@Sun.COM [mailto:Sanjeeb.Sahoo@Sun.COM] On Behalf Of Sahoo
> Sent: Sonntag, 1. Juni 2008 17:17
> To: users@glassfish.dev.java.net
> Subject: Re: How to find out the actual JNDI name of a EJB 2.1 Compatibility
>
> I don't think you did exactly what Ken suggested. You did not specify
> "#" to narrow down the view of the EJB you
> want to use from client. Read the FAQ again.
>
> Sahoo
>
> Markus Karg wrote:
>
>> As can be seen in my posting to Sahoo, I actually did exactly what is told in the EJB_FAQ (using full qualified name as JNDI name).
>>
>> So my question is: Why is it not working?
>>
>> Thanks
>> Markus
>>
>> -----Original Message-----
>> From: glassfish@javadesktop.org [mailto:glassfish@javadesktop.org]
>> Sent: Freitag, 30. Mai 2008 16:42
>> To: users@glassfish.dev.java.net
>> Subject: Re: How to find out the actual JNDI name of a EJB 2.1 Compatibility
>>
>> https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#SessionBeanGloba...
>> [Message sent by forum member 'ksak' (ksak)]
>>
>> http://forums.java.net/jive/thread.jspa?messageID=277560
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
>> For additional commands, e-mail: users-help@glassfish.dev.java.net
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net