Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-306

EJBs contained in an EAR are not accessible to WARs in the same EAR

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 7.0.0.CR1
    • 7.0.0.Beta2
    • EE, EJB
    • None

      In order to test m2eclipse-wtp, I usually use the multi-javaee5-archetype (mvn archetype:generate -DarchetypeCatalog=http://open-archetypes.googlecode.com/svn/snapshots-repository/archetype-catalog.xml) to create an EAR containing an EJB jar and a WAR referencing said EJB.
      The generated EAR deploys and runs on JBoss AS 5, 6, Glassfish 3.x but fails on deploying in JBoss AS 7 :

       Caused by: java.lang.ClassNotFoundException: foo.bar.demo.ejb.HelloService from [Module "deployment.demo-ear.ear.demo-web-0.0.1-SNAPSHOT.war:main" from Service Module Loader]

      It seems AS 7 strictly enforces the EE spec :

      (15:26:40) dmlloyd: EE.8.3.2
      (15:27:01) dmlloyd: portable applications must not depend on having or not having access to these classes or resources: The content of any EJB jar files included in the same ear file.

      I guess it would be practical if EJBs inside an EAR were still available to WARs from the same EAR, from a migration point of view first, and it would also allow projects to be deployed using m2eclipse-wtp/jboss tools out of the box :-D

            jaikiran Jaikiran Pai (Inactive)
            fbricon@redhat.com Fred Bricon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: