|
| 1 | +<?xml version="1.0"?> |
| 2 | + |
| 3 | +<!-- |
| 4 | + Copyright (c) 2017, 2016, Oracle and/or its affiliates. All rights reserved. |
| 5 | +
|
| 6 | + NAME |
| 7 | + build.xml - For compiling and running connection management samples |
| 8 | +
|
| 9 | + DESCRIPTION |
| 10 | + Use this build.xml for compiling and running connection |
| 11 | + management related code samples. |
| 12 | +--> |
| 13 | + |
| 14 | +<project name="OracleJdbcSamples" default="compile"> |
| 15 | + <description>Build and run Oracle Jdbc Samples</description> |
| 16 | + |
| 17 | + <property environment="env" /> |
| 18 | + <property name="ORACLE_HOME" value="${env.ORACLE_HOME}" /> |
| 19 | + <property name="JDK8" location="${ORACLE_HOME}/jdk8" /> |
| 20 | + <property name="jdk.javac" location="${JDK8}/bin/javac" /> |
| 21 | + <property name="jdk.java" location="${JDK8}/bin/java" /> |
| 22 | + <property name="jdk.jar" location="${JDK8}/bin/jar" /> |
| 23 | + |
| 24 | + <!-- ///////////////////// classpath /////////////////////////// --> |
| 25 | + <path id="java.classpath"> |
| 26 | + <pathelement path="lib/ojdbc7.jar" /> |
| 27 | + <pathelement path="lib/ucp.jar" /> |
| 28 | + <pathelement path="lib/ons.jar" /> |
| 29 | + <pathelement location="classes/" /> |
| 30 | + </path> |
| 31 | + |
| 32 | + <!-- ///////////////////////////////////////////////////////////// --> |
| 33 | + <!-- TARGETS --> |
| 34 | + <!-- ///////////////////////////////////////////////////////////// --> |
| 35 | + <target name="compile"> |
| 36 | + <mkdir dir="classes"/> |
| 37 | + <!-- ////////////////// Compile java file //////////////// --> |
| 38 | + <javac srcdir="src" destdir="classes" debug="yes" includeantruntime="false" fork="yes" executable="${jdk.javac}"> |
| 39 | + <classpath refid="java.classpath" /> |
| 40 | + <include name="**/*.java" /> |
| 41 | + </javac> |
| 42 | + |
| 43 | + </target> |
| 44 | + |
| 45 | + <target name="clean"> |
| 46 | + <delete> |
| 47 | + <fileset dir="classes" includes="*"/> |
| 48 | + </delete> |
| 49 | + </target> |
| 50 | + |
| 51 | + <target name="run" depends="compile"> |
| 52 | + <java classname="${class.file.name}" fork="true" jvm="${jdk.java}" > |
| 53 | + <classpath refid="java.classpath" /> |
| 54 | + <arg value="${arg.one}" /> |
| 55 | + </java> |
| 56 | + </target> |
| 57 | + |
| 58 | + <echo> Connection Management Samples: Commands to Run </echo> |
| 59 | + <echo> ============================================== </echo> |
| 60 | + <echo> (1) ant UCPSample </echo> |
| 61 | + <echo> (2) ant UCPInactiveConnectionTimeout </echo> |
| 62 | + <echo> (3) ant UCPConnectionWaitTimeout </echo> |
| 63 | + <echo> (4) ant UCPAbandonedConnectionTimeout </echo> |
| 64 | + <echo> (5) ant UCPAbandonedConnectionTimeout </echo> |
| 65 | + <echo> (6) ant UCPTimeToLiveConnectionTimeout </echo> |
| 66 | + <echo> (7) ant UCPConnectionHarvestingSample </echo> |
| 67 | + <echo> (8) ant UCPConnectionLabelingSample </echo> |
| 68 | + <echo> (9) ant UCPWebSessionAffinitySample </echo> |
| 69 | + <echo> (10) ant UCPWithDRCPSample </echo> |
| 70 | + <echo> ============================================== </echo> |
| 71 | + |
| 72 | +<target name="UCPSample" description="Run a sample that exhibits the use Universal Connection Pool (UCP) "> <antcall target="run"> |
| 73 | + <param name="class.file.name" value="UCPSample" /> |
| 74 | + </antcall> |
| 75 | + </target> |
| 76 | + |
| 77 | + |
| 78 | +<target name="UCPWithDRCPSample" description="Run a sample that exhibits the use DRCP "> <antcall target="run"> |
| 79 | + <param name="class.file.name" value="UCPWithDRCPSample" /> |
| 80 | + </antcall> |
| 81 | + </target> |
| 82 | + |
| 83 | + |
| 84 | +<target name="UCPWithTimeoutProperties" description="Run a sample that exhibits different UCP timeout properties "> <antcall target="run"> |
| 85 | + <param name="class.file.name" value="UCPWithTimeoutProperties" /> |
| 86 | + </antcall> |
| 87 | + </target> |
| 88 | + |
| 89 | + <target name="UCPTimeToLiveConnectionTimeout" description="Run a sample that exhibits UCP's TimeToLiveConnectionTimeout property"> |
| 90 | + <antcall target="run"> |
| 91 | + <param name="class.file.name" value="UCPWithTimeoutProperties" /> |
| 92 | + <param name="arg.one" value="runTimeToLive" /> |
| 93 | + </antcall> |
| 94 | + </target> |
| 95 | + |
| 96 | + |
| 97 | +<target name="UCPAbandonedConnectionTimeout" description="Run a sample that exhibits UCP's AbandonedConnectionTimeout property"> <antcall target="run"> |
| 98 | + <param name="class.file.name" value="UCPWithTimeoutProperties" /> |
| 99 | + <param name="arg.one" value="runAbandonedTimeout" /> |
| 100 | + </antcall> |
| 101 | + </target> |
| 102 | + |
| 103 | + |
| 104 | +<target name="UCPInactiveConnectionTimeout" description="Run a sample that exhibits UCP's InactiveConnectionTimeout property"> <antcall target="run"> |
| 105 | + <param name="class.file.name" value="UCPWithTimeoutProperties" /> |
| 106 | + <param name="arg.one" value="runInactiveTimeout" /> |
| 107 | + </antcall> |
| 108 | + </target> |
| 109 | + |
| 110 | + |
| 111 | +<target name="UCPConnectionWaitTimeout" description="Run a sample that exhibits UCP's ConnectionWaitTimeout property"> <antcall target="run"> |
| 112 | + <param name="class.file.name" value="UCPWithTimeoutProperties" /> |
| 113 | + <param name="arg.one" value="runConnectionWaitTimeout" /> |
| 114 | + </antcall> |
| 115 | + </target> |
| 116 | + |
| 117 | +<target name="UCPConnectionHarvestingSample" description="Run a sample that exhibits Connection Harvesting feature of UCP"> <antcall target="run"> |
| 118 | +<param name="class.file.name" value="UCPConnectionHarvestingSample" /> |
| 119 | + </antcall> |
| 120 | +</target> |
| 121 | + |
| 122 | +<target name="UCPConnectionLabelingSample" description="Run a sample that exhibits Connection Labeling feature of UCP"> <antcall target="run"> |
| 123 | + <param name="class.file.name" value="UCPConnectionLabelingSample" /> |
| 124 | + </antcall> |
| 125 | + </target> |
| 126 | + |
| 127 | +<target name="UCPWebSessionAffinitySample" description="Run a sample that exhibits the use of Web Session Affinity"> <antcall target="run"> |
| 128 | + <param name="class.file.name" value="UCPWebSessionAffinitySample" /> |
| 129 | + </antcall> |
| 130 | +</target> |
| 131 | + |
| 132 | +</project> |
| 133 | + |
0 commit comments