InterfaceBasedEjbNodepublic abstract class InterfaceBasedEjbNode extends EjbNode This class is responsible for reading/writing all information
common to all EJB which are interfaces based (entity, session) |
Constructors Summary |
---|
public InterfaceBasedEjbNode()
super();
// register sub XMLNodes
registerElementHandler(new XMLElement(EjbTagNames.ROLE_REFERENCE), SecurityRoleRefNode.class, "addRoleReference");
|
Methods Summary |
---|
protected java.util.Map | getDispatchTable()all sub-implementation of this class can use a dispatch table to map xml element to
method name on the descriptor class for setting the element value.
// no need to be synchronized for now
Map table = super.getDispatchTable();
table.put(EjbTagNames.HOME, "setHomeClassName");
table.put(EjbTagNames.REMOTE, "setRemoteClassName");
table.put(EjbTagNames.LOCAL_HOME, "setLocalHomeClassName");
table.put(EjbTagNames.LOCAL, "setLocalClassName");
table.put(EjbTagNames.BUSINESS_LOCAL, "addLocalBusinessClassName");
table.put(EjbTagNames.BUSINESS_REMOTE, "addRemoteBusinessClassName");
table.put(EjbTagNames.SERVICE_ENDPOINT_INTERFACE,
"setWebServiceEndpointInterfaceName");
return table;
| protected void | writeCommonHeaderEjbDescriptor(org.w3c.dom.Node ejbNode, com.sun.enterprise.deployment.EjbDescriptor descriptor)write the common descriptor info to a DOM tree and return it
super.writeCommonHeaderEjbDescriptor(ejbNode, descriptor);
appendTextChild(ejbNode, EjbTagNames.HOME, descriptor.getHomeClassName());
appendTextChild(ejbNode, EjbTagNames.REMOTE, descriptor.getRemoteClassName());
appendTextChild(ejbNode, EjbTagNames.LOCAL_HOME, descriptor.getLocalHomeClassName());
appendTextChild(ejbNode, EjbTagNames.LOCAL, descriptor.getLocalClassName());
for(String next : descriptor.getLocalBusinessClassNames()) {
appendTextChild(ejbNode, EjbTagNames.BUSINESS_LOCAL, next);
}
for(String next : descriptor.getRemoteBusinessClassNames()) {
appendTextChild(ejbNode, EjbTagNames.BUSINESS_REMOTE, next);
}
appendTextChild(ejbNode, EjbTagNames.SERVICE_ENDPOINT_INTERFACE,
descriptor.getWebServiceEndpointInterfaceName());
appendTextChild(ejbNode, EjbTagNames.EJB_CLASS,
descriptor.getEjbClassName());
| protected void | writeRoleReferenceDescriptors(org.w3c.dom.Node parentNode, java.util.Iterator refs)write the security role references to the DOM Tree
SecurityRoleRefNode node = new SecurityRoleRefNode();
for (;refs.hasNext();) {
RoleReference roleRef = (RoleReference) refs.next();
node.writeDescriptor(parentNode, EjbTagNames.ROLE_REFERENCE, roleRef);
}
|
|