Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/Testing/CacheCoordination"

(New page: JMS CacheCoordination Testing How to run EclipseLink JMS CacheCoordination on WebLogic 10.3 Using single machine Using multiple machines Testing With Single Machine (or localhost) Conf...)
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
JMS CacheCoordination Testing
+
=CacheCoordination Testing=
How to run EclipseLink JMS CacheCoordination on WebLogic 10.3
+
  
Using single machine
 
Using multiple machines
 
  
+
==How to run EclipseLink JMS CacheCoordination Testing on WebLogic 10.3==
Testing With Single Machine (or localhost) Configuration
+
 
  
    * This test configuration assumes you're running following steps from EclipseLink's trunk/jpa/eclipselink.jpa.test directory
+
=== Testing With Single Machine (or localhost) Configuration ===
 +
 
 +
* This test configuration assumes you're running following steps from EclipseLink's trunk/jpa/eclipselink.jpa.test directory
 +
* Instructions are for Linux/Unix, but with minor changes in scripts/commands can be run on Windows.
  
 
1) Modify setEnv.sh as follow:
 
1) Modify setEnv.sh as follow:
 
+
<pre>
 
setenv WL_HOME /yourMiddleware_home/wlserver_10.3
 
setenv WL_HOME /yourMiddleware_home/wlserver_10.3
 
setenv JAVA_HOME /yourMiddleware_home/jrockit_160_05_R27.6.2-20
 
setenv JAVA_HOME /yourMiddleware_home/jrockit_160_05_R27.6.2-20
 
setenv ANT_HOME /yourMiddleware_home/modules/org.apache.ant_1.7.0
 
setenv ANT_HOME /yourMiddleware_home/modules/org.apache.ant_1.7.0
 
setenv PATH ${PATH}:${WL_HOME}/server/native/linux/i686
 
setenv PATH ${PATH}:${WL_HOME}/server/native/linux/i686
 +
</pre>
  
 
2) Modify test.properties with serverName and DBconfig:
 
2) Modify test.properties with serverName and DBconfig:
 
+
<pre>
 
server.name=weblogic
 
server.name=weblogic
 
jdbc.driver.jar=../../../extension.oracle.lib.external/ojdbc6_11.jar
 
jdbc.driver.jar=../../../extension.oracle.lib.external/ojdbc6_11.jar
Line 26: Line 27:
 
db.pwd=password
 
db.pwd=password
 
db.platform=org.eclipse.persistence.platform.database.oracle.Oracle11Platform
 
db.platform=org.eclipse.persistence.platform.database.oracle.Oracle11Platform
 +
</pre>
  
 
3) Modify weblogic.properties with following:
 
3) Modify weblogic.properties with following:
 
+
<pre>
 
server.url=t3://myhostName:7001/
 
server.url=t3://myhostName:7001/
 
server.lib=/yourMiddleware_home/wlserver_10.3/server/lib
 
server.lib=/yourMiddleware_home/wlserver_10.3/server/lib
Line 46: Line 48:
 
rcm.wls.server3.port=7031
 
rcm.wls.server3.port=7031
 
cachecoordination.protocol=jms
 
cachecoordination.protocol=jms
 +
</pre>
  
 
4) Modify weblogic.xml to replace "localhost" with your HostName:
 
4) Modify weblogic.xml to replace "localhost" with your HostName:
 
+
<pre>
 
     <target name="weblogic-start-nosleep">
 
     <target name="weblogic-start-nosleep">
 
         <wlserver fork="true" spawn="true" weblogichome="${weblogic.home}"
 
         <wlserver fork="true" spawn="true" weblogichome="${weblogic.home}"
Line 61: Line 64:
 
         </wlserver>
 
         </wlserver>
 
     </target>
 
     </target>
 +
</pre>
  
 
5) Configure domain and start AdminServer: Run setEnv.sh, then run targets server-install and server-start:
 
5) Configure domain and start AdminServer: Run setEnv.sh, then run targets server-install and server-start:
 
+
<pre>
 
source setEnv.sh
 
source setEnv.sh
 
ant -l wl_install.log server-install
 
ant -l wl_install.log server-install
 
ant -l wl_start.log server-start
 
