Useful WLST Scripts – Managing composite state using command line WLST
- 31
- May
- 2012
- By nitin
- Oracle, SOA, WLST
- 2 Comments.
We have created a list of Useful WLST commands for SOA covering how we can use the WLST commands to retire/shutdown/start/activate/deploy/undeploy a composite.
Use the scripts located at:
(UNIX) MIDDLEWARE_HOME/ORACLE_SOA1/common/bin/wlst.sh
(Windows) C:oracleMiddleware11116Oracle_SOA1commonbinwlst.cmd
Note: Do not use the WLST script in the WebLogic Server home.
In case you use the WLS tool from MIDDLEWARE_HOMEoracle_commoncommonbin Or from MIDDLEWARE_HOME wlserver_10.3commonbin It will throw following error. Traceback (innermost last): File “”, 1,=”” ?<=”” in=”” line=”” span=””>”,> NameError: sca_undeployComposite
[user1@servername bin]$ pwd
/u01/app/oracle/mysoa/product/fmw/Oracle_SOA1/common/bin
[user1@servername bin]$./wlst.sh
Initializing WebLogic Scripting Tool (WLST) …
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Connect to WLST
wls:/offline> connect(‘weblogic’,’weblogicpassword’,’servername:port’)
Connecting to t3://servername:port with userid weblogic …
Successfully connected to managed Server ‘WLS_SOA1’ that belongs to domain ‘soa_domain’.
Note:
Make sure to connect to SOA server or cluster. If you have a clustered environment, then use SOA cluster/managed server host & port in the connection information. Otherwise you can expect below error:-
Connecting to: service:jmx:t3://servername:port/jndi/weblogic.management.mbeanservers.runtime
Cannot find composite lifecycle mbean.
wls:/soa_domain/serverConfig>
Retiring a Composite
wls:/soa_domain/serverConfig> sca_retireComposite(“nysolutionsltd.com”,”8400″,”weblogic”,”weblogicpassword”,”CompositeName”,”1.01″,partition=”SOA_Partition”)
host = nysolutionsltd.com
port = 8400
user = weblogic
partition = SOA_Partition
compositeName = CompositeName
revision = 0.01
label = None
compositeDN =SOA_Partition/CompositeName!0.01
Connecting to: service:jmx:t3://nysolutionsltd.com:8400/jndi/weblogic.management.mbeanservers.runtime
Composite (SOA_Partition/CompositeName!0.01) is successfully retired.
Stop/Shutdown a composite
wls:/soa_domain/serverConfig> sca_stopComposite(“soa.nysolutionsltd.com”,”8400″,”weblogic”,”mypassword”,”MYCompositeName”,”0.01″,partition=”SOA_Partition”)
host = soa.nysolutionsltd.com
port = 8400
user = weblogic
partition = SOA_Partition
compositeName = MYCompositeName
revision = 0.01
label = None
compositeDN =SOA_Partition/MYCompositeName!0.01
Connecting to: service:jmx:t3://soa.nysolutionsltd.com:8400/jndi/weblogic.management.mbeanservers.runtime
Composite (SOA_Partition/MYCompositeName!0.01) is successfully stopped.
wls:/soa_domain/serverConfig>
Starting a composite
wls:/soa_domain/serverConfig> sca_startComposite(“soa.nysolutionsltd.com”,”8400″,”weblogic”,”mypassword”,”MYCompositeName”,”0.01″,partition=”SOA_Partition”)
host = soa.nysolutionsltd.com
port = 8400
user = weblogic
partition = SOA_Partition
compositeName = MYCompositeName
revision = 0.01
label = None
compositeDN =SOA_Partition/MYCompositeName!0.01
Connecting to: service:jmx:t3://soa.nysolutionsltd.com:8400/jndi/weblogic.management.mbeanservers.runtime
Composite (SOA_Partition/MYCompositeName!0.01) is successfully started..
Activating a Composite
wls:/soa_domain/serverConfig> sca_activateComposite(“soa.nysolutionsltd.com”,”8400″,”weblogic”,”mypassword”,”MYCompositeName”,”0.01″,partition=”SOA_Partition”)
host = soa.nysolutionsltd.com
port = 8400
user = weblogic
partition = SOA_Partition
compositeName = MYCompositeName
revision = 0.01
label = None
compositeDN =SOA_Partition/MYCompositeName!0.01
Connecting to: service:jmx:t3://soa.nysolutionsltd.com:8400/jndi/weblogic.management.mbeanservers.runtime
Composite (SOA_Partition/MYCompositeName!0.01) is successfully activated.
List all Composites
wls:/soa_domain/serverConfig> sca_listDeployedComposites(‘soa.nysolutionsltd.com’,’8400′,’weblogic’,’mypassword’)
host = soa.nysolutionsltd.com
port = 8400
user = weblogic
Connecting to: service:jmx:t3://soa.nysolutionsltd.com:8400/jndi/weblogic.management.mbeanservers.runtime
Following 102 composites are currently deployed to the platform:
1. MYCompositeNameABCS[1.04], partition=SOA_Partition, mode=retired, state=off, isDefault=false, deployedTime=2012-04-25T15:51:19.116+01:00
2. MYCompositeNameABCS[1.05], partition=SOA_Partition, mode=active, state=on, isDefault=true, deployedTime=2012-05-21T09:51:34.818+01:00
.
.
.
.
101. MYCompositeNameProvABCS[4.0.0], partition= SOA_Partition, mode=active, state=on, isDefault=true, deployedTime=2012-05-21T17:11:12.104+01:00
102. MYCompositeNameProvABCS[4.0.0], partition= SOA_Partition, mode=active, state=on, isDefault=true, deployedTime=2012-05-21T17:11:44.603+01:00
6) Deploying and Undeploying
Same way a composite can be deployed or undeployed using WLST Commands.More on those on the links mentioned in references section.
References:
Another useful post from Danilo Schmiedel on undeploying using ant @ http://inside-bpm-and-soa.blogspot.co.uk/2012/11/undeploy-multiple-soa-composites-with.html
http://docs.oracle.com/cd/E15586_01/web.1111/e13813/custom_soa.htm#CDEEEIAA
http://docs.oracle.com/cd/E15586_01/core.1111/e10105/getstart.htm#ASADM10692
http://docs.oracle.com/cd/E21764_01/web.1111/e13715.pdf
Related
2 Responses so far.
Recent Posts
- 12.1.0.2 RAC Installation – Step by Step installation on VMware
- OSB FTP Poller continuously throwing exception – while no file pending on FTP Location
- Using JMS Transport with OSB
- Installing Spring Tool Suite and configuring Spring for a development PC
- Rest Enabling SOA using OSB in Oracle 12c
Recent Comments
- Nits on Installing Oracle SOA Suite 12c
- Rajesh Krishna on Installing Oracle SOA Suite 12c
- Nits on Installing Oracle SOA Suite 12c
- Rohinii on Installing Oracle SOA Suite 12c
- Mahitha on Oracle Service Bus (OSB) Development Best Practices.
Archives
- December 2015
- May 2015
- November 2014
- September 2014
- August 2014
- July 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- July 2013
- June 2013
- May 2013
- March 2013
- February 2013
- November 2012
- October 2012
- September 2012
- May 2012
- March 2012
- February 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- June 2011
- May 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- July 2010
- June 2010
- March 2010
- February 2010
- December 2009
- September 2009
- August 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- August 2008
- June 2008
- May 2008
Categories
- AIA
- AXIS2
- Best Practices
- BPEL
- BPM
- Budget
- Build
- Design Patterns
- ESB
- Hermes
- Hibernate
- Home Owners
- Java
- JMS
- JSR 168
- Maven
- Mediator
- Messaging
- Nitin
- OER
- OESB
- Oracle
- OSB
- OWSM
- Portlets
- SDLC
- Sequencing
- Singleton
- SOA
- SOAP
- Spring
- Struts
- UK
- Uncategorized
- Web Services
- WLST
Meta
To find out more, including how to control cookies, see here: Cookie Policy
Recent Posts
- 12.1.0.2 RAC Installation – Step by Step installation on VMware
- OSB FTP Poller continuously throwing exception – while no file pending on FTP Location
- Using JMS Transport with OSB
- Installing Spring Tool Suite and configuring Spring for a development PC
- Rest Enabling SOA using OSB in Oracle 12c
Recent Comments
- Nits on Installing Oracle SOA Suite 12c
- Rajesh Krishna on Installing Oracle SOA Suite 12c
- Nits on Installing Oracle SOA Suite 12c
- Rohinii on Installing Oracle SOA Suite 12c
- Mahitha on Oracle Service Bus (OSB) Development Best Practices.
Archives
- December 2015
- May 2015
- November 2014
- September 2014
- August 2014
- July 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- July 2013
- June 2013
- May 2013
- March 2013
- February 2013
- November 2012
- October 2012
- September 2012
- May 2012
- March 2012
- February 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- June 2011
- May 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- July 2010
- June 2010
- March 2010
- February 2010
- December 2009
- September 2009
- August 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- November 2008
- October 2008
- August 2008
- June 2008
- May 2008
Categories
- AIA
- AXIS2
- Best Practices
- BPEL
- BPM
- Budget
- Build
- Design Patterns
- ESB
- Hermes
- Hibernate
- Home Owners
- Java
- JMS
- JSR 168
- Maven
- Mediator
- Messaging
- Nitin
- OER
- OESB
- Oracle
- OSB
- OWSM
- Portlets
- SDLC
- Sequencing
- Singleton
- SOA
- SOAP
- Spring
- Struts
- UK
- Uncategorized
- Web Services
- WLST
Nice Nitin good reference …
we have tried with some more programming logic inside the script which will much flexibility …
http://wlstbyexamples.blogspot.in/2013/06/soa-retire-activate-composites.htm
Very useful summary of WLST scripts! Nice!