• Post Reply Bookmark Topic Watch Topic
  • New Topic

Confusion calling stateless EJB3 in enterprise app

 
Mike Litherland
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm playing with EJB3 in an trivial enterprise application. Basically I'm using JSF to implement a simple calculator interface and trying to get a stateless EJB3 to do the work. I've created the front end and the back end, but when I try to lookup the EJB from the JSF managed bean I get a stack overflow exception. It's pretty clear that there's something wrong with how I'm referencing the EJB from faces, but I don't know what. This is my lookup code:



This is a snippit of the exception that the lookup line generates:



This is the EJB reference code in the web.xml:



(Note that I had to add that home line, and I'm not sure what value I should put in that line.)

And here is the reference from my jboss-web.xml:



For the record I'm using JBoss 4.0.4GA and I'm trying to use a daily build of NetBeans 5.5 for development (has some nice bug-fixes over the beta).

I get the feeling that the problem lies somewhere in that XML i posted above. Can anybody help?

Thanks much,
Mike
 
Mike Litherland
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It never, ever fails. As soon as I post a query here on javaranch I figure out the solution. I'll post it here for posterity's sake. Basically I got rid of all the ejb-ref code from both web.xml and jboss-web.xml, then I just needed to change my context lookup to this:



Where CalcTest2 is the ear name, CalcBean the EJB and remote for the interface. That's it, and it works now.

Thanks for anybody that may have taken the time to look at this.
Mike
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!