Hi,
I'm trying to lookup a local session bean, but keep getting NameNotFoundException.
in my bean interface i have :
@Local
public interface InsurabilityFacade {...
In the implementation :
@Stateless(name="InsurabilityFacade")
public class InsurabilityFacadeImpl implements InsurabilityFacade {...
In my webservice endpoint, where i lookup the bean i have :
@EJB(name="InsurabilityFacade", beanInterface=InsurabilityFacade.class)
(also tried @EJB private InsurabilityFacade insurabilityFacade; )
I thought that would have the stateless session bean in the insurabilityFacade object. But the object remains null.
Shouldn't the @EJB do the lookup ?
Not only, i have to do the lookup explicitly as:
insurabilityFacade = (InsurabilityFacade)context.lookup("ejb/InsurabilityFacade");
I also have to have an entry in my web.xml
<ejb-local-ref>
<ejb-ref-name>ejb/InsurabilityFacade</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>be.cm.apps.insurability.business.InsurabilityFacade</local>
</ejb-local-ref>
Can't i us my session bean in my webservice endpoint without the explicit lookup and the entry in the web.xml ?
Grtz,
Chris.
I'm trying to lookup a local session bean, but keep getting NameNotFoundException.
in my bean interface i have :
@Local
public interface InsurabilityFacade {...
In the implementation :
@Stateless(name="InsurabilityFacade")
public class InsurabilityFacadeImpl implements InsurabilityFacade {...
In my webservice endpoint, where i lookup the bean i have :
@EJB(name="InsurabilityFacade", beanInterface=InsurabilityFacade.class)
(also tried @EJB private InsurabilityFacade insurabilityFacade; )
I thought that would have the stateless session bean in the insurabilityFacade object. But the object remains null.
Shouldn't the @EJB do the lookup ?
Not only, i have to do the lookup explicitly as:
insurabilityFacade = (InsurabilityFacade)context.lookup("ejb/InsurabilityFacade");
I also have to have an entry in my web.xml
<ejb-local-ref>
<ejb-ref-name>ejb/InsurabilityFacade</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local>be.cm.apps.insurability.business.InsurabilityFacade</local>
</ejb-local-ref>
Can't i us my session bean in my webservice endpoint without the explicit lookup and the entry in the web.xml ?
Grtz,
Chris.