-
Jun 8th, 2009, 02:22 AM
#1
Spring unit testing EJB with mappedName
I have an EJB with a reference to another EJB through @EJB annotation +mappedName attribute.
When I try to unit test the EJB out-of-container using SpringJUnit4ClassRunner, autowiring the bean causes Spring to try to look up the referenced bean from JNDI. Spring documentation states this is done by default because of the mappedName attribute.
Is there a nice way to change this behaviour, to inject a bean from application context and not lookup from JNDI? Or what would be the proper workaround?
-
Feb 9th, 2012, 08:20 AM
#2
I am also struck on same problem.
Did you find any solution so far.
Ravi
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules