[jboss-user] [EJB 3.0] - Can't inject resource when not using Servlet

rnicholson10 do-not-reply at jboss.com
Mon Mar 2 09:48:48 EST 2009


I have several servlets and can inject properties easily like follows:

	@Resource(name="ConnectionFactory", mappedName="ConnectionFactory")
	private ConnectionFactory connectionFactory;
	
	@Resource(name="queue/out", mappedName="queue/out")
	private Destination out;
	
But if I try to use a simple POJO and inject the resources it fails to work. I know the solution to this must be simple but for the life of me I can't find the answer.

Thanks,

Ross

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

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



More information about the jboss-user mailing list