3 Replies Latest reply on Apr 27, 2007 4:26 AM by alesj

    Some questions.

    gumnaam

      I checked the Wiki page , and it has no mention of editing ejb3-interceptors-aop.xml .
      The latest version of the spring deployer has no documentation nor any source code. I downloaded the previous ver. 1.4 which has wrong documentation.
      it says the Horoscope bean uses non AOP injection, by using the @CallBackListener annotation , but looking at the code, I see that the bean has @Interceptors(SpringLifecycleInterceptor.class) annotation.

      So what must I do here in order to get the spring deployer working.

      I got the part about putting jboss-spring-jdk5.jar in deploy directory. and adding spring jars in the lib directory.

      Do I need to edit the ejb3-interceptiors-aop.xml file ? I don't want to enable spring injection on all my beans, but just the ones I want to ineract spring with . Can I use the @Interceptor annotation instead ?





      thanks

        • 1. Re: Some questions.
          alesj

          There are two ways of using Spring injection with SpringDeployer.

          One is with JBoss AOP, which looks different containers - Session beans, MDBs, ... - and you don't need any EJB3. But in this case you need to modify / add some code in the mentioned -interceptors.xml file.

          Or you can use EJB3 Spring interceptor - but beans (bean factory) still need to be put under proper jndi name (this is done by deployer, but in case you use / need some other binding mechanism). No -interceptors.xml modification needed.

          • 2. Re: Some questions.
            gzhuye

            In order to use the latest spring-ejb deployer, I'm creating an EJB3 session and pojo class as a project deployed in Jboss-4.0.5.GA, put jboss-spring-jdk5.jar in deploy directory and adding spring jars in the lib directory, start jboss with the problem as following.

            my jar structure exactly like:

            FirstEJB3Tutorial.spring/
            org/
            acme/
            ~MyBean.class
            ~MyBean2.class
            META-INF/
            jboss-spring.xml
            jboss.xml


            It seems all docs on the site is outdate. Could you share some document for this installation? or contribute a little bit detailed info to help me out?

            00:49:00,963 ERROR [URLDeploymentScanner] Incomplete Deployment listing:

            --- Packages waiting for a deployer ---
            org.jboss.deployment.DeploymentInfo@6afec0a4 { url=file:/C:/Users/PaulHu/Jboss-4.0.5.GA/server/default/deploy/FirstEJB3Tutorial.spring }
            deployer: null
            status: null
            state: INIT_WAITING_DEPLOYER
            watch: file:/C:/Users/PaulHu/Jboss-4.0.5.GA/server/default/deploy/FirstEJB3Tutorial.spring
            altDD: null
            lastDeployed: 1177660140962
            lastModified: 1177660140959
            mbeans:

            • 3. Re: Some questions.
              alesj

              You are missing the actual deployer (structure).
              You need something like this:

              deploy --> jboss-spring.deployer
               --> jboss-spring-jdk5.jar
               --> META-INF --> jboss-service.xml
              


              In the jboss-service.xml there is a description of SpringDeployer.
              See the first version of deployer archive, at least for the structure.
              Then the new jboss-spring-jdk5.jar is just new code compatible with new Spring2.0 release.