Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-7772

Definition of <env-entry> is not bound via @Resource when bean does not specify the same name as its interface

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • EAP 6.0.0 DR 8
    • EJB
    • None
    • Retesting with night build and started to work.
    • NEW

      When there is an <env-entry> specified for a bean in ejb-jar.xml file. The bean has to be named with the same name as the name of its interface it is. Otherwise the @Resource annotation does not bind the value from env-entry.
      It means that this code does not work

      @Stateless
      public class SharedBean implements Shared {
          @Resource(name = "strWho")
          String strWho;
          ...
      

      For working it has to be specified like:

      @Stateless(name = "Shared")
      public class SharedBean implements Shared {
          @Resource(name = "strWho")
          String strWho;
          ...
      

      Test on:
      https://github.com/ochaloup/jboss-as/tree/JBQA-5483-test-migration-enventry-shared

              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              ochaloup@redhat.com Ondrej Chaloupka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: