FileDocCategorySizeDatePackage
IIOPServerInstance.javaAPI DocGlassfish v2 API4054Fri May 04 22:35:10 BST 2007com.sun.enterprise.tools.upgrade.transform.elements

IIOPServerInstance

public class IIOPServerInstance extends BaseElement
author
prakash

Fields Summary
Constructors Summary
public IIOPServerInstance()
Creates a new instance of Element

    
Methods Summary
public voidtransform(org.w3c.dom.Element element, org.w3c.dom.Element parentSource, org.w3c.dom.Element parentResult)
element - iiop-server-instance parentSource - IIOPCluster parentResult - result parent of any-element peer

        //String targetDomainName = parentResult.getOwnerDocument().getDocumentElement().getAttribute("name");
        logger.log(Level.FINE, stringManager.getString("upgrade.transform.transformingMSG", this.getClass().getName(), element.getTagName()));
        String targetDomainName = commonInfoModel.getCurrentDomain();
        String currentClusterName = commonInfoModel.getCurrentCluster();
        logger.log(Level.FINE, stringManager.getString(this.getClass().getName() + ":: currentClusterName " , currentClusterName));
        if(currentClusterName == null){
            // This is possible for stand alone instances.
            return;
        }
        String instanceName = element.getAttribute("name");
        ClustersInfoManager.getClusterInfoManager().getIIOPCluster(targetDomainName,currentClusterName).addIIOPServerInstance(instanceName);
        NodeList resultElements = element.getElementsByTagName("iiop-endpoint");
        for(int lh =0; lh < resultElements.getLength(); lh++){
            Element itElement = ((Element)resultElements.item(lh));
            // Compare one key attribute
            ClustersInfoManager.getClusterInfoManager().getIIOPCluster(targetDomainName,currentClusterName).addIIOPEndPoint(
            itElement.getAttribute("id"),itElement.getAttribute("host"),itElement.getAttribute("port"));
        }