• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

ejb-local-ref AND ejb-link

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was trying out a simple customized example program from a web site.
a session bean calling an entity bean. ejb2.0 entity using local interfaces only.I have created separate entity jar and session jar.In session jar while
using weblogic ejbc , i get error... i am attaching part of ejb-jar.xml of session jar.
<ejb-local-ref>
<ejb-ref-name>ejb/LocalUser</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.test.LocalUserHome</local-home>
<local>com.test.LocalUser</local>
<ejb-link>userEntityBean.jar#UserBean</ejb-link>
</ejb-local-ref>
Now error:
ERROR: Error from ejbc:
In ejb-jar.xml, the EJB 'UserManagementBean' contains an invalid ejb-link in ejb-local-ref '
ejb/LocalUser'. No EJB with ejb-name 'userEntity.jar#UserBean' could be found.
ERROR: ejbc found errors

Now userEntity.jar is my enity ejb jar, and UserBean is the name of the bean class of the entity.
While using ejbc for session jar , i had the entity ejb jar in the same directory so path problem should n't be there.??
Please clarify this concept..
while following a session-->enitity ...is it that ejb-local-ref and ejb-link is only used if u have separate jars for session
and entity.
Thank you in advance..
:roll:
S.Das.
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The tag <ejb-link> when specified, must point to your bean name, the same specified at you bean name tag at ejb-jar.jar.
Claudio Gualberto
SCJP 1.4
 
B Das
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for ur reply , I tried it out ..but still no sucess..
the entity ejb jar has ejb-name UserEJB in ejb-jar.xml
the session ejb jar 's ejb-jar.xml has to lookup this..
i tried out
<ejb-local-ref>
<ejb-ref-name>LocalUser</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>LocalUserHome</local-home>
<local>LocalUser</local>
<ejb-link>UserEJB</ejb-link>
</ejb-local-ref>
in ejb-jar.xml of the session ejb.
but no success.if you could please correct me..thanks.
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic