Automated Deployment

I am in the process of automating the deployment of our application ear files to some OC4J 10.1.3 instances. We have a large amount of ear files that get deployed to a bank of application servers. Because of this it can take a large amount of time and be quite painful to do the deployment with the enterprise manager tool. This is the reason we are automating the process.
My question is about the admin_client.jar file and it's interface. From the documentation I have read I can call the admin_client.jar from the command line and execute deployments. This is great (and works nicely for scripts) but I would like to be able to execute the deployments from java code. Is there an API that I can call the deployment functionality in admin_client.jar?
Thanks,
Mark

Thanks for your response. I don't mind sharing information on the forums, in case someone else might benefit from the discussion.
The requirements I have for this project were pretty high level. To make the deployment process faster and easier for all environments, with a focus on production. We use Oracle App Server 10.1.3 to host our application. We have 6 machines in production that about 50 ears get deployed to (in peak periods we add additional machines to the mix). The servers are split into two main groups. One set of ears goes to one set of 3 machines and one set of ears goes to the other set of 3 machines. This is similar in the development and QA envirnments, except the number of machines in each set is less. The old deployment process was to manually use the enterprise manager tool to undeploy and deploy each ear to the appropriate container.
For the last deploy I built ant scripts to do all the deployment. That works well if nothing changes, but the ant scripts are somewhat difficult to maintain. Not all deployments are for everything and it requires quite a bit of script changing each deployment. Each environment is slight different too, so I currently have 6 copies of the ant scripts and it is becoming difficult to maintain. So, the ant scripts were an improvement, but not quite the perfect solution.
So, what was proposed is to create a gui tool that would solve all the deployment issues. This deployment tool would allow the user to select an environment. The specifics of that environment would then be loaded in to the tool (appropriate urls, ports, OC4J instances, ears per instance, etc). The user could then select a version of ears available from the automated builds and pick and choose which ears to deploy to which machines. Then press a button to begin the process. The screen would update dynamically with the status of each deploy as it is done. The user would be able to drill down in to each deployment and see the deployment log (the log you normally see when deploying each ear). Some deployment rules will also have to be built in to the tool (A has to be deployed before B, C is a child of D).
Since we are a Java shop, the proposal is to write the deployment tool in Java (probably Swing). The hope was to be able to drive the deployments with some kind of java interface from the tool. The design is to write a wrapper layer above the oracle deploy layer to abstract away the oracle specific code and allow for changes in that layer without affecting too much other code. We will probably be on 10.1.3 for awhile, so I am fine with writing to a 10.1.3 specific interface that is likely to change with the next version. Whatever it takes to let the deploy monkeys do their job quickly and effectively without my intervention.

