code: public Deployment findByJndi(String jndi)
     {
        for (Deployment d : deployments)
        {
           for (ConnectionFactory cf : d.getConnectionFactories())
           {
              if (cf.getJndiName().equals(jndi))
                 return d;
           }
           for (AdminObject ao : d.getAdminObjects())
           {
              if (ao.getJndiName().equals(jndi))
                 return d;
           }
        }
        return null;
     }
docs: {@inheritDoc}