Friday, February 24, 2017

JVM argument in WAS to control the Scheduler jobs to run in particular JVM


In typical Websphere commerce application, we have numerous scheduler job that needs to run.
In a clustered environment we may not know in which JVM job is running. We can control in which JVM a WCS Scheduler job to run. To achieve this we have 2 step process.

(i) The configuration  WebSphere Application Server.
(ii)  WCS schedule job parameter configuration

The configuration in WebSphere Application Server:

Assume that we have 3 nodes (newyork1, newyork2 and newyork3) and each node has 3 JVMS.

newyork1  ---- WC_dsmi01a,WC_dsmi02a,WC_dsmi03a
newyork2  ---- WC_dsmi01b,WC_dsmi02b,WC_dsmi03b
newyork3  ---- WC_dsmi01c,WC_dsmi02c,WC_dsmi03c


1)    Log onto the WebSphere Administrative Console.
2)    Select Servers > Application Servers.
3)    Select WebSphere Commerce Server name. For example, WC_dsmi01.
4)    On the Application Servers panel, under the Server Infrastructure heading, select Java and Process Management > Process Definition.
5)    On the Process Definition panel, under the Additional Properties heading, select Java Virtual Machine.
6)    In the middle window, on the right-hand side under the Additional Properties heading, select Custom Properties.
7)    Click New. A new page opens for you to add additional JVM properties.
8)    In the Name field, enter com.ibm.commerce.scheduler.SchedulerHostName.
9)    In the Value field, enter the unique identifier of the scheduler instance on this Java process. A recommended value would be: node name.server name. This will be unique across WebSphere Cell.
10)    Add JVM this argument in each WC JVM
For example,
For node newyork1 and cluster WC_dsmio1a, the value can be newyork1node.WC_dsmi01a
For node newyork2 and cluster WC_dsmio1b, the value can be newyork2node.WC_emdi01b
For node  newyork1 and cluster WC_dsmio2a, the value can be newyork1node.WC_dsmi02a

11)    Save and Sync
12)    Restart the WC application servers

(ii) WCS schedule job parameter configuration

If we want to run the SendEmailActivity job on the particular node (newyork1) and JVM WC_dsmi02a, add the value newyork1node.WC_dsmi02a  in Allowed host parameter as shown below




(b) You can verify this in table SCHCONFIG table where allowed host value stored in SCCHOST field.


For more detail please refer to below URL:
https://www.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.admin.doc/tasks/tjsinstschjob.htm

No comments:

Post a Comment