code: @Override
      public Object getObjectInstance(final Object object, final Name name,
                                      final Context context, final Hashtable environment)
                      throws Exception {
  
          JmsConnectionFactory jmsConnectionFactory = null;
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.entry(this, TRACE, "getObjectInstance", new Object[] {
                                                                          object, name, context, environment });
          }
  
          if (object instanceof Reference) {
  
              final Reference reference = (Reference) object;
              final String clsName = reference.getClassName();
  
              if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) {
                  SibTr.debug(this, TRACE, "class name is " + clsName);
              }
  
              if ((JmsJcaManagedConnectionFactoryImpl.CONN_FACTORY_TYPE
                              .equals(clsName))
                  || (JmsJcaManagedQueueConnectionFactoryImpl.QUEUE_CONN_FACTORY_TYPE
                                  .equals(clsName))
                  || (JmsJcaManagedTopicConnectionFactoryImpl.TOPIC_CONN_FACTORY_TYPE
                                  .equals(clsName))) {
  
                  try {
  
                      jmsConnectionFactory = (JmsConnectionFactory) createConnectionFactory();
                      jmsConnectionFactory.setReference(reference);
  
                  } catch (final ResourceException exception) {
  
                      FFDCFilter.processException(exception, CLASS_NAME
                                                             + "getObjectInstance", FFDC_PROBE_6, this);
                      throw new ResourceAdapterInternalException(NLS
                                      .getFormattedMessage(
                                                           "EXCEPTION_RECEIVED_CWSJR1027",
                                                           new Object[] { exception,
                                                                         "getObjectInstance" }, null),
                                      exception);
  
                  }
              }
  
          }
  
          if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
              SibTr.exit(this, TRACE, "getObjectInstance", jmsConnectionFactory);
          }
          return jmsConnectionFactory;
  
      }
docs: Constructs an object factory which constructs a managed connection
  factory, calls the non-managed createConnectionFactory and then calls the
  setReference on the JMSConnFactory.
  
  @param object
  the referenceable object to be created
  @param name
  the name
  @param context
  the naming context
  @param environment
  the environment
  @return a JmsConnectionFactory or null if it could not obtain one.