3 Replies Latest reply on Oct 6, 2006 8:05 AM by apaeth

    jboss-spring.xml in ear?

    apaeth

      I have a very simple EJB test application that I've been working on that uses spring. I have been able to get spring working inside of jboss by simply placing the jboss-spring.xml inside the deploy directory. However, I have had no luck getting it to work in an ear file. My current ear,jar, and application.xml are as follows:

      sc.ear

       /META-INF
       application.xml
       sc_common.jar
       sc_ejb.jar
      


      sc_ejb.jar
      /META-INF
       jboss.xml
       ejbjar.xml
       jbosscmp-jdbc.xml
       _classes are here_


      application.xml
      <!DOCTYPE application PUBLIC
       "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
       "http://java.sun.com/dtd/application_1_3.dtd">
      
      <application>
       <display-name>Bundled Jars</display-name>
       <module>
       <ejb>sc_ejb.jar</ejb>
       </module>
       <module>
       <ejb>sc_common.jar</ejb>
       </module>
      </application>
      


      I've tried placing the jboss-spring.xml in the following locations:
      sc.ear/
      sc.ear/META-INF/
      sc.ear/sc_ejb/
      sc.ear/sc_ejb/META-INF


      no luck with any of these. The spring deployer never seems to see the jboss-spring.xml file.

      I'm curently using the 1.3 deployer (JDK 5 version), JDK 1.5, Spring 1.2 (soon to be 2.x), Jboss 4.0.3RC1

      Any help would be greatly appreciated.
      Thanks,
      Adam

        • 1. Re: jboss-spring.xml in ear?
          alesj

          Hmm ... will try to fix this.

          But for the moment put it in META-INF directory in <some name>.spring archive / directory inside ear.

          .ear
          - <somename2>.spring
          - META-INF
          - jboss-spring.xml

          • 2. Re: jboss-spring.xml in ear?
            alesj


            [somename].ear
            - [somename2].spring
            - META-INF
            - jboss-spring.xml

            • 3. Re: jboss-spring.xml in ear?
              apaeth

              I'm not sure why I didn't think of this sooner, but it seems to work if reference the jboss-spring.xml in the application.xml file...

              application.xml

              <application>
               <display-name>Bundled Jars</display-name>
               <module>
               <ejb>sc_ejb.jar</ejb>
               </module>
               <module>
               <ejb>sc_common.jar</ejb>
               </module>
               <module>
               <ejb>jboss-spring.xml</ejb>
               </module>
              </application>