Package org.glassfish.deployment.common

Examples of org.glassfish.deployment.common.Descriptor


 
                FieldDescriptor primField =
              ((EjbCMPEntityDescriptor)descriptor).getPrimaryKeyFieldDesc();
 
                // primField must exist in order to be valid & pass test
                Descriptor persistentField;
                Field field;
                Set persistentFields =
              ((EjbCMPEntityDescriptor)descriptor).getPersistenceDescriptor().getCMPFields();
                Iterator iterator = persistentFields.iterator();
                boolean foundMatch = false;
                while (iterator.hasNext()) {
              persistentField = (Descriptor)iterator.next();
              if (primField != null) {
                  if (primField.getName().equals(persistentField.getName())) {
                      foundMatch = true;
                      break;
                  } else {
                      continue;
                  }
View Full Code Here


    // to enterprise beans' remote or home interfaces.
    Set persistentFields =
        ((EjbCMPEntityDescriptor)descriptor).getPersistenceDescriptor().getCMPFields();
    Iterator iterator = persistentFields.iterator();
     
    Descriptor persistentField;
    Field field;
    boolean oneFailed = false;
    while (iterator.hasNext()) {
        persistentField = (Descriptor)iterator.next();
        boolean foundField = false;
        try {                                           
      Class c = Class.forName(descriptor.getEjbClassName(), false, getVerifierContext().getClassLoader());
      // start do while loop here....
      do {
          try {                                           
              Field f = c.getDeclaredField(persistentField.getName());
              foundField = true;
              Class persistentFieldClassType = f.getType();

        if(descriptor.getHomeClassName() != null && !"".equals(descriptor.getHomeClassName()) &&
           descriptor.getRemoteClassName() != null && !"".equals(descriptor.getRemoteClassName())) {
View Full Code Here

  Result result = getInitializedResult();
  ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();

        Class c = loadEjbClass(descriptor, result);
        if (c!=null) {
            Descriptor persistentField;
      boolean oneFailed = false;
           
            Set persistentFields = descriptor.getPersistenceDescriptor().getCMPFields();
            Iterator iterator = persistentFields.iterator();
      if (iterator.hasNext()) {     
View Full Code Here

    try {
        VerifierTestContext context = getVerifierContext();
        ClassLoader jcl = context.getClassLoader();
        Class c = Class.forName(descriptor.getEjbClassName(), false, getVerifierContext().getClassLoader());

        Descriptor persistentField;
        Field field;
        boolean oneFailed = false;
        while (iterator.hasNext()) {
      persistentField = (Descriptor)iterator.next();
      try {
          field = c.getField(persistentField.getName());
          result.addGoodDetails(smh.getLocalString
              ("tests.componentNameConstructor",
               "For [ {0} ]",
               new Object[] {compName.toString()}));
          result.passed(smh.getLocalString
View Full Code Here

                        }
                    }
                }
                // we have the list of handler classes, we can now
                // push the context and call back annotation processing.                               
                Descriptor jndiContainer=null;
                if (serviceSideChain) {
                    WebServiceEndpoint endpoint = (WebServiceEndpoint) container;
                    if (DOLUtils.warType().equals(endpoint.getBundleDescriptor().getModuleType())) {
                        jndiContainer = endpoint.getBundleDescriptor();                
                    } else {
View Full Code Here

            // Make jndi name flat so it won't result in the creation of
            // a bunch of sub-contexts.
            String flattedJndiName = ejbEnv.getJndiName().replace('/', '.');

            EjbBundleDescriptor ejbBundle = ejbEnv.getEjbBundleDescriptor();
            Descriptor d = ejbBundle.getModuleDescriptor().getDescriptor();
            // if this EJB is in a war file, use the same component ID
            // as the web bundle, because they share the same JNDI namespace
            if (d instanceof WebBundleDescriptor) {
                // copy of code below
                WebBundleDescriptor webEnv = (WebBundleDescriptor) d;
View Full Code Here

                        }
                    }
                }
                // we have the list of handler classes, we can now
                // push the context and call back annotation processing.                               
                Descriptor jndiContainer=null;
                if (serviceSideChain) {
                    WebServiceEndpoint endpoint = (WebServiceEndpoint) container;
                    if (DOLUtils.warType().equals(endpoint.getBundleDescriptor().getModuleType())) {
                        jndiContainer = endpoint.getBundleDescriptor();                
                    } else {
View Full Code Here

        AdministeredObjectDefinitionNode administeredObjectDefinitionNode = new AdministeredObjectDefinitionNode();
        JMSConnectionFactoryDefinitionNode jmsConnectionFactoryDefinitionNode = new JMSConnectionFactoryDefinitionNode();
        JMSDestinationDefinitionNode jmsDestinationDefinitionNode = new JMSDestinationDefinitionNode();

        for(;descriptorIterator.hasNext();){
            Descriptor descriptor = descriptorIterator.next();

            if(descriptor.getResourceType().equals(JavaEEResourceType.DSD)) {
                DataSourceDefinitionDescriptor next = (DataSourceDefinitionDescriptor)descriptor;
                dataSourceDefinitionNode.writeDescriptor(parentNode, TagNames.DATA_SOURCE, next);
            } else if(descriptor.getResourceType().equals(JavaEEResourceType.MSD)) {
                MailSessionDescriptor next = (MailSessionDescriptor)descriptor;
                mailSessionNode.writeDescriptor(parentNode, TagNames.MAIL_SESSION, next);
            } else if(descriptor.getResourceType().equals(JavaEEResourceType.CRD)) {
                ConnectorResourceDefinitionDescriptor next = (ConnectorResourceDefinitionDescriptor)descriptor;
                connectorResourceDefinitionNode.writeDescriptor(parentNode, TagNames.CONNECTOR_RESOURCE, next);
            } else if(descriptor.getResourceType().equals(JavaEEResourceType.AODD)) {
                AdministeredObjectDefinitionDescriptor next = (AdministeredObjectDefinitionDescriptor)descriptor;
                administeredObjectDefinitionNode.writeDescriptor(parentNode, TagNames.ADMINISTERED_OBJECT, next);
            } else if(descriptor.getResourceType().equals(JavaEEResourceType.JMSCFDD)) {
                JMSConnectionFactoryDefinitionDescriptor next = (JMSConnectionFactoryDefinitionDescriptor)descriptor;
                jmsConnectionFactoryDefinitionNode.writeDescriptor(parentNode, TagNames.JMS_CONNECTION_FACTORY, next);
            } else if(descriptor.getResourceType().equals(JavaEEResourceType.JMSDD)) {
                JMSDestinationDefinitionDescriptor next = (JMSDestinationDefinitionDescriptor)descriptor;
                jmsDestinationDefinitionNode.writeDescriptor(parentNode, TagNames.JMS_DESTINATION, next);
            }
        }
    }
View Full Code Here

     * notify of a new prefix mapping used in this document
     */
    public void addPrefixMapping(String prefix, String uri) {
        Object o = getDescriptor();
        if (o instanceof Descriptor) {
            Descriptor descriptor = (Descriptor) o;
            descriptor.addPrefixMapping(prefix, uri);
        }
    }       
View Full Code Here

            // Make jndi name flat so it won't result in the creation of
            // a bunch of sub-contexts.
            String flattedJndiName = ejbEnv.getJndiName().replace('/', '.');

            EjbBundleDescriptor ejbBundle = ejbEnv.getEjbBundleDescriptor();
            Descriptor d = ejbBundle.getModuleDescriptor().getDescriptor();
            // if this EJB is in a war file, use the same component ID
            // as the web bundle, because they share the same JNDI namespace
            if (d instanceof WebBundleDescriptor) {
                // copy of code below
                WebBundleDescriptor webEnv = (WebBundleDescriptor) d;
View Full Code Here

TOP

Related Classes of org.glassfish.deployment.common.Descriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.