File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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