[jboss-user] [JBossWS] - Re: Inject EJB problem in web service method !!

c_eric_ray do-not-reply at jboss.com
Thu Sep 28 15:51:24 EDT 2006


if you are using a java client point it to the TestSessionBean?wsdl and it should work. this way you get the bean isntantiated in the EJB container. if you don't reference the web service as a bean then you loose the EJB context and thus you loose the EJB supported injection. 

Same thing happens if you are injecting a @Resource or @PersistenceContext. it's the container that understands the annotations. so if the object is created in the wrong container the annotations are ignored.

i don't understand the details of how this works, but i do know that the container is very important and i'm sure the jboss web service container doesn't undestand @EJB, but the EJB container does.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3975017#3975017

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3975017



More information about the jboss-user mailing list