code: @Override
     public void close(Object c) throws ResourceException
     {
        if (enableClose && c != null)
        {
           if (c instanceof javax.resource.cci.Connection)
           {
              try
              {
                 javax.resource.cci.Connection cci = (javax.resource.cci.Connection)c;
                 cci.close();
              }
              catch (ResourceException re)
              {
                 log.exceptionDuringConnectionClose(re);
                 throw new ResourceException(bundle.errorDuringConnectionClose(), re);
              }
           }
           else
           {
              try
              {
                 Method method = SecurityActions.getMethod(c.getClass(), closeMethod, (Class<?>[])null);
                 SecurityActions.setAccessible(method, true);
                 method.invoke(c, (Object[])null);
              }
              catch (Throwable t)
              {
                 log.debugf(t, "Error during connection %s()", closeMethod);
                 throw new ResourceException(bundle.errorDuringConnectionClose(), t);
              }
           }
        }
     }
docs: {@inheritDoc}