Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-836

Enricher does not lookup EJB successfully unless the name of deployed archive is "test" or beanName/mappedName attribute is set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 2.0.0.Beta1
    • 1.0.0.CR7
    • None
    • None
    • Hide

      Explicitly name the archive "test" or use beanName/mappedName attribute.

      Show
      Explicitly name the archive "test" or use beanName/mappedName attribute.

    Description

      The problem is in the way jndiNames array is constructed if beanName or mappedName attribute of @EJB annotation is not set.

      For following SLSB with no-interface view...

      @Stateless
      public class Foo {
        public void ping() {
        }
      }
      

      ... EJBInjectionEnricher tries to lookup following JNDI names:

      java:global/test.ear/test/FooBean, 
      java:global/test.ear/test/Foo, 
      java:global/test/Foo, 
      java:global/test/FooBean, 
      java:global/test/Foo/no-interface, 
      test/FooBean/local, 
      test/FooBean/remote, 
      test/Foo/no-interface, 
      FooBean/local, 
      FooBean/remote, 
      Foo/no-interface, 
      ejblocal:com.acme.ejb.Foo, 
      com.acme.ejb.Foo,
      

      Parts like "java:global/test.ear/test/" and "java:global/test/" are hard coded. So if the name of the test archive is not "test" the SLSB is not found.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mkouba@redhat.com Martin Kouba
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: