Class WebLogic9x10x12x14xConfigXmlInstalledLocalDeployer

  • All Implemented Interfaces:
    Deployer, Loggable

    public class WebLogic9x10x12x14xConfigXmlInstalledLocalDeployer
    extends AbstractInstalledLocalDeployer
    Static deployer that manages deployment configuration by manipulating the WebLogic config.xml file.
    • Constructor Detail

      • WebLogic9x10x12x14xConfigXmlInstalledLocalDeployer

        public WebLogic9x10x12x14xConfigXmlInstalledLocalDeployer​(InstalledLocalContainer container)
        container - container to configure
    • Method Detail

      • readConfigXml

        public Document readConfigXml()
        read the domain's config.xml file into a Document.
        Document corresponding with config.xml
      • getConfigXmlPath

        protected String getConfigXmlPath()
        Return the absolute path of the config.xml file.
        path including config.xml
      • writeConfigXml

        public void writeConfigXml​(Document configXml)
        write the domain's config.xml to disk.
        configXml - document to write to disk
      • getDomainHome

        protected String getDomainHome()
        get the DOMAIN_HOME of the server.
        location to find files like config.xml
      • deploy

        public void deploy​(Deployable deployable)
        Deploy a Deployable to the running container and make it available for requests. deploys files by adding their configuration to the config.xml file of the WebLogic server.
        Specified by:
        deploy in interface Deployer
        deploy in class AbstractDeployer
        deployable - the Deployable to deploy
      • undeploy

        public void undeploy​(Deployable deployable)
        Undeploy a Deployable from the running container. The service becomes unavailable for requests. undeploys files by removing their configuration to the config.xml file of the WebLogic server.
        Specified by:
        undeploy in interface Deployer
        undeploy in class AbstractDeployer
        deployable - the Deployable to undeploy
      • removeDeployableFromDomain

        protected void removeDeployableFromDomain​(Deployable deployable,
                                                  Element domain)
        Remove the corresponding app-deployment element from the domain of the WebLogic server.
        deployable - - application component to remove
        domain - - Domain element of the WebLogic server
      • selectAppDeployments

        protected List<Element> selectAppDeployments​(Deployable deployable,
                                                     Element domain)
        this will select the node(s) that match the below deployment.
        deployable - what to search for
        domain - root element to search in
        list of child elements that match the deployment
      • addDeployableToDomain

        protected void addDeployableToDomain​(Deployable deployable,
                                             Element domain)
        Create and insert an app-deployment element into the domain of the WebLogic server. Ensure that schema ordering is correct.
        deployable - - application component to configure
        domain - - Domain element of the WebLogic server
      • createElementForDeployableInDomain

        protected Element createElementForDeployableInDomain​(Deployable deployable,
                                                             Element domain)
        create the config.xml element representing the Deployable. In WebLogic 9x, this is the element app-deployment.
        deployable - to configure
        domain - root element of the config.xml file
        app-deployment element
      • reorderAppDeploymentsAfterConfigurationVersion

        protected void reorderAppDeploymentsAfterConfigurationVersion​(Element domain)
        Per current schema of the weblogic domain, app-deployment elements need to come directly after the configuration-version element.
        domain - - domain to re-order
      • createIdForDeployable

        protected String createIdForDeployable​(Deployable deployable)
        Get a string name for the configuration of this deployable. This should be XML friendly. For example, the String returned will have no slashes or colons, and be as short as possible.
        deployable - used to construct the id
        a string that can be used to name this configuration
      • getServerName

        protected String getServerName()
        return the running server's name.
        the WebLogic server's name