This content has been marked as final.
Show 3 replies
-
1. Re: How do I use a JNDI entry in my application running on WildFly?
ctomc Aug 28, 2015 6:22 AM (in response to aroberts2)what kind of bean is the class you are trying to use @resource injection on?
that should work on EJB & CDI beans.
-
2. Re: How do I use a JNDI entry in my application running on WildFly?
aroberts2 Aug 30, 2015 9:41 PM (in response to ctomc)Thanks for the reply.
com.example.impl.MyApp is the implementation of com.example.MyApp which is a JAX-WS generated web service.
-
3. Re: How do I use a JNDI entry in my application running on WildFly?
aroberts2 Sep 6, 2015 8:41 PM (in response to aroberts2)Update: If I do the lookup in jboss-web.xml as follows:
<resource-env-ref>
<resource-env-ref-name>myId</resource-env-ref-name>
<resource-env-ref-type>java.lang.String</resource-env-ref-name>
<lookup-name>java:global/myId</lookup-name>
</resource-env-ref>
and remove the lookup from the annotation:
@Resource private
String myId;
myId is set as expected (the cxf tracing above still occurs).
What could be the reason for this?