File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes Explain why this IS working(RAD 7 +EJB 2.1) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Explain why this IS working(RAD 7 +EJB 2.1)" Watch "Explain why this IS working(RAD 7 +EJB 2.1)" New topic

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

Duran Harris
Ranch Hand

Joined: Nov 09, 2008
Posts: 608

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)

===>SCJP 1.5(72%)<===
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33124

The ejb reference is good practice, but optional. Nothing prevents you from using the full JNDI name to call an EJB.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: Explain why this IS working(RAD 7 +EJB 2.1)
It's not a secret anymore!