ant -l wl_start.log server-start
 +
</pre>
  
 
6) Configure JDBC datasource: while AdminServer(server1) is running, in separate terminal run server-setup target, then server-stop:
 
6) Configure JDBC datasource: while AdminServer(server1) is running, in separate terminal run server-setup target, then server-stop:
 
+
<pre>
 
ant  -l wl_setup.log server-setup
 
ant  -l wl_setup.log server-setup
 
ant  -l wl_stop.log server-stop
 
ant  -l wl_stop.log server-stop
 +
</pre>
  
 
7) Prepare for JMS configuration: Remove "lok" files, if any:
 
7) Prepare for JMS configuration: Remove "lok" files, if any:
 
+
<pre>
 
rm /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/edit.lok
 
rm /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/edit.lok
 
rm /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/config/config.lok
 
rm /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/config/config.lok
 +
</pre>
  
 
8) Configure WL for JMS Cachecoordination:
 
8) Configure WL for JMS Cachecoordination:
 
copy following into an xml file (namely, interop-jms.xml) and place it in /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/config/jms/
 
copy following into an xml file (namely, interop-jms.xml) and place it in /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/config/jms/
 
+
<pre>
 
<weblogic-jms xmlns=...>
 
<weblogic-jms xmlns=...>
  
Line 98: Line 105:
 
  </topic>
 
  </topic>
 
</weblogic-jms>
 
</weblogic-jms>
 
+
</pre>
  
 
9) Make changes to /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/config/config.xml as shown below:
 
9) Make changes to /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/config/config.xml as shown below:
 
+
<pre>
 
<server>
 
<server>
 
<name>myserver</name>
 
<name>myserver</name>
Line 139: Line 146:
 
<descriptor-file-name>jms/interop-jms.xml</descriptor-file-name>
 
<descriptor-file-name>jms/interop-jms.xml</descriptor-file-name>
 
</jms-interop-module>
 
</jms-interop-module>
 +
</pre>
  
 
10) Also add all servers to JDBC-system-resource target element:
 
10) Also add all servers to JDBC-system-resource target element:
 
+
<pre>
 
<jdbc-system-resource>
 
<jdbc-system-resource>
 
<name>CP-ejbPool</name>
 
<name>CP-ejbPool</name>
Line 154: Line 162:
 
<descriptor-file-name>jdbc/TxDS-EclipseLinkDS-6646-jdbc.xml</descriptor-file-name>
 
<descriptor-file-name>jdbc/TxDS-EclipseLinkDS-6646-jdbc.xml</descriptor-file-name>
 
</jdbc-system-resource>
 
</jdbc-system-resource>
 +
</pre>
  
 
11) Start all servers using following target from trunk/jpa/eclipselink.jpa.test:
 
11) Start all servers using following target from trunk/jpa/eclipselink.jpa.test:
 
+
<pre>
 
ant -f build.xml -l rcm_start.log server-start-cachecoordination
 
ant -f build.xml -l rcm_start.log server-start-cachecoordination
 +
</pre>
  
 
12) Run CacheCoordination tests using following target from trunk/jpa/eclipselink.jpa.test:
 
12) Run CacheCoordination tests using following target from trunk/jpa/eclipselink.jpa.test:
 
+
<pre>
 
ant -f build.xml -l rcm_test.log server-run-test-cachecoordination
 
ant -f build.xml -l rcm_test.log server-run-test-cachecoordination
 +
</pre>
  
 
13) (lucky13!) Results are in report dir:
 
13) (lucky13!) Results are in report dir:
  
trunk/jpa/eclipselink.jpa.test/report/junit-noframes.html
+
* trunk/jpa/eclipselink.jpa.test/report/junit-noframes.html
FEB-26-2009: all 6 tests should pass
+
* FEB-26-2009: all 6 tests should pass
  
 
   
 
   
Testing With Multiple Machines (i.e remote managed servers) Configuration
 
  
    * This configuration assumes:
