2010/3/25 Scott Ferguson <f...@caucho.com> > > Thanks. Can you add an <ejb-server/> to your resin.xml (inside the > <cluster>). > > That's a Resin bug because the <ejb-server/> wasn't supposed to be > required any more. > > -- Scott > > Thank you , it works !
public class HelloServlet extends HttpServlet { @EJB / @Inject both works private PersonService personService; Now I can inject into Servlet with @EJB and @Inject , though I don't know the difference , the console dump seems nothing different. BTW , what is the populated JNDI name of the Stateless Bean ? in my code : @Stateless(mappedName="ejb/personService") @Local(PersonService.class) public class PersonServiceImpl implements PersonService , Serializable But I cannot find this EJB in the InitialContext (under wicket) , it throws : Caused by: java.lang.RuntimeException: Could not locate ejb of class [[interface data.PersonService]] and name [[ejb/personService]] at org.wicketstuff.javaee.JavaEEBeanLocator.lookupEjb(JavaEEBeanLocator.java:131) at org.wicketstuff.javaee.JavaEEBeanLocator.locateProxyTarget(JavaEEBeanLocator.java:109) at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:412) at org.apache.wicket.proxy.$Proxy51.getPerson(Unknown Source) at wicket.CurrentPage.<init>(CurrentPage.java:33) ... 31 more Caused by: javax.naming.NameNotFoundException: java:comp/env/ejb/personService at com.caucho.naming.ContextImpl.lookupImpl(ContextImpl.java:205) at com.caucho.naming.ContextImpl.lookup(ContextImpl.java:157) at javax.naming.InitialContext.lookup(InitialContext.java:392) at org.wicketstuff.javaee.JavaEEBeanLocator.lookupEjb(JavaEEBeanLocator.java:124) ... 35 more Where goes wrong ? Isn't the mappedName="ejb/personService" hooked into "java:comp/env" ? Why resin (4.0.4) throws NameNotFoundException ?
_______________________________________________ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest