Announcement Announcement Module
Collapse
No announcement yet.
Spring and EJB3 on JBoss Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring and EJB3 on JBoss

    Hi,

    Has anybody tried to Spring enable an EJB3 SLSB on JBOSS 4.0.4-GA?

    The bean(follow link below to se example) extends the AbstractStatelessSessionBean, but the onEjbCreate() is never invoked....
    Perhaps Spring 2.0 should be used instead?

    There should be great synergies between ejb3 and spring so I hope somebody has hammered this out....

    Any ideas, folks?

    The example tested is described at: http://debupanda.blogspot.com/2006/0...sion-bean.html

  • #2
    I am running JBoss 4.0.4 with Spring 2 and EJB 3 and what not.
    Very, very happy. Jboss + Spring - I love this marriage.
    Check out this JBoss/Spring integration forum
    http://www.jboss.org/index.html?modu...iewforum&f=223

    Comment


    • #3
      Spring deployer fails? Spring version problems??

      Hi,

      I use the spring deployer, but have problems with spring versions???
      NoSuchMethodError....

      Which version does the Spring Deployer require?

      Anybody?


      11:52:59,359 ERROR [URLDeploymentScanner] Incomplete Deployment listing:


      --- Incompletely deployed packages ---
      org.jboss.deployment.DeploymentInfo@ea67160d { url=file:/C:/tools/servers/jboss/jboss-4.0.4.GA/server/default/deploy/JBoss-Spring.ear }
      deployer: org.jboss.deployment.EARDeployer@608760
      status: Deployment FAILED reason: Could not create deployment: file:/C:/tools/servers/jboss/jboss-4.0.4.GA/server/default/tmp/deploy/tmp3097JBoss-Spring.ear-contents/spring-pojo.spring; - nested throwable: (java.lang.NoSuchMethodError: org.jboss.spring.factory.NamedXmlBeanDefinitionRea der.createReaderContext(Lorg/springframework/core/io/ResourceLorg/springframework/beans/factory/support/ReaderContext
      state: FAILED
      watch: file:/C:/tools/servers/jboss/jboss-4.0.4.GA/server/default/deploy/JBoss-Spring.ear
      altDD: null
      lastDeployed: 1155895475750
      lastModified: 1155895475562
      mbeans:

      Comment


      • #4
        It seems that you are not using the approapriate Spring Deployer version - the NoSuchMethodError is thrown for the org.jboss.spring package.

        Comment


        • #5
          Which versions to use?

          I use the 1.3 version(the latest) and the fixed example(1.3)
          Spring Deployer 1.3 [Notes] (2006-06-05 07:58)


          The Spring version I have is 2.0-RC2.


          Which versions match???

          Comment


          • #6
            I guess the jboss forums should provide more info. Since the release is made on 05-06 I would pick a Spring release before that date.
            Also see if the Spring Deployer supports Spring 2.0 or just Spring 1.2 (if not what's the issue)/.

            Comment


            • #7
              The Deployer's spring-core comes from spring-2.0-m3 release.
              It seems strange that this is not compatible with the 2.0-RC2 release?

              It would be great if someone had this working and could tell which versions are used, or sending a link to the deployer source so we can build it ourselves perhaps?

              Comment


              • #8
                The Deployer's spring-core comes from spring-2.0-m3 release.
                It seems strange that this is not compatible with the 2.0-RC2 release?
                I haven't used Spring Deployer myself but since 2.0-m3 quite a lot of things have changed (including signature updates). This is normal as the 2.0 is not a final release, hence the m3 is not even a release candidate.

                Comment


                • #9
                  ejbCreate not invoked

                  with ejb3 you have to use callback annotations. Example:

                  @PostConstruct
                  public void ejb3Create() {
                  setBeanFactoryLocator(ContextSingletonBeanFactoryL ocator.getInstance());
                  setBeanFactoryLocatorKey(PRIMARY_CONTEXT_ID);

                  try {
                  super.ejbCreate();
                  } catch (CreateException e) {
                  ....

                  }

                  Comment

                  Working...
                  X