Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1498

RARDeployment throws incorrect IllegalArgumentException for underlying ManagedConnectionFactory exceptions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • JBossAS-4.0.3 Final
    • JBossAS-3.2.5 Final, JBossAS-4.0.0 Final, JBossAS-4.0.1RC1, JBossAS-3.2.6 Final, JBossAS-3.2.7 Final, JBossAS-4.0.1 Final, JBossAS-4.0.1 SP1
    • JCA service
    • None

    Description

      In org.jboss.resource.connectionmanager.RARDeployment.setManagedConnectionFactoryAttribute(String name, Class clazz, Object value, boolean mustExist)

      try
      {
      setter.invoke(mcf, new Object[]

      {value}

      );
      log.debug("set property " + name + " to value " + value);
      }
      catch (Exception e)
      {
      String error = "Unable to invoke setter method '" + setter + "' " + "on object '" + mcf + "'";
      if (mustExist)
      throw new IllegalArgumentException(error);
      else

      { log.trace(error); return; }

      }

      When ANY exception is caught from an invocation of the ManagedConnectionFactory's setter method an IllegalArgumentException is thrown. This can be misleading depending on the actual exception thrown from the ManagedConnectionFactory's setter (see SalesForce case#00003103).

      Either the underlying exception should be wrapped in a org.jboss.resource.JBossResourceException and thrown or the underlying exception should be logged inline or both. In the case of an InvocationTargetException the target exception could be wrapped/logged/etc.

      Attachments

        Issue Links

          Activity

            People

              adrian.brock Adrian Brock (Inactive)
              jimm_jira jimm (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: