Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes JBoss/WildFly and the fly likes How to inject EJB3 as constructor argument with Spring configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to inject EJB3 as constructor argument with Spring configuration" Watch "How to inject EJB3 as constructor argument with Spring configuration" New topic
Author

How to inject EJB3 as constructor argument with Spring configuration

sam White
Ranch Hand

Joined: Feb 18, 2011
Posts: 208
Hi,

I don't know how to inject an EJB3 bean into constructor parameter via Spring configuration.

Here is my controller:



CategoryManager.java is an Interface:


CategoryManagerImpl.java is a session bean:



mvc-dispatcher-servlet.xml file:


but the above jee: tag causes syntax error. However I think it is not right to use jnid-lookup for ejb3 bean in this case?

web.xml file:



Any suggestion is very appreciated.
Thanks
Sam
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to inject EJB3 as constructor argument with Spring configuration