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 ...
Retrieving data ...