Mar 31st, 2008, 01:32 PM
EJB3 SpringBeanAutowiringInterceptor and SessionContext, No unique bean defined
I've got a stateless session bean. Spring injection is working fine for spring beans using org.springframework.ejb.interceptor.SpringBeanAuto wiringInterceptor
However, if I add the following which works fine in another stateless session bean that does have any spring injections:
@Resource SessionContext ctx;
I get the following:
org.springframework.beans.factory.NoSuchBeanDefini tionException: No unique bean of type [javax.ejb.SessionContext] is defined: Unsatisfied dependency of type [interface javax.ejb.SessionContext]: expected at least 1 matching bean
It looks like spring is trying to inject a resource that should be injected by the ejb container.
Is this a bug or do I not have something configured correctly.
May 5th, 2008, 05:44 PM
I have the same Problem. However with @EJB annotation.
Did you solved the Problem?
I'm using springweblow 2.0.0.RC1 and spring 2.5.3.
Feb 24th, 2009, 05:07 PM
I'm also experiencing the same thing using the @EJB annotation. Did you find a solution to your problem?
Mar 4th, 2009, 02:26 AM
I did not find a solution. I also did not find a functioning sample with EJB3 and Spring. So I'm using now JPA. It's almost the same as EJB3. The drawback: I had to get rid of Enterprise Application.
There is a nice sample from Carol Mc Donald at java.net.
Mar 4th, 2009, 02:31 AM
EJB3 + Spring
I did the EJB3 + Spring combo when I tried to use it from an Enunciate generated web service. You can find the solution here (last comment):