Uploaded image for project: 'OpenEJB'
  1. OpenEJB
  2. OPENEJB-712

issues with KeyedCollection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.7.0
    • 3.1.x
    • None
    • None

    Description

      The following used to work fine:

      EjbRef ref = new EjbRef();
      SessionBean.getEjbRef().add(ref);

      Now the following is required:

      EjbRef ref = new EjbRef();
      ref.setEjbRefName(<name>);
      SessionBean.getEjbRef().add(ref);

      because the reference name is used as a key in the KeyedCollection. If the reference name is not set first, a reference is added to the KeyedCollection with a null key. And if there are multiple references added this way, only the last one will be in the map.

      Maybe somekind of an exception should be thrown or a warning logged if a null key is used so that it would be easier to find problems like this?

      Attachments

        Activity

          People

            Unassigned Unassigned
            gawor@mcs.anl.gov Jarek Gawor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: