File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Explain why this IS working(RAD 7 +EJB 2.1)

 
Duran Harris
Ranch Hand
Posts: 608
Eclipse IDE Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I've just managed to get a 2.1 EJB to work from a servlet(been struggling for a while).What I would like to know is how come it's working just fine when I haven't put an ejb-ref element in the web.xml.

This is what I've done:

Create EAR project
Create EJB project with EJB client jar(inside EAR)
Create Dynamic Web Project inside EAR.
Add client jar to web project's build path.
Create EJB reference

I'm guessing that having ejb-ref elements in the ejb-jar.xml is the reason why I dont need it in the web.xml..Anyone care to elaborate?
Also,I call remove on the ejb but I dont get any output(my ejbcreate method returns output though)
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33693
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Duran,
The ejb reference is good practice, but optional. Nothing prevents you from using the full JNDI name to call an EJB.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic