Monday, May 19, 2014

Manage SOA Composites with WLST


Here are some useful WLST commands for managing SOA composites.

Use the scripts located at:
(UNIX) MIDDLEWARE_HOME/ORACLE_SOA1/common/bin/wlst.sh

Retiring a Composite
wls:/soa_domain/serverConfig> sca_retireComposite(“nysolutionsltd.com”,”8400″,”weblogic”,”weblogicpassword”,”CompositeName”,”1.01″,partition=”SOA_Partition”)

host = localhost
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://localhost: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(“localhost”,”8400″,”weblogic”,”mypassword”,”MYCompositeName”,”0.01″,partition=”SOA_Partition”)

host = localhost
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://localhost: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(“localhost”,”8400″,”weblogic”,”mypassword”,”MYCompositeName”,”0.01″,partition=”SOA_Partition”)

host = localhost
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://localhost:8400/jndi/weblogic.management.mbeanservers.runtime
Composite (SOA_Partition/MYCompositeName!0.01) is successfully started..

Activating a Composite

wls:/soa_domain/serverConfig> sca_activateComposite(“localhost”,”8400″,”weblogic”,”mypassword”,”MYCompositeName”,”0.01″,partition=”SOA_Partition”)

host = localhost
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://localhost:8400/jndi/weblogic.management.mbeanservers.runtime
Composite (SOA_Partition/MYCompositeName!0.01) is successfully activated.

List all Composites

wls:/soa_domain/serverConfig> sca_listDeployedComposites(‘localhost’,’8400′,’weblogic’,'mypassword’)

host = localhost
port = 8400
user = weblogic

Connecting to: service:jmx:t3://localhost:8400/jndi/weblogic.management.mbeanservers.runtime

Following 2 composites are currently deployed to the platform:

1. MYCompositeNameABCS[1.04], partition=SOA_Partition, mode=retired, state=off, isDefault=false, deployedTime=2014-04-25T15:51:19.116+01:00

2. MYCompositeNameABCS[1.05], partition=SOA_Partition, mode=active, state=on, isDefault=true, deployedTime=2014-04-21T09:51:34.818+01:00

Fusion SOA BEA-110486 Transaction xxxx cannot complete commit processing because resource is unavailable (Doc ID 1385959.1)

Issue - BEA-110486 Transaction xxxx cannot complete commit processing because resource is unavailable (Doc ID 1385959.1)

Solution - 
 To make the warnings disappear in the Server logs, implement below steps. Below is the workaround to make the warnings disappear:
  •  Stop your server.
  •  Go to [your domain]\servers\AdminServer\data\store\default.
  •  Delete * _WLS_ADMINSERVER_[random number].DAT. Make sure to take a backup of the DAT file before deleting it.
  •  Restart server. 

IBM MQ Series com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2010

Issue -  com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2010
Solution:    Change the max size of message

Note: Change Values to match your Channel or Queue
ALTER QMGR MAXMSGL(12582912)
ALTER CHL(TESTQM_SVR.CH01) CHLTYPE(SVRCONN) MAXMSGL(12582912)
ALTER Q(APPL_TEST1) MAXMSGL(12582912)
ALTER Q(SYSTEM.DEAD.LETTER.QUEUE) MAXMSGL(12582912)
Note: You ONLY need to alter the attribute of the Dead Letter Queue if the message is coming from another queue manager (but then you would also need to do the sender & receiver channels).

IBM MQ Series com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2003

If you're working on IBM MQ Series, then you might have faced this error quite often. Well, its very easy to sort it out.

Issue - com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2003
Solution - Increase number of log files in qm.ini and bounce the Queue Manager.

Once you bounce the server, MQ Series will stop throwing this exception. In addition to it, you might want to setup some log rotation policies at OS level.