In an effort to simplify the population of existing composites on a server into FlexDeploy projects, we have provided a utility to extract composites from a SOA server into a comma delimited file. This file can then be the basis for a spreadsheet that can be loaded directly into FlexDeploy, through the use of templates, and all of the composite projects can be created in seconds. I will talk about templates in another blog post.

The composite extraction from a SOA server can be done with the attached zip file (extractComposites).  There are three components in the zip file:

  • Property file that contains the userName, password, hostName and hostPort for the targeted SOA server
#Weblogic server username and password
server.user=weblogic
server.password=welcome1
#server.host=
server.host=soalt06.flexagon
#server.port=
server.port=8001
  • CompositeMgmt.jar that contains the code that interrogates the targeted server
  • ExtractComposites.sh that contains the script that manages the jvm and classpath
JAVA_DIR=/u01/oracle/products/java/bin
FMW_DIR=/u01/oracle/products/fmw

${JAVA_DIR}/java -cp ${FMW_DIR}/soa/soa/modules/commons-cli-1.1.jar:${FMW_DIR}/soa/../wlserver/server/lib/weblogic.jar:${FMW_DIR}/soa/soa/modules/oracle.soa.fabric_11.1.1/fabric-runtime.jar:${FMW_DIR}/soa/soa/modules/oracle.soa.mgmt_11.1.1/soa-infra-mgmt.jar:./CompositeMgmt.jar compositemgmt.CompositeData ${1}

Once you have the zip file downloaded,

  1. Extract the contents on a SOA server (needs several of the install jars)
  2. Edit the ExtractComposite shell script and change the values in the first two lines, JAVA_DIR and FMW_DIR.  Samples are in the script.
  3. Edit the property file (DEV_properties.txt,), name it whatever you want but change the following:
    1. server.user (eg, weblogic)
    2. server.password (eg, weblogic password)
    3. server.host (eg, SOA managed server host)
    4. server.port (eg, SOA managed server port)
  4. Execute the script (may have to make the script executable, chmod +x ExtractComposites.sh)
    1. ./ExtractComposites.sh DEV_properties.txt > output.file

The output file will contain each compositeName and the partition that it currently resides.

Composite1,default
Composite2,default
Composite3,order
Composite4,shipment

This will provide a jump start that can then be utilized with FlexDeploy templates.

Dan Reynebeau

I have been working with Oracle and IBM integration technologies, along with custom development, for over 20 years providing solutions to the customer. While working with the different platforms, I have developed deployment scripts along with utilizing 3rd party deployment products to automate the deployment process. As a Principal architect at Flexagon I work with customers to enable DevOps/CI solutions using FlexDeploy, as well as primary development of FlexDeploy.

More posts by Dan Reynebeau

Leave a Reply

Your email address will not be published. Required fields are marked *