Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB 3 Local Lookup not working with Weblogic 10.3

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 623
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
ciccio webmaster
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 623
1
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@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
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)!

 
No. No. No. No. Changed my mind. Wanna come down. To see this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic