users@glassfish.java.net

Re: ejb 3.0 problems

From: <glassfish_at_javadesktop.org>
Date: Wed, 26 Mar 2008 10:33:38 PST

Hi Dru,

If you remove the @Stateless annotation from the bean class and it's not defined as a bean in a corresponding ejb-jar.xml it won't be recognized as an enterprise bean component.

Regarding access to a bean's local interface, which exact kind of class is attempting to acquire the reference? Since it's a stateless session bean, injection into the servlet class is a good option.
Just add the @EJB <LocalIntfType> fieldName; to the Servlet class. There are alternatives listed in our EJB FAQ as well :

https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#POJOLocalEJB

 --ken
[Message sent by forum member 'ksak' (ksak)]

http://forums.java.net/jive/thread.jspa?messageID=266013