Similar Messages

  • Automated Deployment Using admin_client.jar gives 500 error

    Greetings,
    1. standalone OC4J version 10.1.3.3.0
    2. Windows XP platform in a VM
    We have a mature deployment in that the deployment from JDeveloper is routinely successful. During the course of developing continuous integration builds, the automated deployment is now failing. We had succeeded previously using admin_client.jar and the deploy command as follows:
        <target name="deploy_oc4j" depends="assembleEar"
      description="deploy the enterprise archive to a standalone oc4j using admin_client.jar">
        <echo>
          In deploy_oc4j target.
        </echo>
        <java classname="${j2ee.home}/admin_client.jar" fork="true">
            <jvmarg value="-jar"/>
            <arg value="${oc4j.deploy.admin_client}"/>
            <arg value="${oc4j.deploy.username}"/>
            <arg value="${oc4j.deploy.password}"/>
            <arg value="-deploy"/>
            <arg value="-file"/>
            <arg value="${this.application.name}".ear"/>
            <arg value="-deploymentName"/>
            <arg value="${this.application.name}"/>
            <arg value="-bindAllWebApps"/>
            <arg value="${default.application.name}"/>
        </java>
        </target>We now have two issues occurring and they may be related. We have added the capability of creating a connection pool and a data source using admin_client.jar commands:
        <target name="connectionpool" depends="deploy_oc4j"
          description="create a connection pool using admin_client.jar">
        <echo>
        Adding a connection pool.
        </echo>
          <java classname="${j2ee.home}/admin_client.jar" fork="true">
            <jvmarg value="-jar"/>
            <arg value="${oc4j.deploy.admin_client}"/>
            <arg value="${oc4j.deploy.username}"/>
            <arg value="${oc4j.deploy.password}"/>
            <arg value="-addDataSourceConnectionPool"/>
            <arg value="-applicationName"/>
            <arg value="${this.application.name}"/>
            <arg value="-name"/>
            <arg value="jdev-connection-pool-name"/>
            <arg value="-factoryClass"/>
            <arg value="oracle.jdbc.pool.OracleDataSource"/>
            <arg value="-dbUser"/>
            <arg value="username"/>
            <arg value="-dbPassword"/>
            <arg value="password"/>
            <arg value="-url"/>
            <arg value="jdbc:oracle:thin:@dev:1521:ORCL"/>
          </java>
        </target>
        <target name="datasource" depends="connectionpool"
          description="create a datasource using admin_client.jar">
        <echo>
        Adding Managed Data Source.
        </echo>
          <java classname="${j2ee.home}/admin_client.jar" fork="true">
            <jvmarg value="-jar"/>
            <arg value="${oc4j.deploy.admin_client}"/>
            <arg value="${oc4j.deploy.username}"/>
            <arg value="${oc4j.deploy.password}"/>
            <arg value="-addManagedDataSource"/>
            <arg value="-applicationName"/>
            <arg value="${this.application.name}"/>
            <arg value="-name"/>
            <arg value="jdev-connection-managed-name"/>
            <arg value="-jndiLocation"/>
            <arg value="jdbc/name"/>
            <arg value="-connectionPoolName"/>
            <arg value="jdev-connection-pool-name"/>
            <arg value="-dbUser"/>
            <arg value="username"/>
            <arg value="-dbPassword"/>
            <arg value="password"/>
          </java>
        </target>We complete the automated deployment and all ant tasks succeed, including creation of the connection pool and managed data source. During this process, the existing system-jazn-data.xml file is overwritten and our Application's <login module> information has been deleted. Upon editing this file and adding back the login module data and restarting oc4j, we can login to our application. The framework of the site is present along with graphics, yet every page visited yields a 500 error (jspx +and+ HTML). Since the entire deployment is done from ant, we do not have the capability of specifying a the web-app as development configuration. We need advice on how best to debug the deployed application as well as knowledge regarding the mechanism which causes the system-jazn-data.xml file in the oc4j/j2ee/home/config folder to be modified.
    THX
    -Mike
    Edited by: Michael F. Hardy on Sep 11, 2008 5:03 PM
    Edited by: Michael F. Hardy on Sep 11, 2008 5:03 PM
    Edited by: Michael F. Hardy on Sep 11, 2008 5:05 PM

    Found that jar files were missing from autobuild. This continues to be an issue where libraries are added to WEB-INF\lib in JDeveloper and the individual jar files are needed for an automated build process.

  • Automating deployment of workflows.

    Is it possible to somehow automating the deployment of workflows under WLI? I'm
    working on some stuff that is continuously evolving and will need relatively frequent
    redeployment. Manually importing in the .jar's containing the workflows to the
    proper server is getting well... tiring.
    Is there any way of automating this?
    Cheers,
    -Matt

    Hi Matthew,
    We had the problem of building different test environments from scripts. To get
    around the manual procedure of loading a exported jar using the Studio we wrote
    a simple java client (& wrapped it in a unix script) to invoke com.bea.wlpi.server.admin.Admin.readPackage(byte[]
    pkg, java.lang.Object credential)
    and
    com.bea.wlpi.server.admin.Admin.importPackage(byte[] pkg, java.util.Map publishables,
    java.lang.String orgID, boolean activate, java.lang.Object credential)
    It works a treat for us.
    regards - Paul
    PS - you'll find the javadocs for the above methods at :
    http://e-docs.bea.com/wlintegration/v2_0/processintegrator/classdocs/index.html
    "Matthew Godycki" <[email protected]> wrote:
    >
    Is it possible to somehow automating the deployment of workflows under
    WLI? I'm
    working on some stuff that is continuously evolving and will need relatively
    frequent
    redeployment. Manually importing in the .jar's containing the workflows
    to the
    proper server is getting well... tiring.
    Is there any way of automating this?
    Cheers,
    -Matt

  • Automating Deployment in 11G

    Hi ,
    I would like to know if there is any automating script or tool to deploy 11G SOA projects to Different Environments.I know that in 10G we have tools like Luntbuild and the environment Variable setup to deply automatically from Command promt.I would like to know if there is a same way to deploy the projects to different environement in Command prompt or using any other tools.Help would be highly appreciated .

    I dont think there is any build-in auto deployer in 11g so you will have to make your own.
    Look at the following thread:
    Re: Deployment in 11g R1
    This will give you an idea to first deploy it from the UNIX command prompt which you can wrap it up in a Unix shell script. Then you can use a Unix cron job to check for new SAR files at a directory to kick off the deployment script.

  • Automated Deployment of OAF

    Hi Gurus
    We have an automated way of deploying pkgs into database which would pick up the code from a version control system and compile it in the target database.
    But now, we are developing some OAF pages which require unzipping the files on the server (which is fine).... and also requires the pages to be imported into the metadata manually from a client pc....
    Is there a way to avoid this step like just bouncing the web server would help the pages (from the unzipped file) to get loaded into the metadata or someother command which we can use on the server ?
    sorry if this is a newbie question....
    Appreciate any help on this
    Karthik

    I tend to write install scripts for everything, so it can all be automated during a bulk build.
    So, for PG and RN uploads to the database, I wrote the following shell script:
    #!/bin/ksh
    HOST=`tnsping $TWO_TASK | cut -d")" -f2 | cut -d"=" -f2 | tail -2`
    PORT=`tnsping $TWO_TASK | cut -d")" -f3 | cut -d"=" -f2 | tail -2`
    CONN="(description=(address_list=(ADDRESS=(PROTOCOL=TCP)(HOST=$HOST)(PORT=$PORT)))(CONNECT_DATA=(SID=$TWO_TASK)))"
    ROOTDIR="$XX_TOP/java/"
    echo "Connection=$CONN"
    java -cp $CLASSPATH oracle.jrad.tools.xml.importer.XMLImporter DBCONNECTION="$CONN" USERNAME="APPS" PASSWORD="$1" rootdir="$ROOTDIR" $ROOTDIR"$2"
    which i called XMLImport.sh
    I can then call this for all my files as follows:
    XMLImport.sh $PW_APPS "xx/oracle/apps/icx/por/req/webui/XXCheckoutUpdateSinglePG.xml"
    XMLImport.sh $PW_APPS "xx/oracle/apps/ap/holds/wf/webui/XXApInvHoldsRN.xml"
    XMLImport.sh $PW_APPS "xx/oracle/apps/icx/por/req/webui/XXCheckoutDistsPG.xml"
    where $PW_APPS is the "apps" password.
    I also wrote one to upload the JPX substitutions:
    #!/bin/ksh
    HOST=`tnsping $TWO_TASK | cut -d")" -f2 | cut -d"=" -f2 | tail -2`
    PORT=`tnsping $TWO_TASK | cut -d")" -f3 | cut -d"=" -f2 | tail -2`
    CONN="(description=(address_list=(ADDRESS=(PROTOCOL=TCP)(HOST=$HOST)(PORT=$PORT)))(CONNECT_DATA=(SID=$TWO_TASK)))"
    ROOTDIR="$XX_TOP/java/"
    echo "Connection=$CONN"
    java -cp $CLASSPATH oracle.jrad.tools.xml.importer.JPXImporter $ROOTDIR"$2" -dbconnection "$CONN" -username "APPS" -password "$1"
    Which you then call with:
    JPXImport.sh $PW_APPS custom.jpx
    Hope this helps...
    Chris

  • OBIEE Automated Deployment through Ant

    OBIEE configuration management and deployment is one of most complex compare to any technology or tool, here is the way you can achieve very easily and you can have multiple streams of project working on same tool or platform (OBIEE). It explains how best you can track and promote the code to different environments like TEST, PRE_PROD and PROD, also you can deploy all four components ETL (DAC & Informatica), BI (RPD), and BI Presentation (WebCat). It is built with Java based configuration tool aka Ant. Details are attached to this post.

    For details, please refer to the content https://communities.informatica.com/thread/11252

  • OSB automated deployment question

    Can anyone provide me a working location of import.py file for OSB 11g? The ones on Oracle.com under samples section are not working.
    Edited by: 816687 on May 12, 2011 6:42 AM

    I used the one's provide @ http://www.insemble.com/oracleservicebus-deployment.html towards the bottom of the page in Sample Download section.
    I customized the properties files for the file paths accordingly as per my directory structure.
    Hope this helps.
    Thanks,
    Patrick

  • Automated deployment of OSB artifacts

    Hi,
    I have 4 webservices in OSB I want to automate the deployment of 4 services at a time can anyone suggest me how to write the python script accordingly.
    Thanks in advance :)

    Oops, your post/question is really old and I assume you have got the answers. Nevertheless, for the sake of completion of this thread, here goes -
    Yes you can. All you need to do is to export the changed artifact, be it schema or xquery, as a resource (make sure you uncheck the box meant for "Include dependencies"). And you can import the same where you want the change.

  • Automating  Deployment

    Hi,
    in order to automate deployment for OC4J and later for iAS I want to integrate the admin.jar and the DCMCTL tool into our primary build system maven (http://maven.apache.org/).
    So my question: Is there any java doc for the amdin.jar avaialble? Does it contain a reusable API? What about the DCMCTL tool? Is this accessible from Java?
    Thx a lot.

    Tobias --
    Sounds like you're doing interesting things there.
    If you look at some of the how-to examples we have on OTN, you'll see that we provide a deployment target for OC4J which typically uses the admin.jar utility.
    This is done in two ways that I've seen, both using the <java> task in Ant
    a) One calls the actual runnable class which does the deployment for admin.jar
    <target name="deploy-ear" depends="init">
    <java classname="com.evermind.client.orion.OrionConsoleAdmin" fork="yes">
    <arg value="${deploy.ormi}" />
    <arg value="${deploy.username}" />
    <arg value="${deploy.password}" />
    <arg value="-deploy" />
    <arg value="-file" />
    <arg value="${lib.dir}/${app.name}.ear" />
    <arg value="-deploymentName" />
    <arg value="${app.name}" />
    <classpath>
    <pathelement location="${J2EE_HOME}/oc4j.jar" />
    </classpath>
    </java>
    </target>
    and the other just invokes the runnable admin.jar utility rather than calling the direct class file
    <target name="deploy-ear" depends="init,j2ee-ear">
    <java jar="${J2EE_HOME}/admin.jar" fork="yes">
    <arg value="${deploy.ormi}" />
    <arg value="${deploy.username}" />
    <arg value="${deploy.password}" />
    <arg value="-deploy" />
    <arg value="-file" />
    <arg value="${lib.dir}/${app.name}.ear" />
    <arg value="-deploymentName" />
    <arg value="${app.name}" />
    </java>
    </target>
    Since admin.jar is a public utility, I'd probably recommend the second approach.
    cheers
    -steve-

  • Automated Deployment of SCOm2012 Agents

    I would like the scom agents installed automatically if the computer name is ABCXXX000. 
    Is there a way to run autodiscovery job once a day which will look for new computers by the naming convention I mentioned on our domain/network and install agents and provides a report?
    thank u

    I'm quite sure you will have to script that.
    It would roughly look something like
    $computers = Get-ADComputer | where {$_.name -like "ABC*"}
    foreach ($computer in $computers) {
    $agent = Get-SCOMAgent -Name $computer.name
    if ($agent -eq $null) {
    Install-SCOMAgent -DNSHostName $computer.name -PrimaryManagementServer MS1
    (of course this will not work as is, it needs to be customized according to your needs, just to give you an idea on how to do it)
    Then you will have to create a windows scheduled task to run the script

  • [Forum FAQ] How to deploy applications remotely

    In some situations, we may need some ways to install applications remotely, here we summarize four general ways to deploy applications.
    1. Using PowerShell to install
    We can use the Win32_Product class to install Windows Installer packages, remotely or locally, so in this way, we can use powerShell command to invoke this function. For example, to install the NewPackage.msi package located in the network
    share \\AppServ\remote on the remote computer PC01, type the following command at the Windows PowerShell prompt:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Product"}).Install(\\AppSrv\remote\NewPackage.msi)
    In same method, we can use the following command to deploy .exe application:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Process"}).Create(\\AppSrv\remote\NewPackage.exe)
    Note: The applications should use Windows Installer technology.
    2. PsExec tool: one of sysinternals utilities
    PsExec's most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems. So, we can use this feature to install our
    applications, in fact this is similar with PowerShell methods, the only difference is that PsExec is a comprehensive tool. Similarly, we can use the following command to achieve our goal:
    psexec \\PC01  cmd /c  "\\AppSrv\remote\NewPackage.msi" /quiet /norestart
    Note: we can also use PsExec tool to install Microsoft Update file (.msu)
    psexec \\PC01  -s -h -d wusa.exe  "\\AppSrv\remote\NewPackage.msu" /quiet /norestart
    3. Group Policy Software Installation
    In domain environment, this method is very useful to deploy our software. It only supports MSI package for deployment.
    We can choose assign a program to user or computer. If you assign the program to a user, it is installed when the user logs on to the computer. When the user first runs the program, the installation is completed. If you assign the program to a computer,
    it is installed when the computer starts, and it is available to all users who log on to the computer. When a user first runs the program, the installation is completed.
    You can get the installation information of group policy software installation in event viewer, including success or failure.
    4. System Center Configuration Manger
    The Microsoft System Center Configuration Manager software distribution feature provides a set of tools and resources that help you create and manage packages and advertisements used to distribute software to client resources within your enterprise. This
    is a comprehensive suit for deployment.
    How to Deploy Applications in Configuration Manager
    http://technet.microsoft.com/en-us/library/gg682082.aspx
    Summary:
    There are a lot of methods for software deployment, here just introduce some generic ways.
    Here is another important point of software deployment: Some applications do not use windows installer technology. 
    Applications that do not use Windows Installer technology may have application-specific methods for automated deployment. For example, a .exe file may be just a wrapper, it can be anything. To determine whether there is a method for deployment automation,
    check the documentation for the application or consult the application vendor's support system. In some cases, even if the application vendor did not specifically design the application for installation automation, the installer software manufacturer may have
    some techniques for automation.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    In some situations, we may need some ways to install applications remotely, here we summarize four general ways to deploy applications.
    1. Using PowerShell to install
    We can use the Win32_Product class to install Windows Installer packages, remotely or locally, so in this way, we can use powerShell command to invoke this function. For example, to install the NewPackage.msi package located in the network
    share \\AppServ\remote on the remote computer PC01, type the following command at the Windows PowerShell prompt:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Product"}).Install(\\AppSrv\remote\NewPackage.msi)
    In same method, we can use the following command to deploy .exe application:
    (Get-WMIObject -ComputerName PC01 -List | Where-Object -FilterScript {$_.Name -eq "Win32_Process"}).Create(\\AppSrv\remote\NewPackage.exe)
    Note: The applications should use Windows Installer technology.
    2. PsExec tool: one of sysinternals utilities
    PsExec's most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems. So, we can use this feature to install our
    applications, in fact this is similar with PowerShell methods, the only difference is that PsExec is a comprehensive tool. Similarly, we can use the following command to achieve our goal:
    psexec \\PC01  cmd /c  "\\AppSrv\remote\NewPackage.msi" /quiet /norestart
    Note: we can also use PsExec tool to install Microsoft Update file (.msu)
    psexec \\PC01  -s -h -d wusa.exe  "\\AppSrv\remote\NewPackage.msu" /quiet /norestart
    3. Group Policy Software Installation
    In domain environment, this method is very useful to deploy our software. It only supports MSI package for deployment.
    We can choose assign a program to user or computer. If you assign the program to a user, it is installed when the user logs on to the computer. When the user first runs the program, the installation is completed. If you assign the program to a computer,
    it is installed when the computer starts, and it is available to all users who log on to the computer. When a user first runs the program, the installation is completed.
    You can get the installation information of group policy software installation in event viewer, including success or failure.
    4. System Center Configuration Manger
    The Microsoft System Center Configuration Manager software distribution feature provides a set of tools and resources that help you create and manage packages and advertisements used to distribute software to client resources within your enterprise. This
    is a comprehensive suit for deployment.
    How to Deploy Applications in Configuration Manager
    http://technet.microsoft.com/en-us/library/gg682082.aspx
    Summary:
    There are a lot of methods for software deployment, here just introduce some generic ways.
    Here is another important point of software deployment: Some applications do not use windows installer technology. 
    Applications that do not use Windows Installer technology may have application-specific methods for automated deployment. For example, a .exe file may be just a wrapper, it can be anything. To determine whether there is a method for deployment automation,
    check the documentation for the application or consult the application vendor's support system. In some cases, even if the application vendor did not specifically design the application for installation automation, the installer software manufacturer may have
    some techniques for automation.
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • Bpel deployment fails for all processes that have revision other than 1.0.

    Using: Release *10.1.3.3.1*
    Hello All,
    Bpel deployment fails for all processes that have revision other than *1.0*.
    We have been attempting to deploy several BPEL projects via ANT script to a target environment and are encountering failures to deploy for every project which isn’t a (revision 1.0). We are getting the following error whenever we try to deploy a process with a revision other than 1.0:
    D:\TJ_AutoDeploy\BPEL_AutoDeploy_BETA\build.xml:65: BPEL archive doesnt exist in directory "{0}"
         at com.collaxa.cube.ant.taskdefs.DeployRemote.getJarFile(DeployRemote.java:254)
         at com.collaxa.cube.ant.taskdefs.DeployRemote.deployProcess(DeployRemote.java:409)
         at com.collaxa.cube.ant.taskdefs.DeployRemote.execute(DeployRemote.java:211)
         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
         at org.apache.tools.ant.Task.perform(Task.java:364)
         at org.apache.tools.ant.Target.execute(Target.java:341)
         at org.apache.tools.ant.Target.performTasks(Target.java:369)
         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
         at org.apache.tools.ant.Main.runBuild(Main.java:668)
         at org.apache.tools.ant.Main.startAnt(Main.java:187)
         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
    The structure of our automated deployment script is as follows:
    First, a batch script calls (Jdeveloper_BPEL_Prompt.bat) in order to set all necessary environment variables i.e. ORACLE_HOME, BPEL_HOME, ANT_HOME, etc for ant.
    Next, the script lists every .jar file within the directory to an .ini file called BPEL_List.ini. Furthermore, BPEL_DIR, ADMIN_USER and ADMIN_PSWD variables are set and initialized respectively to:
    -     “.” – point to directory where script is running from because all the BPEL processes are located here
    -     “oc4jadmin”
    -     “*********” (whatever the password for out environment is)
    We’ve developed a method to have the script prompt the user to select the target environment to deploy to. Once the user selects the appropriate environment, the script goes through the BPEL_List.ini files and a loop tells it that for every BPEL process listed:
    DO ant
    -Dprocess.name=%%b
    -Drev= !Rev!
    -Dpath=%BPEL_DIR%
    -Ddomain=default
    -Dadmin.user=%ADMIN_USER%
    -Dadmin.password=%ADMIN_PWD%
    -Dhttp.hostname=%HOST%
    -Dhttp.port=%PORT%
    -Dverbose=true
    (What’s happening is that the variables in the batch file are being passed on to the ANT script where *%%b* is the process name, !rev! is revision #, and so on…)
    The loop goes through each line in the BPEL_List.ini and tokenizes the BPEL process into 3 parts *(%%a, %%b, and %%c)* but we only extract 2 parts: *%%b* (process name) and *%%c* which becomes !Rev! (revision number).
    Example:
    Sample BPEL process:
    bpel_ThisIsProcess1_1.0.jar
    bpel_ThisIsProcess2_SOAv2.19.0.001B.jar
    After tokenizing:
    %%a     %%b     %%c
    bpel     ThisIsProcess1     1.0.jar
    bpel     ThisIsProcess2     SOAv2.19.0.001B.jar
    *!Rev!* and not *%%c* because *%%c* will return whatever the revision number is + the “.jar” file extension as illustrated above. So to circumvent this, we parse *%%c* so that the last 4 characters are stripped. Such is done like this:
    set RevN=%%c
    set RevN=!RevN:~0,-4!
    Hence, the usage of !Rev!.
    Below is a screenshot post of the ANT build.xml that goes with our script:
    <!--<?xml version="1.0"?>-->
    <!--BUILD.XML-->
    <project name="bpel.deploy" default="deployProcess" basedir=".">
         <!--
         This ant build file was generated by JDev to deploy the BPEL process.
         DONOT EDIT THIS JDEV GENERATED FILE. Any customization should be done
         in default target in user created pre-build.xml or post-build.xml
         -->
         <property name="process.dir" value="${basedir}" />
              <!-- Set BPEL process name -->
              <!--
              <xmlproperty file="${process.dir}/bpel/bpel.xml"/>
              <property name="process.name" value="${BPELSuitcase.BPELProcess(id)}"/>
              <property name="rev" value="${BPELSuitcase(rev)}"/>
              -->
         <property environment="env"/>
         <!-- Set bpel.home from developer prompt's environment variable BPEL_HOME -->
              <condition property="bpel.home" value="${env.BPEL_HOME}">
                   <available file="${env.BPEL_HOME}/utilities/ant-orabpel.xml" />
              </condition>
         <!-- show that both bpel and oracle.home are located (TESTING purposes ONLY) -->
         <!-- <echo>HERE:${env.BPEL_HOME} ${env.ORACLE_HOME}</echo> -->
         <!-- END TESTING -->
         <!--If bpel.home is not yet using env.BPEL_HOME, set it for JDev -->
         <property name="oracle.home" value="${env.ORACLE_HOME}" />
         <property name="bpel.home" value="${oracle.home}/bpel" />
         <!--First override from build.properties in process.dir, if available-->
         <property file="${process.dir}/build.properties"/>
         <!--import custom ant tasks for the BPEL PM-->
         <import file="${bpel.home}/utilities/ant-orabpel.xml" />
         <!--Use deployment related default properties-->
         <property file="${bpel.home}/utilities/ant-orabpel.properties" />
         <!-- *************************************************************************************** -->
         <target name="deployProcess">
              <tstamp>
                   <format property="timestamp" pattern="MM-dd-yyyy HH:mm:ss" />
              </tstamp>
              <!-- WRITE TO LOG FILE #tjas -->
              <record name="build_verbose.log" loglevel="verbose" append="true" />
              <record name="build_debug.log" loglevel="debug" append="true" />
              <echo></echo>
              <echo>####################################################################</echo>
              <echo>BPEL_AutoDeploy initiated @ ${timestamp}</echo>
              <echo>--------------------------------------------------------------------</echo>
              <echo>Deploying ${process.name} on ${http.hostname} port ${http.port} </echo>
              <echo>--------------------------------------------------------------------</echo>
              <deployProcess
                   user="${admin.user}"
                   password="${admin.password}"
                   domain="${domain}"
                   process="${process.name}"
                   rev="${rev}"
                   dir="${process.dir}/${path}"
                   hostname="${http.hostname}"
                   httpport="${http.port}"
                   verbose="${verbose}" />
              <sleep seconds="30" />
              <!--<echo message="${process.name} deployment logged to ${build_verbose.log}"/>
              <echo message="${process.name} deployment logged to ${build.log}"/> -->
         </target>
         <!-- *************************************************************************************** -->
    </project>
    SUMMARY OF ISSUE AT HAND:
    ~ Every bpel process w/ 1.0 revision deploys with no problems
    ~ At first I would get an invalid character error most likely due to the “!” preceding “Rev”, but then I decided to set rev=”false” in the build.xml file. That didn’t work quite well. In another attempt, I decided to leave the –Drev= attribute within the batch script blank. That still led to 1.0s going through. My next thought was deploying something other than a 1.0, such as 1.2 or 2.0 and that’s when I realized that if it wasn’t a 1.0, it refused to go through.
    QUESTIONS:
    1.     IS THERE A WAY TO HAVE ANT LOOK INTO THE BPEL PROCESS AND PULL THE REVISION ID?
    2.     WHAT ARE WE DOING WRONG? ARE WE MISSING ANYTHING?
    3.     DID WE GO TOO FAR? MEANING, IS THERE A MUCH EASIER WAY WE OVERLOOKED/FORGOT/OR DON’T KNOW ABOUT THAT EXISTS?
    Edited by: 793292 on Jul 28, 2011 12:38 PM

    Only thing i can think of is instead of using a MAC ACL , u cud jus use the default class
    Policy Map Test
    class class-default
    police 56000 8000 exceed-action drop
    Class Map match-any class-default (id 0)
    Match any
    You would be saving a MAC-ACL ;-).

  • Deployment Using admin_client.jar causes edit of system-jazn-data.xml

    Greetings,
    1. standalone OC4J version 10.1.3.3.0
    2. Windows XP platform in a VM
    Our automated deployment to a stand alone oc4j causes the system-jazn-data.xml file in the oc4j\j2ee\home\config folder to be overwritten. This process removes the pertinent application-specific login module information required for our JAAS security. Overwriting this file with a known working version followed by a restart of oc4j enables application login. What we would like to learn is how to control the content of the system-jazn-data.xml file during automated deployment with ant scripts using oc4j admin_client.jar. Note that when deployed with JDeveloper, the information in the orion-application.xml file is added back to the system-jazn-data.xml in the oc4j\j2ee\home\config directory and logging in is once again enabled.
    THX
    -Mike

    Found that jar files were missing from autobuild. This continues to be an issue where libraries are added to WEB-INF\lib in JDeveloper and the individual jar files are needed for an automated build process.

  • Server automation ?

    Respected sir,
    We are working on project called "Server Automation".
    We have to do two things,
    1)To Recover data of client after server crash.
    2)Automatic shut down of server after all clients logged out. (This is the case in small LANS like in colleges where server is managed manually .After completion of time administrator manually shut down the server pc .)
    We are going to use concepts of "Neural Networks" as they are decision making networks they will decide when crash is going to happen and without knowledge of client they will save clients present snapshot and after some time when server recover procedure will be continued at the point of detachment.
    Besides for second case there will be semaphore for each client and depending on that server can keep track clients.
    please suggest best suited java enabled server for that (Available in india).Also suggest steps to follow for this project.
    What Neural network concepts can be used here?
    Give any other points that u think best suited.
    Please send me reply as early as u can
    Thanking u
    Rajnikant Tendulkar
    [B.E.I.T]

    Sarim,
    Check if this helps:
    http://www.habaneroconsulting.com/insights/Create-developer-SQL-maintenance-plans-using-SQL-Agent-Jobs-and-PowerShell
    http://blog.msresource.net/2011/10/03/invoking-running-sql-server-agent-jobs-using-powershell/
    http://robertbigec.wordpress.com/2013/10/03/automating-deployment-of-sql-server-maintenance-plans/
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Can't deploy a jms connection factory

    I am getting errors when trying to deploy a jms connection factory.  Here is the xml file jms-factories.xml:
    <?xml version="1.0" encoding="utf-8"?>
    <jms-factories>
    <application-name>MyApplicationName</application-name>
    <connection-factory>
      <connection-factory-type>QueueConnectionFactory</connection-factory-type >
         <factory-name>MyQueueConnectionFactory</factory-name>
      <context-factory-type>
      <link-factory-name>jmsfactory/default/MyConnectionFactory</link-factory-name>
      <initial-context-factory>
          com.sap.engine.services.jndi.InitialContextFactoryImpl
      </initial-context-factory>
      <provider-url>localhost</provider-url>
      <security-principal>Administrator</security-principal>
      </context-factory-type>
    </connection-factory>
    </jms-factories>
    Below is the error:
    java.rmi.RemoteException: Error occurred while starting application in whole cluster and wait.; nested exception is:
         com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: server ID 5215450:com.sap.engine.services.jmsconnector.exceptions.BaseDeploymentException: Class loading error: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of MyConnectionFactory.
         at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:650)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:344)
         at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:638)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.sap.engine.services.jmsconnector.container.JmsContainerImpl.loadFactory(JmsContainerImpl.java:1306)
         at com.sap.engine.services.jmsconnector.container.JmsContainerImpl.prepareStart(JmsContainerImpl.java:577)
         at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:233)
         at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:193)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:380)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:421)
         at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:539)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:171)
         at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:315)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3163)
         at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:674)
         at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:658)
         at com.sap.engine.services.jmsconnector.container.JmsManagerImpl.deployJmsResource(JmsManagerImpl.java:281)
         at com.sap.engine.services.jmsconnector.command.DeployJmsResource.exec(DeployJmsResource.java:81)
         at com.sap.engine.services.shell.processor.environment.CommandBase.exec(CommandBase.java:132)
         at com.sap.engine.services.shell.processor.Interpreter.applyLineCommand(Interpreter.java:391)
         at com.sap.engine.services.shell.processor.Interpreter.apply(Interpreter.java:150)
         at com.sap.engine.services.shell.processor.Shell.work(Shell.java:148)
    I am actually trying to do an automated deploy but I kept getting this error so I am trying to manually deploy it with the J2EE Engine Console tool.  The command is:
    deploy_jms_resource d:\jay\jms-factories.xml
    Anybody have any ideas?  At the top of the stack trace it mentions Class loading error but it is not the InitialContextFactoryImpl that is causing the problem because if I enter a totally bogus class name I get a nice ClassNotFound exception.

    Hi Jay,
    Which Reference guide do you mean? You find the jms-resources.xsd here: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/55e7d51e-0e01-0010-7b84-a95ee55eadeb">Java Messaging</a>, pages 52-58.

Maybe you are looking for