[jboss-user] [EJB 3.0 Development] - Wrong JNDI context returned from EJB
Richard Opalka
do-not-reply at jboss.com
Wed Apr 14 05:48:17 EDT 2010
Richard Opalka [http://community.jboss.org/people/richard.opalka%40jboss.com] replied to the discussion
"Wrong JNDI context returned from EJB"
To view the discussion, visit: http://community.jboss.org/message/537334#537334
--------------------------------------------------------------
The situation is little bit more complicated.
*First of all I need to verify if the following usecase is valid.*
There's a *EJB3Bean* web service bean
with the following DD. It defines *boolean1* env entry.
<ejb-jar>
<enterprise-beans>
<session>
<ejb-name>EJB3Bean</ejb-name>
<ejb-class>org.jboss.test.ws.jaxws.ejb3Integration.injection.webservice.EJB3Bean</ejb-class>
* <env-entry>
<env-entry-name>boolean1</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>true</env-entry-value>
</env-entry>*
</session>
</enterprise-beans>
</ejb-jar>
There's a handler associated with this EJB3Bean
@WebService
*@HandlerChain(file = "jaxws-handler.xml")
*@Stateless
public class EJB3Bean extends AbstractEndpointImpl
{
public String echo(String msg)
{
return super.echo(msg) + ":EJB3Bean";
}
}
The content of jaxws-handler.xml is:
<handler-chains>
<handler-chain>
<handler>
<handler-name>TestHandler</handler-name>
* <handler-class>org.jboss.test.ws.jaxws.ejb3Integration.injection.shared.handlers.TestHandler</handler-class>
* </handler>
</handler-chain>
</handler-chains>
This TestHandler tries to access both EJB3Bean and it's env-entry
public final class TestHandler extends GenericSOAPHandler {
* @Resource private Boolean boolean1;
@EJB private BeanIface bean1;*
...
}**
Using global JNDI I'm able to fix @EJB injection.
*Question for EJB3 team:*
Do you think this JAX-WS handler should see env-entry of EJB3Bean?
That would mean required access to EJB3Bean specific JNDI context (the reason why we're using it instead of global JNDI).
I'll double check JAX-WS and EE6 specification for clarification, but would like to know your opinion ;)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/537334#537334]
Start a new discussion in EJB 3.0 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2030]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100414/ff56b530/attachment.html
More information about the jboss-user
mailing list