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;
}
Aggregations