Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-2205

The sort method in References removes entries

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Auto Closed
    • None
    • None
    • None

    Description

      This is a bug in openejb.

      The sort method in References https://git-wip-us.apache.org/repos/asf?p=tomee.git;a=blob;f=container/openejb-core/src/main/java/org/apache/openejb/util/References.java;hb=bf929780ae384de305388594c7227c73a3193f9a converts the List to a LinkedHashMap and this may (and actually does!) lead to removing entries. The issue was introduced probably here: https://git-wip-us.apache.org/repos/asf?p=tomee.git;a=commitdiff;h=0093a759f19f59397011d9075d1eb1c916cff9cb .

       

      I do not know at how many places it is used, but here is my problem with it: I have two pojects/EJBs and want to test them using openejb. Each project has its own bean (Startup + Singleton), but those 2 beans have the same class name. To be able to start the container I had to use something like

      System.setProperty("openejb.jndiname.format", "{moduleId}/{deploymentId}{interfaceType.annotationName}");
      

      . Now both beans are detected, but only the second one is started. The first one is lost in the sort method.

      Attachments

        Activity

          People

            Unassigned Unassigned
            green.dale1924 Dale Green
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: