cedricceler [
https://community.jboss.org/people/cedricceler] created the discussion
"Problems with resource injection in EJBs"
To view the discussion, visit:
https://community.jboss.org/message/734750#734750
--------------------------------------------------------------
Hi guys,
Im having troubles to get my connection factory using annotation resource.
It works well with the JNDI lookup but it does not with the annotation, my connection
factory is null.
This is my code with the JNDI lookup (works) :
ConnectionFactory factory =
(ConnectionFactory)context.lookup("/ConnectionFactory");
This is my code with the annotation :
/** The connection factory. */
@Resource(mappedName = "java:/ConnectionFactory")
private ConnectionFactory factory;
I ve tried with different mappedName as : /ConnectionFactory, java:/JmsXA, JmsXA etc. but
still nullpointerexception :-/.
If someone has an idea ...
Thx !
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/734750#734750]
Start a new discussion in EJB3 Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]