+
=== Testing With Multiple Machines (i.e remote managed servers) Configuration ===
 +
 
 +
 
 +
    '''This configuration assumes:'''
 
           o AdminServer(server1) and one managedServer(server3) will be on Machine1(localhost)
 
           o AdminServer(server1) and one managedServer(server3) will be on Machine1(localhost)
 
           o managedServer2(server2) will be hosted on Machine2(remote)
 
           o managedServer2(server2) will be hosted on Machine2(remote)
  
 
1) Follow steps 1 thru 4 from "Testing with Single Machine Configuration" above
 
1) Follow steps 1 thru 4 from "Testing with Single Machine Configuration" above
2) Install WL on all machines(Machine1, Machine2) that going to be included as part of Cluster (need to confirm if this is really necessary)
+
 
 +
2) Install WL on all machines(Machine1, Machine2) that going to be included as part of Cluster (need to confirm if this is really necessary)
  
 
3)  On Machine1, create a cluster as follow:
 
3)  On Machine1, create a cluster as follow:
Line 187: Line 201:
  
 
4) On Machine1, from yourWL_ROOT_DIR/wlserver_10.3/common/bin/ dir, you could "pack" template of your domain: see http://edocs.bea.com/common/docs103/pack/tasks.html
 
4) On Machine1, from yourWL_ROOT_DIR/wlserver_10.3/common/bin/ dir, you could "pack" template of your domain: see http://edocs.bea.com/common/docs103/pack/tasks.html
 
+
<pre>
 
./pack.sh -managed=true -domain=yourDomain_DIR -template=mydomain_managed.jar -template_name="MyManagedServerDomain"
 
./pack.sh -managed=true -domain=yourDomain_DIR -template=mydomain_managed.jar -template_name="MyManagedServerDomain"
 +
</pre>
  
 
5) Copy template jar generated in step 4 above to Machine2. Then to create managedServer from the template, go to Machine2/yourWL_ROOT_DIR/wlserver_10.3/common/bin/ dir, you could "unpack" template of your domain: see http://edocs.bea.com/common/docs103/pack/tasks.html
 
5) Copy template jar generated in step 4 above to Machine2. Then to create managedServer from the template, go to Machine2/yourWL_ROOT_DIR/wlserver_10.3/common/bin/ dir, you could "unpack" template of your domain: see http://edocs.bea.com/common/docs103/pack/tasks.html
 
+
<pre>
 
./unpack.sh -managed=true -domain=yourDomain_DIR -template=mydomain_managed.jar"
 
./unpack.sh -managed=true -domain=yourDomain_DIR -template=mydomain_managed.jar"
 +
</pre>
  
 
6) Configure JDBC datasource and JMS server on adminServer either using AdminConsole or following steps 7 thru 10 from "Testing with Single Machine Configuration" above
 
6) Configure JDBC datasource and JMS server on adminServer either using AdminConsole or following steps 7 thru 10 from "Testing with Single Machine Configuration" above
Line 198: Line 214:
 
7) start adminServer(myserver) from Machine1's yourDomain directory:
 
7) start adminServer(myserver) from Machine1's yourDomain directory:
  
     * bin/startWebLogic.sh
+
     bin/startWebLogic.sh
  
 
8) start remote managedServer(server2) from Machine2's yourDomain directory:
 
8) start remote managedServer(server2) from Machine2's yourDomain directory:
  
     * bin/startserver2.sh
+
     bin/startserver2.sh
  
 
9) start local managedServer(server3) from Machine1's yourDomain directory:
 
9) start local managedServer(server3) from Machine1's yourDomain directory:
  
     * bin/startManagedWebLogic.sh server3 http://adminServerHost:adminServerPort
+
     bin/startManagedWebLogic.sh server3 http://adminServerHost:adminServerPort
  
 
10) Run tests following step #12 from "Testing with Single Machine Configuration" above
 
10) Run tests following step #12 from "Testing with Single Machine Configuration" above

Latest revision as of 09:51, 3 March 2009

CacheCoordination Testing

How to run EclipseLink JMS CacheCoordination Testing on WebLogic 10.3

Testing With Single Machine (or localhost) Configuration

  • This test configuration assumes you're running following steps from EclipseLink's trunk/jpa/eclipselink.jpa.test directory
  • Instructions are for Linux/Unix, but with minor changes in scripts/commands can be run on Windows.

1) Modify setEnv.sh as follow:

setenv WL_HOME /yourMiddleware_home/wlserver_10.3
setenv JAVA_HOME /yourMiddleware_home/jrockit_160_05_R27.6.2-20
setenv ANT_HOME /yourMiddleware_home/modules/org.apache.ant_1.7.0
setenv PATH ${PATH}:${WL_HOME}/server/native/linux/i686

2) Modify test.properties with serverName and DBconfig:

server.name=weblogic
jdbc.driver.jar=../../../extension.oracle.lib.external/ojdbc6_11.jar
db.driver=oracle.jdbc.OracleDriver
db.url=jdbc:oracle:thin:@localhost:1521:toplink
db.user=username
db.pwd=password
db.platform=org.eclipse.persistence.platform.database.oracle.Oracle11Platform

3) Modify weblogic.properties with following:

server.url=t3://myhostName:7001/
server.lib=/yourMiddleware_home/wlserver_10.3/server/lib
weblogic.home=/yourMiddleware_home/wlserver_10.3/server/
weblogic.domain=/yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink
weblogic.port=7001
weblogic.host=myhostName
domain.name=eclipselink
rcm.wls.server1.httphost=${weblogic.host}
rcm.wls.server2.httphost=${weblogic.host}
rcm.wls.server3.httphost=${weblogic.host}
rcm.wls.server1.name=myserver
rcm.wls.server2.name=server2
rcm.wls.server3.name=server3
rcm.wls.server1.port=7001
rcm.wls.server2.port=7021
rcm.wls.server3.port=7031
cachecoordination.protocol=jms

4) Modify weblogic.xml to replace "localhost" with your HostName:

    <target name="weblogic-start-nosleep">
        <wlserver fork="true" spawn="true" weblogichome="${weblogic.home}"
            dir="${weblogic.domain}" host="myhostName" generateConfig="true" verbose="true"
            username="${server.user}" password="${server.pwd}" action="start">

	    ............
    <target name="weblogic-stop">
        <wlserver fork="true" failonerror="false" weblogichome="${weblogic.home}"
            dir="${weblogic.domain}" host="myhostName"
            username="${server.user}" password="${server.pwd}" action="shutdown">
        </wlserver>
    </target>

5) Configure domain and start AdminServer: Run setEnv.sh, then run targets server-install and server-start:

source setEnv.sh
ant -l wl_install.log server-install
ant -l wl_start.log server-start

6) Configure JDBC datasource: while AdminServer(server1) is running, in separate terminal run server-setup target, then server-stop:

ant  -l wl_setup.log server-setup
ant  -l wl_stop.log server-stop

7) Prepare for JMS configuration: Remove "lok" files, if any:

rm /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/edit.lok
rm /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/config/config.lok

8) Configure WL for JMS Cachecoordination: copy following into an xml file (namely, interop-jms.xml) and place it in /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/config/jms/

<weblogic-jms xmlns=...>

<connection-factory name="EclipseLink Topic Factory">
     <jndi-name>jms/EclipseLinkTopicConnectionFactory</jndi-name>
     <transaction-params>
     <xa-connection-factory-enabled>false</xa-connection-factory-enabled>
     </transaction-params>
 </connection-factory>

  <topic name="EclipseLink Topic">
     <sub-deployment-name>EclipseLink JMSServer</sub-deployment-name>
     <delivery-params-overrides>
     <delivery-mode>Non-Persistent</delivery-mode>
     </delivery-params-overrides>
     <jndi-name>jms/EclipseLinkTopic</jndi-name>
 </topic>
</weblogic-jms>

9) Make changes to /yourMiddleware_home/wlserver_10.3/samples/domains/eclipselink/config/config.xml as shown below:

