Announcement Announcement Module
Collapse
No announcement yet.
EJB3 SpringBeanAutowiringInterceptor and SessionContext, No unique bean defined Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment


    • #3
      Hi Banifu,

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

      Comment


      • #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.

        Comment


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

          Comment

          Working...
          X