code: public boolean activate() throws Exception
     {
        if (!activated)
        {
           if (adminObject instanceof ResourceAdapterAssociation)
           {
              if (!(adminObject instanceof Serializable &&
                    adminObject instanceof javax.resource.Referenceable))
              {
                 throw new Exception("TODO");
              }
           }
           else
           {
              if (!(adminObject instanceof javax.naming.Referenceable))
              {
                 DelegatorInvocationHandler dih = new DelegatorInvocationHandler(adminObject);
  
                 List<Class<?>> interfaces = new ArrayList<Class<?>>();
                 Class<?> clz = adminObject.getClass();
                 while (!clz.equals(Object.class))
                 {
                    Class<?>[] is = clz.getInterfaces();
                    if (is != null)
                    {
                       for (Class<?> interfaceClass : is)
                       {
                          if (!interfaceClass.equals(javax.resource.Referenceable.class) &&
                              !interfaceClass.equals(ResourceAdapterAssociation.class) &&
                              !interfaceClass.equals(java.io.Serializable.class) &&
                              !interfaceClass.equals(java.io.Externalizable.class))
                          {
                             if (!interfaces.contains(interfaceClass))
                                interfaces.add(interfaceClass);
                          }
                       }
                    }
  
                    clz = clz.getSuperclass();
                 }
  
                 interfaces.add(java.io.Serializable.class);
                 interfaces.add(javax.resource.Referenceable.class);
  
                 jndiObject = Proxy.newProxyInstance(SecurityActions.getClassLoader(adminObject.getClass()),
                                                     interfaces.toArray(new Class<?>[interfaces.size()]),
                                                     dih);
              }
           }
  
           if (jndiObject != null)
           {
              jndiStrategy.bind(jndiName, jndiObject);
           }
           else
           {
              jndiStrategy.bind(jndiName, adminObject);
           }
  
           activated = true;
           return true;
        }
  
        return false;
     }
docs: {@inheritDoc}