use of com.sun.enterprise.deployment.node.MethodNode in project Payara by payara.
the class ConcurrentMethodNode method writeDescriptor.
@Override
public Node writeDescriptor(Node parent, String nodeName, ConcurrentMethodDescriptor desc) {
Node concurrentNode = super.writeDescriptor(parent, nodeName, descriptor);
MethodNode methodNode = new MethodNode();
methodNode.writeJavaMethodDescriptor(concurrentNode, EjbTagNames.METHOD, desc.getConcurrentMethod());
if (desc.hasLockMetadata()) {
String lockType = desc.isWriteLocked() ? "Write" : "Read";
appendTextChild(concurrentNode, EjbTagNames.CONCURRENT_LOCK, lockType);
}
if (desc.hasAccessTimeout()) {
TimeoutValueNode timeoutValueNode = new TimeoutValueNode();
TimeoutValueDescriptor timeoutDesc = new TimeoutValueDescriptor();
timeoutDesc.setValue(desc.getAccessTimeoutValue());
timeoutDesc.setUnit(desc.getAccessTimeoutUnit());
timeoutValueNode.writeDescriptor(concurrentNode, EjbTagNames.CONCURRENT_ACCESS_TIMEOUT, timeoutDesc);
}
return concurrentNode;
}
use of com.sun.enterprise.deployment.node.MethodNode in project Payara by payara.
the class MessageNode method writeDescriptor.
/**
* write the descriptor class to a DOM tree and return it
*
* @param parent node for the DOM tree
* @param node name for
* @param the descriptor to write
* @return the DOM tree top node
*/
public Node writeDescriptor(Node parent, String nodeName, MessageDescriptor messageDesc) {
Node messageNode = super.writeDescriptor(parent, nodeName, messageDesc);
// to a method descriptor with "*" as name
if (messageDesc.getOperationName() == null && messageDesc.getMethodDescriptor() == null) {
MethodDescriptor allMethodDesc = new MethodDescriptor();
allMethodDesc.setName(ALL_METHODS);
messageDesc.setMethodDescriptor(allMethodDesc);
}
// java-method
MethodDescriptor methodDesc = messageDesc.getMethodDescriptor();
if (methodDesc != null) {
MethodNode methodNode = new MethodNode();
methodNode.writeJavaMethodDescriptor(messageNode, RuntimeTagNames.JAVA_METHOD, methodDesc);
}
// operation-name
appendTextChild(messageNode, WebServicesTagNames.OPERATION_NAME, messageDesc.getOperationName());
return messageNode;
}
use of com.sun.enterprise.deployment.node.MethodNode in project Payara by payara.
the class EjbRemoveNode method writeDescriptor.
@Override
public Node writeDescriptor(Node parent, String nodeName, EjbRemovalInfo descriptor) {
Node removeNode = appendChild(parent, nodeName);
MethodNode methodNode = new MethodNode();
methodNode.writeJavaMethodDescriptor(removeNode, EjbTagNames.REMOVE_BEAN_METHOD, descriptor.getRemoveMethod());
appendTextChild(removeNode, EjbTagNames.REMOVE_RETAIN_IF_EXCEPTION, Boolean.toString(descriptor.getRetainIfException()));
return removeNode;
}
use of com.sun.enterprise.deployment.node.MethodNode in project Payara by payara.
the class InterceptorBindingNode method writeTotalOrdering.
private void writeTotalOrdering(Node parent, List<EjbInterceptor> interceptors, EjbDescriptor ejbDesc, MethodDescriptor method) {
Node bindingNode = appendChild(parent, EjbTagNames.INTERCEPTOR_BINDING);
appendTextChild(bindingNode, EjbTagNames.EJB_NAME, ejbDesc.getName());
Node totalOrderingNode = appendChild(bindingNode, EjbTagNames.INTERCEPTOR_ORDER);
for (EjbInterceptor next : interceptors) {
appendTextChild(totalOrderingNode, EjbTagNames.INTERCEPTOR_CLASS, next.getInterceptorClassName());
}
if (method != null) {
MethodNode methodNode = new MethodNode();
// Write out method description. void methods will be written
// out using an empty method-params element so they will not
// be interpreted as overloaded when processed.
methodNode.writeJavaMethodDescriptor(bindingNode, EjbTagNames.INTERCEPTOR_BUSINESS_METHOD, method, true);
}
}
use of com.sun.enterprise.deployment.node.MethodNode in project Payara by payara.
the class InterceptorBindingNode method writeExclusionBinding.
private void writeExclusionBinding(Node parent, EjbDescriptor ejbDesc, MethodDescriptor method) {
Node bindingNode = appendChild(parent, EjbTagNames.INTERCEPTOR_BINDING);
appendTextChild(bindingNode, EjbTagNames.EJB_NAME, ejbDesc.getName());
appendTextChild(bindingNode, EjbTagNames.EXCLUDE_CLASS_INTERCEPTORS, "true");
MethodNode methodNode = new MethodNode();
// Write out method description. void methods will be written
// out using an empty method-params element so they will not
// be interpreted as overloaded when processed.
methodNode.writeJavaMethodDescriptor(bindingNode, EjbTagNames.INTERCEPTOR_BUSINESS_METHOD, method, true);
}
Aggregations