<server>
<name>myserver</name>
<listen-port>7001</listen-port>
<listen-address>myhostName</listen-address>
</server>
<server>
<name>server2</name>
<native-io-enabled>true</native-io-enabled>
<listen-port>7021</listen-port>
<listen-address>myhostName</listen-address>
</server>
<server>
<name>server3</name>
<native-io-enabled>true</native-io-enabled>
<listen-port>7031</listen-port>
<listen-address>myhostName</listen-address>
</server>
...
<jms-server>
<name>EclipseLink JMSServer</name>
<target>myserver</target>
<store-enabled>false</store-enabled>
<allows-persistent-downgrade>true</allows-persistent-downgrade>
<hosting-temporary-destinations>false</hosting-temporary-destinations>
</jms-server>
<jms-interop-module>
<name>interop-jms</name>
<sub-deployment>
<name>EclipseLink Topic Factory</name>
<target>myserver</target>
</sub-deployment>
<sub-deployment>
<name>EclipseLink JMSServer</name>
<target>EclipseLink JMSServer</target>
</sub-deployment>
<descriptor-file-name>jms/interop-jms.xml</descriptor-file-name>
</jms-interop-module>

10) Also add all servers to JDBC-system-resource target element:

<jdbc-system-resource>
<name>CP-ejbPool</name>
<target>myserver,server2,server3</target>
<deployment-order>1</deployment-order>
<descriptor-file-name>jdbc/CP-ejbPool-1657-jdbc.xml</descriptor-file-name>
</jdbc-system-resource>
<jdbc-system-resource>
<name>TxDS-EclipseLinkDS</name>
<target>myserver,server2,server3</target>
<deployment-order>4</deployment-order>
<descriptor-file-name>jdbc/TxDS-EclipseLinkDS-6646-jdbc.xml</descriptor-file-name>
</jdbc-system-resource>

11) Start all servers using following target from trunk/jpa/eclipselink.jpa.test:

ant -f build.xml -l rcm_start.log server-start-cachecoordination

12) Run CacheCoordination tests using following target from trunk/jpa/eclipselink.jpa.test:

ant -f build.xml -l rcm_test.log server-run-test-cachecoordination

13) (lucky13!) Results are in report dir:

  • trunk/jpa/eclipselink.jpa.test/report/junit-noframes.html
  • FEB-26-2009: all 6 tests should pass


Testing With Multiple Machines (i.e remote managed servers) Configuration

    This configuration assumes:
         o AdminServer(server1) and one managedServer(server3) will be on Machine1(localhost)
         o managedServer2(server2) will be hosted on Machine2(remote)

1) Follow steps 1 thru 4 from "Testing with Single Machine Configuration" above

2) Install WL on all machines(Machine1, Machine2) that going to be included as part of Cluster (need to confirm if this is really necessary)

3) On Machine1, create a cluster as follow:

   * create two managed servers (server3 with Machine1's ListenAddress, and server2 with Machine2's ListenAddress)
   * create two machines (machine1, machine2)
   * create a cluster (mycluster with default listenAddress and optionally change portNumber to 7011)
   * add two managed servers (server2, server3) to the cluster(mycluster)
   * name the domain (eclipselink) and set location (i.e yourWL_ROOT_DIR/wlserver_10.3/samples/domains)

4) On Machine1, from yourWL_ROOT_DIR/wlserver_10.3/common/bin/ dir, you could "pack" template of your domain: see http://edocs.bea.com/common/docs103/pack/tasks.html

./pack.sh -managed=true -domain=yourDomain_DIR -template=mydomain_managed.jar -template_name="MyManagedServerDomain"

5) Copy template jar generated in step 4 above to Machine2. Then to create managedServer from the template, go to Machine2/yourWL_ROOT_DIR/wlserver_10.3/common/bin/ dir, you could "unpack" template of your domain: see http://edocs.bea.com/common/docs103/pack/tasks.html

./unpack.sh -managed=true -domain=yourDomain_DIR -template=mydomain_managed.jar"

6) Configure JDBC datasource and JMS server on adminServer either using AdminConsole or following steps 7 thru 10 from "Testing with Single Machine Configuration" above

7) start adminServer(myserver) from Machine1's yourDomain directory:

   bin/startWebLogic.sh

8) start remote managedServer(server2) from Machine2's yourDomain directory:

   bin/startserver2.sh

9) start local managedServer(server3) from Machine1's yourDomain directory:

   bin/startManagedWebLogic.sh server3 http://adminServerHost:adminServerPort

10) Run tests following step #12 from "Testing with Single Machine Configuration" above

Back to the top