6 Replies Latest reply on Sep 21, 2011 9:29 AM by rjbaty

    EJB Endpoint in a WAR in JBossAS 7?

    rjbaty

      Wondering if anyone has tried to create a EJB3-based endpoint in a WAR with Java EE 6.0 on JBossAS 7.0.0.Final?  I had some EJB3 endpoints in a standalone Jar module and I've been playing around with moving them into a WAR.  For some reason the CXF runtime doesn't seem to read them from my jboss-cxf.xml file and manage them when they are in a WAR.

       

      I am wondering if the

       

      <jaxws:invoker>
              <bean class='org.jboss.wsf.stack.cxf.InvokerEJB3'/>
      </jaxws:invoker>
      

       

      configuration in the jboss-cxf.xml file won't work when running in a WAR maybe?

       

      Robert

        • 1. Re: EJB Endpoint in a WAR in JBossAS 7?
          ropalka

          Hi Robert,

           

             In AS7 this have changed.

          Just remove jaxws:invoker element from your config.

           

          Rio

          • 2. Re: EJB Endpoint in a WAR in JBossAS 7?
            rjbaty

            Ok thanks Rio,

            After messing around with it I realized I might have the jboss-cxf.xml file in the wrong spot.  For EJB endpoints in a WAR does that go in META-INF at the root of the WAR or should I use the standard WEB-INF directory?  Also if I have both POJO and EJB endpoints in a WAR would I need 2 jboss-cxf.xml files (one in META-INF and one in WEB-INF)?

             

            Robert

            • 3. Re: EJB Endpoint in a WAR in JBossAS 7?
              asoldano

              Hi Robert,

              your case falls into a more general development topic I'm starting to deal currently, ie. fully supporting "mixed" deployment, with both ejb3 and pojo endpoints in war archives.

              As a workaround, in the mean time, you can have ejb3 endpoints and pojo endpoints in separate archives.

              • 4. Re: EJB Endpoint in a WAR in JBossAS 7?
                rjbaty

                Alessio,

                I think the "mixed" deployment is the issue here, you are correct.  I'm going to refactor this back to the way I used to have it (WAR endpoints and EJB enpdoints in separate archives) and just ensure everything is working on AS7.  I'll keep an eye to see if this functionality is available in an upcoming JBossWS-CXF release.

                 

                Robert

                • 5. Re: EJB Endpoint in a WAR in JBossAS 7?
                  asoldano

                  Just a quick follow-up, this feature has been implemented and shipped as part of jbossws-cxf-4.0.0.Beta4, soon to be released in a JBoss AS 7 new version.

                  • 6. Re: EJB Endpoint in a WAR in JBossAS 7?
                    rjbaty

                    Excellent, thanks.  I'll look for that in the next JBoss AS 7 release and give it a try again.