glassfish
  1. glassfish
  2. GLASSFISH-20686

DynamicInterceptor.createMBean() throws wrong Exception

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1
    • Component/s: other
    • Labels:
      None
    • Environment:

      Windows x64.

      Description

      I found a bug earlier today trying to create an MBean in GlassFish. The "strange" method is com.sun.enterprise.v3.admin.DynamicInterceptor.createMBean(). When trying to create an MBean that already exists in the server I expected an InstanceAlreadyExistsException, but instead I got an MBeanException. This MBeanException had InstanceAlreadyExistsException as targetException/cause.

      According to the API I should get an InstanceAlreadyExistsException. Looking at the code it seems like the last lines catches all Exceptions and throw an MBeanException. It seems like if one of the functions called inside the try-block throws an InstanceAlreadyExistsException, it should just be passed on and not thrown as the cause of an MBeanException.

        Activity

        davidlindholm created issue -
        kumara made changes -
        Field Original Value New Value
        Assignee michael.y.chen [ michael.y.chen ] Tim Quinn [ tjquinn ]
        Component/s other [ 10611 ]
        Tim Quinn made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 4.0.1 [ 16061 ]
        Resolution Fixed [ 1 ]
        Romain Grécourt made changes -
        Fix Version/s 4.1 [ 16387 ]
        Fix Version/s 4.0.1 [ 16061 ]

          People

          • Assignee:
            Tim Quinn
            Reporter:
            davidlindholm
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: