update WebSphere testing scripts to accept dynamic cell name, node name and server name to comply with WAS topo in JRF env.
code is reviewed by Kevin Yuan.
diff --git a/jpa/eclipselink.jpa.test/websphere.properties b/jpa/eclipselink.jpa.test/websphere.properties
index 0ae7c3e..785b0de 100644
--- a/jpa/eclipselink.jpa.test/websphere.properties
+++ b/jpa/eclipselink.jpa.test/websphere.properties
@@ -12,6 +12,9 @@
# WebSphere specific properties.
was.jython.scripts.dir=../../../extension.lib.external
instance.host=stame10
+serverName=server1
+cellName=${instance.host}Cell01
+nodeName=${instance.host}Node03
# Absolute path is required
eclipselink.jar.dir=/scratch/aime/eclipselink/org.eclipse.persistence/trunk
oracle.extensions.jar.dir=/scratch/aime/eclipselink/org.eclipse.persistence/extension.oracle.lib.external
diff --git a/jpa/eclipselink.jpa.test/websphere.xml b/jpa/eclipselink.jpa.test/websphere.xml
index 51abd4d..61069af 100644
--- a/jpa/eclipselink.jpa.test/websphere.xml
+++ b/jpa/eclipselink.jpa.test/websphere.xml
@@ -64,7 +64,8 @@
<echo message="*****Config WebSphere Server*****"/>
<copy overwrite="true" file="${was.jython.scripts.dir}/configWebSphere.py" tofile="${was.home}/bin/configWebSphere.py"/>
<replace file="${was.home}/bin/configWebSphere.py" token="%%oracleDriver%%" value="${jdbc.driver.jar}"/>
- <replace file="${was.home}/bin/configWebSphere.py" token="%%hostName%%" value="${instance.host}"/>
+ <replace file="${was.home}/bin/configWebSphere.py" token="%%nodeName%%" value="${nodeName}"/>
+ <replace file="${was.home}/bin/configWebSphere.py" token="%%serverName%%" value="${serverName}"/>
<replace file="${was.home}/bin/configWebSphere.py" token="%%dbUser%%" value="${db.user}"/>
<replace file="${was.home}/bin/configWebSphere.py" token="%%dbPassword%%" value="${db.pwd}"/>
<replace file="${was.home}/bin/configWebSphere.py" token="%%dbURL%%" value="${db.url}"/>
@@ -72,7 +73,7 @@
<replace file="${was.home}/bin/configWebSphere.py" token="%%oracleExtensionLibDir%%" value="${oracle.extensions.jar.dir}"/>
<sleep seconds="20"/>
<exec executable="${was.home}/bin/wsadmin.${suffix}">
- <arg line="-lang jython -f ${was.home}/bin/configWebSphere.py"/>
+ <arg line="-lang jython -user ${server.user} -password ${server.pwd} -f ${was.home}/bin/configWebSphere.py"/>
</exec>
</target>
@@ -97,11 +98,15 @@
<target name="websphere-deploy">
<echo message="*****Deploy ${application.name} on WebSphere Server*****"/>
<copy overwrite="true" file="${was.jython.scripts.dir}/installApps.py" tofile="${was.home}/bin/installApps.py"/>
+ <replace file="${was.home}/bin/installApps.py" token="%%serverVersion%%" value="${server.version}"/>
+ <replace file="${was.home}/bin/installApps.py" token="%%cellName%%" value="${cellName}"/>
+ <replace file="${was.home}/bin/installApps.py" token="%%nodeName%%" value="${nodeName}"/>
+ <replace file="${was.home}/bin/installApps.py" token="%%serverName%%" value="${serverName}"/>
<replace file="${was.home}/bin/installApps.py" token="%%appName%%" value="${application.name}"/>
<replace file="${was.home}/bin/installApps.py" token="%%ear%%" value="${application.name}.ear"/>
<sleep seconds="20"/>
<exec executable="${was.home}/bin/wsadmin.${suffix}">
- <arg line="-lang jython -f ${was.home}/bin/installApps.py"/>
+ <arg line="-lang jython -user ${server.user} -password ${server.pwd} -f ${was.home}/bin/installApps.py"/>
</exec>
</target>
@@ -115,7 +120,7 @@
<replace file="${was.home}/bin/unInstallApps.py" token="%%appName%%" value="${application.name}"/>
<sleep seconds="20"/>
<exec executable="${was.home}/bin/wsadmin.${suffix}">
- <arg line="-lang jython -f ${was.home}/bin/unInstallApps.py"/>
+ <arg line="-lang jython -user ${server.user} -password ${server.pwd} -f ${was.home}/bin/unInstallApps.py"/>
</exec>
</target>