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

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0.0.CR7
    • Fix Version/s: 2.0.0.Beta1
    • Component/s: None
    • Labels:
      None
    • Workaround Description:
      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  mkouba Martin Kouba
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated: