aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes EJB 3 Local Lookup not working with Weblogic 10.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB 3 Local Lookup not working with Weblogic 10.3" Watch "EJB 3 Local Lookup not working with Weblogic 10.3" New topic
Author

EJB 3 Local Lookup not working with Weblogic 10.3

ciccio webmaster
Greenhorn

Joined: Nov 17, 2011
Posts: 3
Hi,
i'm trying to access a stateless SessionBean EJB 3.0 from an EJB MessageDrivenBean deployed in two distinc EAR on Weblogic 10.3.4.

I see that JNDI Tree don't show the local Interface JNDI name.

PROBLEM:
I must improve EJB call performance!!!
How i can configure my MessageDrivenBean ear to access a SessionBean deployed in another ear?
Can i use a cache to avoid EJB lookup?

Does any one has solved this kind of problem?

Thanks
R
Piotr Nowicki
Ranch Hand

Joined: Jul 13, 2010
Posts: 610

As far as I remember, the @Local can be used only for calls local to the application, not the JVM. Therefore different EAR's are different applications and I don't think you can use it in your case.


OCP Java SE 6 Programmer, OCM Java SE 6 Developer, OCE Java EE 6 JSPSD, OCE Java EE 6 EJBD, OCE Java EE 6 JPAD, Spring 3.0 Core Professional.
ciccio webmaster
Greenhorn

Joined: Nov 17, 2011
Posts: 3
Could i define ejb local references in my MessageDrivenBean deployment descriptor (es: ejb-jar.xml )?

I read that someone used:

<ejb-local-ref>
...
</ejb-local-ref>

And they say that we could lookup our local reference using the following JNDI reference:

java:comp/env/ejb/BusinessLogicBean


Is this solution avaiable also in case where we are using two distinct ear?
In that case how can i set my deployment descriptors?

Thanks
R
Piotr Nowicki
Ranch Hand

Joined: Jul 13, 2010
Posts: 610

@Ciccio, the @EJB annotation used on the local interface type in your EJB is equivalent to the definition in the ejb-jar.xml.

You can either define it in ejb-jar.xml and then look it up using the code you provided or you can just do:

and achieve exactly the same.
ciccio webmaster
Greenhorn

Joined: Nov 17, 2011
Posts: 3
I think that unfortunately it is not enough!

It doesn't work because it isn't able to find the Bean.

With Remore interface it works!

Maybe i should configure some other things.

I need access in local that Bean leaving this kind of packaging (with two distinct ear)!

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB 3 Local Lookup not working with Weblogic 10.3
 
Similar Threads
jndi - confusion
Sample code for Deployment descriptors of Message Driven Bean in weblogic
Jboss and Ejb 2.1 ejb-ref lookup
Lookup EJB3 from web app in weblogic
EJB 3 Local Lookup not working with Weblogic 10.3 and JDK 1.6_05