It's not a secret anymore!*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
Similar Threads
first app
How to inject EJB beans with Spring DI.
Problem running app under Tomcat v7
No unique bean of type [javax.persistence.EntityManagerFactory] is defined: expected single bean but
Empty Ajax response with Spring 3 and jQuery