| <?xml version="1.0" encoding="ISO-8859-1"?> |
| <!-- |
| |
| Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. |
| |
| This program and the accompanying materials are made available under the |
| terms of the Eclipse Public License v. 2.0, which is available at |
| http://www.eclipse.org/legal/epl-2.0. |
| |
| This Source Code may also be made available under the following Secondary |
| Licenses when the conditions for such availability set forth in the |
| Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| version 2 with the GNU Classpath Exception, which is available at |
| https://www.gnu.org/software/classpath/license.html. |
| |
| SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| |
| --> |
| |
| <!DOCTYPE project [ |
| <!ENTITY commonSetup SYSTEM "file:./../../../../config/properties.xml"> |
| <!ENTITY commonBuild SYSTEM "file:./../../../../config/common.xml"> |
| <!ENTITY testproperties SYSTEM "file:./build.properties"> |
| <!ENTITY run SYSTEM "file:./../../../../config/run.xml"> |
| ]> |
| |
| <project name="loadbalancing" default="usage" basedir="."> |
| |
| &commonSetup; |
| &commonBuild; |
| &testproperties; |
| &run; |
| |
| <target name="all" depends="build,setup,deploy,run,undeploy,unsetup"/> |
| <target name="run-test" depends="build,deploy,run,undeploy"/> |
| |
| <target name="clean" depends="init-common"> |
| <antcall target="clean-common"/> |
| </target> |
| |
| <target name="compile" depends="clean"> |
| <antcall target="compile-common"> |
| <param name="src" value="ejb"/> |
| </antcall> |
| <antcall target="compile-common"> |
| <param name="src" value="client"/> |
| </antcall> |
| </target> |
| |
| <target name="build" depends="compile"> |
| <antcall target="build-ear-common"> |
| <param name="ejbjar.classes" |
| value="**/*Student*.class,**/*Enroller*.class,**/*Course*.class" /> |
| <param name="appclientjar.classes" |
| value="**/Course.class,**/Enroller.class,**/Student.class,**/*Home*.class,**/*Client*.class" /> |
| </antcall> |
| </target> |
| |
| <target name="setup" depends="init-common"> |
| <antcall target="execute-sql-common"> |
| <param name="sql.file" value="sql/create_pointbase.sql"/> |
| </antcall> |
| <antcall target="deploy-jdbc-common"> |
| <param name="jdbc.conpool.name" value="bmpEnrollerPool"/> |
| <param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB"/> |
| </antcall> |
| <antcall target="deploy-jms-common"/> |
| <!--<antcall target="reconfig-common"/>--> |
| </target> |
| |
| <target name="deploy" depends="init-common"> |
| <echo message="Deploying via asadmin..."/> |
| <antcall target="deploy-common"/> |
| </target> |
| |
| <target name="run" depends="init-common"> |
| <antcall target="runclient-common"> |
| |
| </antcall> |
| <!-- |
| Clean the database after the run since it prohibits re-running |
| --> |
| <antcall target="execute-sql-common"> |
| <param name="sql.file" value="sql/drop_pointbase.sql"/> |
| </antcall> |
| <antcall target="execute-sql-common"> |
| <param name="sql.file" value="sql/create_pointbase.sql"/> |
| </antcall> |
| <!--antcall target="run-standalone-client-threading"> |
| <param name="ctxFactory" value="com.sun.appserv.naming.S1ASCtxFactory"/> |
| </antcall> |
| <antcall target="run-standalone-client-threading"> |
| <param name="ctxFactory" value="com.sun.enterprise.naming.SerialInitContextFactory"/> |
| </antcall--> |
| </target> |
| |
| <target name="sql" depends="init-common"> |
| <!-- |
| Clean the database after the run since it prohibits re-running |
| --> |
| <antcall target="execute-sql-common"> |
| <param name="sql.file" value="sql/drop_pointbase.sql"/> |
| </antcall> |
| <antcall target="execute-sql-common"> |
| <param name="sql.file" value="sql/create_pointbase.sql"/> |
| </antcall> |
| </target> |
| <target name="run-appclient" depends="init-common"> |
| <echo message="running in ACC with SerialInitContextFactory..."/> |
| <antcall target="runclient-common"> |
| <param name="appclient.application.args" value="-xml ./descriptor/sun-acc-lb.xml"/> |
| </antcall> |
| </target> |
| |
| <!-- =============================================== --> |
| <!-- Target to run the standalone client without ACC --> |
| <!-- =============================================== --> |
| <target name="run-standalone-client-threading" depends="init-common"> |
| <java classname="com.sun.s1peqe.loadbalancing.client.EnrollerClientthreading" |
| classpath="${env.S1AS_HOME}/imq/lib/imq.jar:${env.S1AS_HOME}/imq/lib/imqjmsra.jar:${env.S1AS_HOME}/imq/lib/jms.jar:${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar" |
| failonerror="true" fork="true"> |
| <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/> |
| <!--jvmarg value="-Djava.naming.provider.url=iiop://${admin.host}:${orb.port}"/--> |
| <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/> |
| <!-- <jvmarg value="-Djavax.rmi.CORBA.UtilClass=com.sun.corba.ee.impl.javax.rmi.CORBA.Util"/> |
| <jvmarg value="-Dorg.omg.CORBA.ORBClass=com.sun.corba.ee.impl.orb.ORBImpl"/> |
| <jvmarg value="-Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.ee.impl.orb.ORBSingleton"/> --> |
| <arg value="${ctxFactory}"/> |
| </java> |
| </target> |
| |
| <!-- =============================================== --> |
| <!-- Target to run the standalone client without ACC --> |
| <!-- =============================================== --> |
| <target name="run-standalone-client" depends="init-common"> |
| <property name="client.type" |
| value="standalone"/> |
| <java classname="com.sun.s1peqe.loadbalancing.client.EnrollerClient" |
| classpath="${env.S1AS_HOME}/imq/lib/imq.jar:${env.S1AS_HOME}/imq/lib/imqjmsra.jar:${env.S1AS_HOME}/imq/lib/jms.jar:${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar" |
| failonerror="true" fork="true"> |
| <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/> |
| <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/> |
| <!-- <jvmarg value="-Djavax.rmi.CORBA.UtilClass=com.sun.corba.ee.impl.javax.rmi.CORBA.Util"/> |
| <jvmarg value="-Dorg.omg.CORBA.ORBClass=com.sun.corba.ee.impl.orb.ORBImpl"/> |
| <jvmarg value="-Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.ee.impl.orb.ORBSingleton"/> --> |
| <arg value="${client.type}"/> |
| </java> |
| </target> |
| |
| <target name="undeploy" depends="init-common"> |
| <antcall target="undeploy-common"/> |
| </target> |
| |
| <target name="unsetup" depends="init-common"> |
| <antcall target="undeploy-jms-common"/> |
| <antcall target="execute-sql-common"> |
| <param name="sql.file" value="sql/drop_pointbase.sql"/> |
| </antcall> |
| <antcall target="undeploy-jdbc-common"> |
| <param name="jdbc.conpool.name" value="bmpEnrollerPool"/> |
| <param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB"/> |
| </antcall> |
| </target> |
| |
| <target name="usage"> |
| <antcall target="usage-common"/> |
| </target> |
| |
| <target name="restart"> |
| <antcall target="restart-server-instance-common"/> |
| </target> |
| |
| </project> |