Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Whats the need for the "ejb-ref" & "ejb-local-ref"?

 
Anthony Cheung
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can still call other ejbs after a JNDI lookup even if i don't use an ejb-local-ref tag?
Also, i get lookup exceptions when i use xdoclet generated util objects that use the COMP_NAME for lookup? How do i fix this? (I'm using jboss)
thanks
 
Anthony Cheung
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, i think i found out the problem
xdoclet generated the wrong COMP_NAME to use because i left out the "ref-name" tag.
and ejb-local-ref is required so the ejb is bound to java:comp namespace
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can still call other ejbs after a JNDI lookup even if i don't use an ejb-local-ref tag?

The ejb-ref and ejb-local-ref mappings are intended for avoiding hardcoded JNDI names within your EJB code. So, you can access other EJBs via their real JNDI name even if you haven't added ejb-ref's for them, but you can't use logical/private JNDI names for the lookup without those mappings.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic