Search Results


Friday, April 29, 2016

SOA Composite management commands

SOA Suite Utilities

These are some of the useful wlst commands to manage SOA composites. These are better alternatives to navigating the EM console for SOA management tasks.

Before executing these commands set the JAVA_HOME and path variables for wlst commands to work. If your using unix or linux then use linux syntax for setting path variable and java_home and then run wlst.sh under the same oracle path.

Open cmd and enter the following

  • set JAVA_HOME=C:\UBM\Programs\jdk1.7.0_79
  • set path=C:\UBM\Programs\jdk1.7.0_79\bin;C:\Oracle\Middleware12c\Oracle_Home\oracle_common\modules\org.apache.ant_1.9.2\bin;%PATH%
  • cd C:\Oracle\Middleware12c\Oracle_Home\soa\common\bin
  • ./wlst.sh or wlst.cmd

Starts SCA composite

sca_startComposite('hostname', '8001', 'weblogic', 'welcome1', 'TestSCAProcess', '1.0', partition='default')

Stops SCA composites

sca_stopComposite('hostname', '8001', 'weblogic', 'welcome1', 'TestSCAProcess', '1.0', partition='default')

Undeploy SCA composites

sca_undeployComposite("http://hostname:8001", "HelloWorld", "1.0", user="weblogic", password="welcome1",partition='myPartition')

Lists all SOA composites

sca_listDeployedComposites('hostname', '8001', 'weblogic', 'welcome1')

Assign Default composite

Sets a SOA composite application revision as the default version. This revision is instantiated when a new request comes in.
sca_assignDefaultComposite("hostname", "port", "weblogic", "welcome1","HelloWorld", "1.0", partition='myPartition')

Delete MDS files

# This command will delete all the files under /apps directory in mds.
connect('weblogic', 'welcome1', 't3://localhost:7101');
deleteMetadata(application='soa-infra',server='DefaultServer',docs='/apps/**');








Wednesday, April 20, 2016

How to increase JVM memory in Weblogic


There are two OutOfMemoryError that the weblogic server might throw if the memory settings are not tuned.


  •  java.lang.OutOfMemoryError: Java heap space
    • The heap space error could be fixed by tunning Xms (minimum heap space) and Xmx (maximum heap space) parameters
  •  java.lang.OutOfMemoryError: PermGen space
    • And perm gen error could be fixed by tunning the PermSize parameter.



How to change memory settings in weblogic


There are many ways to change it and no of the standard ways is to change the setDomainEnv.sh file and append the following lines at the end of the file.

Remember to restart the server for this setting to take effect.

echo "******Custom Memory Settings for UBM SOA servers******"
echo "Server Name ${SERVER_NAME}"
echo "Memory Arguments  ${MEM_ARGS}"


if [ "${SERVER_NAME}" = "WLS_SERVER1" ] ; then
        MEM_ARGS=" -Xms1024m -Xmx3584m -XX:PermSize=512m -XX:MaxPermSize=1536m "
        export MEM_ARGS
fi


if [ "${SERVER_NAME}" = "AdminServer" ] ; then
        MEM_ARGS=" -Xms1024m -Xmx2584m -XX:PermSize=512m -XX:MaxPermSize=1536m "
        export MEM_ARGS
fi



How to verify


Run the ps -ef command in unix/Linux to check if the paratemers are passed correctly to the jvm

ps -ef | grep java | cut -c 1-200


And you can also see the actual memory usage at the OS level using top command.







Monday, April 18, 2016

Weblogic Datasource Setup

How to create datasource for ADF application 11g/12c

  • Goto Weblogic Console
  • Select Data Sources on the Home Page
  • Click New → Generic Data Source
    • Enter the following and click Next
    • Name: AppDataSource
    • JNDI Name: jdbc/AppDS
    • Database Type: Oracle
  • Choose the JDBC driver type and click Next:
    • Database Driver: *Oracle’s Driver (Thin) for Instance Connections; Versions: Any
  • Leave the default Transcation Options and click Next :
  • Enter the database connection properties and click Next :
    • Database Name: TBD
    • Hostname: TBD
    • Port: TBD
    • Database User: apps
    • Password: TBD
    • oracle.jdbc.DRCPConnectionClass: --Blank-
  • Test the configuration and Click Next:
  • Select the Target Server: It must be targeted to the cluster or servers where the ADF app is deployed (Exclude AdminServer from the target).
  • And finish.

How to create XADatasource for SOA Suite 11g/12c

Datasource

  • Goto Weblogic Console
  • Select Data Sources on the Home Page
  • Click New → Generic Data Source
    • Enter the following and click Next
    • Name: AppDataSource
    • JNDI Name: jdbc/AppDS
    • Database Type: Oracle
  • Choose the JDBC driver type and click Next:
    • Database Driver: *Oracle’s Driver (Thin XA) for Instance Connections; Versions: Any
  • Leave the default Transcation Options and click Next :
  • Enter the database connection properties and click Next :
    • Database Name: TBD
    • Hostname: TBD
    • Port: TBD
    • Database User: apps
    • Password: TBD
    • oracle.jdbc.DRCPConnectionClass: --Blank-
  • Test the configuration and Click Next:
  • Select the Target Server: It must be targeted to the SOA cluster or SOA managed servers (Exclude AdminServer from the target).
  • And finish.
  • Remember to create JNDI name to access this datasource from DB adapter or AQ adapter .
    • This steps is only for SOA suite.

DB Adapter (Only for SOA)

  • Select Deployments on the Home Page
  • Click DbAdapter from the list
  • Select tabs Configuration > Outbound Connection Pools
  • Click on New button and select javax.resource.cci.ConnectionFactory
  • Enter JNDI Name : eis/DB/apps
    • This JNDI name should be same as the one entered in *.jca file.
  • Click on Finish 
  • Now expand the javax.resource.cci.ConnectionFactory and click on the JNDI name you just created.
  • Enter the data-source name.
    • For XA Datasources enter XADatasourceName
    • For non-xa datasources just enter DatasourceName
    • Remember to hit Enter on the keyboard as this form only registers data on keyboard enter.
  • Click on Save button
  • Go back to the Deployments page.
  • Select the DbAdapter and click on Update
  • Select Update option and click on finish
    • If its the first time, the user will be asked to create a directory path for plan file. Choose the location when asked.

AQ Adapter (Only for SOA)

  • Steps to create JNDI name for AQ adapter is same as DB adapter. It just needs repeating the above steps for AqAdapter in the deployments.