-
Mar 31st, 2008, 01:32 PM
#1
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
#2
Hello stojcevicht,
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
#3
Hi Banifu,
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
#4
Hi Viggo,
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
#5
EJB3 + Spring
Hi,
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):
http://jira.codehaus.org/browse/ENUNCIATE-229
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