ContainerTransactionNodepublic class ContainerTransactionNode extends DeploymentDescriptorNode This node is responsible for handling the container-transaction XML node |
Fields Summary |
---|
private String | trans_attribute | private String | description | private Vector | methods |
Constructors Summary |
---|
public ContainerTransactionNode()Creates new ContainerTransactionNode
registerElementHandler(new XMLElement(EjbTagNames.METHOD), MethodNode.class);
|
Methods Summary |
---|
public void | addDescriptor(java.lang.Object newDescriptor)Adds a new DOL descriptor instance to the descriptor instance associated with
this XMLNode
if (newDescriptor instanceof MethodDescriptor) {
methods.add(newDescriptor);
}
| public boolean | endElement(XMLElement element)receives notification of the end of an XML element by the Parser
boolean doneWithNode = super.endElement(element);
if (doneWithNode) {
ContainerTransaction ct = new ContainerTransaction(trans_attribute, description);
for (Iterator methodsIterator = methods.iterator();methodsIterator.hasNext();) {
MethodDescriptor md = (MethodDescriptor) methodsIterator.next();
EjbBundleDescriptor bundle = (EjbBundleDescriptor) getParentNode().getDescriptor();
EjbDescriptor ejb = bundle.getEjbByName(md.getEjbName(), true);
ejb.getMethodContainerTransactions().put(md, ct);
}
}
return doneWithNode;
| public java.lang.Object | getDescriptor()
return null;
| public void | setElementValue(XMLElement element, java.lang.String value)receives notiification of the value for a particular tag
if (EjbTagNames.DESCRIPTION.equals(element.getQName())) {
description = value;
}
if (EjbTagNames.TRANSACTION_ATTRIBUTE.equals(element.getQName())) {
trans_attribute = value;
}
| public org.w3c.dom.Node | writeDescriptor(org.w3c.dom.Node parent, java.lang.String nodeName, com.sun.enterprise.deployment.EjbDescriptor ejb)write the descriptor class to a DOM tree and return it
Map methodToTransactions = ejb.getMethodContainerTransactions();
MethodNode mn = new MethodNode();
for (Iterator e=methodToTransactions.keySet().iterator();e.hasNext();) {
MethodDescriptor md = (MethodDescriptor) e.next();
Node ctNode = super.writeDescriptor(parent, nodeName, ejb);
ContainerTransaction ct = (ContainerTransaction) methodToTransactions.get(md);
appendTextChild(ctNode, EjbTagNames.DESCRIPTION, ct.getDescription());
mn.writeDescriptor(ctNode, EjbTagNames.METHOD, md, ejb.getName());
appendTextChild(ctNode, EjbTagNames.TRANSACTION_ATTRIBUTE, ct.getTransactionAttribute());
}
return null;
|
|