This week's giveaways are in the MongoDB and Jobs Discussion forums.
We're giving away four copies of Mongo DB Applied Patterns and 4 resume reviews from Five Year Itch and have the authors/reps on-line!
See this thread and this one for details.
The moose likes JBoss and the fly likes How to inject EJB3 as constructor argument with Spring configuration Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of Mongo DB Applied Patterns this week in the MongoDB forum
or a resume review from Five Year Itch in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss
Reply 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: 204
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to inject EJB3 as constructor argument with Spring configuration
 
Similar Threads
Problem running app under Tomcat v7
How to inject EJB beans with Spring DI.
No unique bean of type [javax.persistence.EntityManagerFactory] is defined: expected single bean but
Empty Ajax response with Spring 3 and jQuery
first app