Search in sources :

Example 21 with EjbSessionDescriptor

use of com.sun.enterprise.deployment.EjbSessionDescriptor in project Payara by payara.

the class EjbRefNode method writeDescriptor.

/**
 * write the descriptor class to a DOM tree and return it
 *
 * @param parent node for the DOM tree
 * @param node name for the descriptor
 * @param the descriptor to write
 * @return the DOM tree top node
 */
public Node writeDescriptor(Node parent, String nodeName, EjbReference ejbRef) {
    Node ejbRefNode = appendChild(parent, nodeName);
    appendTextChild(ejbRefNode, RuntimeTagNames.EJB_REFERENCE_NAME, ejbRef.getName());
    String jndiName = ejbRef.getJndiName();
    EjbDescriptor ejbReferee = ejbRef.getEjbDescriptor();
    // of the target ejb.
    if (ejbReferee != null) {
        if (!ejbRef.isLocal() && ejbRef.getType().equals(EjbSessionDescriptor.TYPE)) {
            EjbSessionDescriptor sessionDesc = (EjbSessionDescriptor) ejbReferee;
            String intf = ejbRef.isEJB30ClientView() ? ejbRef.getEjbInterface() : ejbRef.getEjbHomeInterface();
            jndiName = sessionDesc.getPortableJndiName(intf);
        }
    }
    appendTextChild(ejbRefNode, RuntimeTagNames.JNDI_NAME, jndiName);
    return ejbRefNode;
}
Also used : Node(org.w3c.dom.Node) DeploymentDescriptorNode(com.sun.enterprise.deployment.node.DeploymentDescriptorNode) EjbSessionDescriptor(com.sun.enterprise.deployment.EjbSessionDescriptor) EjbDescriptor(com.sun.enterprise.deployment.EjbDescriptor)

Aggregations

EjbSessionDescriptor (com.sun.enterprise.deployment.EjbSessionDescriptor)21 Result (com.sun.enterprise.tools.verifier.Result)14 ComponentNameConstructor (com.sun.enterprise.tools.verifier.tests.ComponentNameConstructor)14 EjbEntityDescriptor (org.glassfish.ejb.deployment.descriptor.EjbEntityDescriptor)12 Method (java.lang.reflect.Method)5 VerifierTestContext (com.sun.enterprise.tools.verifier.VerifierTestContext)4 HashSet (java.util.HashSet)3 EjbDescriptor (com.sun.enterprise.deployment.EjbDescriptor)2 EjbMessageBeanDescriptor (com.sun.enterprise.deployment.EjbMessageBeanDescriptor)2 DeploymentDescriptorNode (com.sun.enterprise.deployment.node.DeploymentDescriptorNode)2 BusinessInterfaceDescriptor (org.jboss.weld.ejb.spi.BusinessInterfaceDescriptor)2 Node (org.w3c.dom.Node)2 EjbIORConfigurationDescriptor (com.sun.enterprise.deployment.EjbIORConfigurationDescriptor)1 InjectionTarget (com.sun.enterprise.deployment.InjectionTarget)1 MethodDescriptor (com.sun.enterprise.deployment.MethodDescriptor)1 RunAsIdentityDescriptor (com.sun.enterprise.deployment.RunAsIdentityDescriptor)1 XMLElement (com.sun.enterprise.deployment.node.XMLElement)1 EjbRefNode (com.sun.enterprise.deployment.node.runtime.EjbRefNode)1 MessageDestinationRefNode (com.sun.enterprise.deployment.node.runtime.MessageDestinationRefNode)1 ResourceEnvRefNode (com.sun.enterprise.deployment.node.runtime.ResourceEnvRefNode)1