Results 1 to 5 of 5

Thread: EJB3 SpringBeanAutowiringInterceptor and SessionContext, No unique bean defined

  1. #1
    Join Date
    Aug 2006
    Posts
    1

    Default 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.

  2. #2

    Default

    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.

  3. #3

    Default

    Hi Banifu,

    I'm also experiencing the same thing using the @EJB annotation. Did you find a solution to your problem?

  4. #4

    Default

    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.

  5. #5

    Default 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
  •