3 Replies Latest reply on Feb 21, 2014 3:53 AM by wdfink

    sar archive unable to lookup ssb

    gte338m

      I have an ear file containing the following:

      ejb jar file

      war file

      sar file

       

      The war file is able to perform the jndi lookup for the ssb utilizing "java:module/BeanName!com.sts.ih.BeanNameRemote".

       

      However, the sar file is unable to use the "java:module/BeanName!com.sts.ih.BeanNameRemote".  When I use this I get NameNotFoundException.

      But if the sar file uses "java:global/earname/sarName.sar/BeanName!com.sts.ih.BeanNameRemote".

       

      Why am I not able to locate the ssb using the java:module version?

       

      Thanks

        • 1. Re: sar archive unable to lookup ssb
          wdfink

          The java:module is only possible inside the same module, war classloading is a bit different.

          If you use AS7 the bean should be deployed as java:app/<module name>, does this works?

          1 of 1 people found this helpful
          • 2. Re: sar archive unable to lookup ssb
            gte338m

            We are using Jboss EAP 6.   We were trying to use the java:module since it does not use the archive name b/c maven adds the SNAPSHOT version the name of the jar. If we use something other than java:module, we would have to change the jndi name in the code each time we changed the version.

             

            Also, the java:app does not work either.

             

            Thanks

            • 3. Re: sar archive unable to lookup ssb
              wdfink

              There are some posibilities to get rid of the maven version here (if that helps)

               

              Add this to the build of the ejb component (see here at line 62)

                  <build>

                      <finalName>${project.artifactId}</finalName>

                      <plugins> ...

               

              Also you can 'rename' it during the packaging of the EAR file, see here at line 82