Trimming trailing spaces, removing tabs by a script - using tab width of 4 spaces - trailing space in property files is converted to unicode, so it is visible in sources - bat files use CRLF - all other text files use just LF
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/JdbcCommon.xml b/appserver/tests/appserv-tests/devtests/jdbc/JdbcCommon.xml index c1a7c5d..9b8e82c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/JdbcCommon.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/JdbcCommon.xml
@@ -18,7 +18,7 @@ --> <!-- - + Note: The targets here use properties that need to be modified to suit your local settings in the JdbcCommon.properties --> @@ -42,10 +42,10 @@ <target name="create-jdbc-connpool-oracle-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="create-jdbc-connection-pool - --datasourceclassname=${oracle.datasource.class} - --restype=${oracle.resource.type}"/> - <param name="operand.props" value="${oracle.pool.name}"/> + value="create-jdbc-connection-pool + --datasourceclassname=${oracle.datasource.class} + --restype=${oracle.resource.type}"/> + <param name="operand.props" value="${oracle.pool.name}"/> </antcall> <antcall target="set-oracle-props-common"/> @@ -55,10 +55,10 @@ <target name="create-jdbc-driver-connpool-oracle-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="create-jdbc-connection-pool - --driverclassname=${oracle.driver.class} - --restype=${oracle.resource.type}"/> - <param name="operand.props" value="${oracle.pool.name}"/> + value="create-jdbc-connection-pool + --driverclassname=${oracle.driver.class} + --restype=${oracle.resource.type}"/> + <param name="operand.props" value="${oracle.pool.name}"/> </antcall> <antcall target="set-oracle-props-common"/> @@ -68,18 +68,18 @@ <target name="set-oracle-props-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.pool.name}.property.User=${oracle.user}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.pool.name}.property.User=${oracle.user}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.pool.name}.property.Password=${oracle.password}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.pool.name}.property.Password=${oracle.password}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.pool.name}.property.URL=${oracle.url}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.pool.name}.property.URL=${oracle.url}"/> </antcall> </target> @@ -87,9 +87,9 @@ <target name="create-jdbc-resource-oracle-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="create-jdbc-resource - --connectionpoolid ${oracle.pool.name}"/> - <param name="operand.props" value="${oracle.resource.name}"/> + value="create-jdbc-resource + --connectionpoolid ${oracle.pool.name}"/> + <param name="operand.props" value="${oracle.resource.name}"/> </antcall> </target> @@ -97,8 +97,8 @@ <target name="delete-jdbc-connpool-oracle-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="delete-jdbc-connection-pool"/> - <param name="operand.props" value="${oracle.pool.name}"/> + value="delete-jdbc-connection-pool"/> + <param name="operand.props" value="${oracle.pool.name}"/> </antcall> </target> @@ -106,8 +106,8 @@ <target name="delete-jdbc-resource-oracle-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="delete-jdbc-resource"/> - <param name="operand.props" value="${oracle.resource.name}"/> + value="delete-jdbc-resource"/> + <param name="operand.props" value="${oracle.resource.name}"/> </antcall> </target> @@ -125,50 +125,50 @@ <target name="create-jdbc-connpool-oracle-xa-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="create-jdbc-connection-pool - --datasourceclassname=${oracle.xadatasource.class} - --restype=javax.sql.XADataSource"/> - <param name="operand.props" value="${oracle.xapool.name}"/> + value="create-jdbc-connection-pool + --datasourceclassname=${oracle.xadatasource.class} + --restype=javax.sql.XADataSource"/> + <param name="operand.props" value="${oracle.xapool.name}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.xapool.name}.property.User=${oracle.user}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.xapool.name}.property.User=${oracle.user}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.xapool.name}.property.Password=${oracle.password}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.xapool.name}.property.Password=${oracle.password}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.xapool.name}.property.URL=${oracle.url}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${oracle.xapool.name}.property.URL=${oracle.url}"/> </antcall> </target> <target name="create-jdbc-resource-oracle-xa-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="create-jdbc-resource - --connectionpoolid ${oracle.xapool.name}"/> - <param name="operand.props" value="${oracle.xaresource.name}"/> + value="create-jdbc-resource + --connectionpoolid ${oracle.xapool.name}"/> + <param name="operand.props" value="${oracle.xaresource.name}"/> </antcall> </target> <target name="delete-jdbc-connpool-oracle-xa-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="delete-jdbc-connection-pool"/> - <param name="operand.props" value="${oracle.xapool.name}"/> + value="delete-jdbc-connection-pool"/> + <param name="operand.props" value="${oracle.xapool.name}"/> </antcall> </target> <target name="delete-jdbc-resource-oracle-xa-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="delete-jdbc-resource"/> - <param name="operand.props" value="${oracle.xaresource.name}"/> + value="delete-jdbc-resource"/> + <param name="operand.props" value="${oracle.xaresource.name}"/> </antcall> </target> @@ -184,7 +184,7 @@ output="${build.classes.dir}/setupDBTables.out" classpath="${env.APS_HOME}/devtests/jdbc/classes12.zip" /> - + </target> @@ -215,65 +215,65 @@ <param name="operand.props" value="${mysql.xa.pool.name}"/> </antcall> </target> - + <target name="create-jdbc-connpool-mysql-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="create-jdbc-connection-pool - --datasourceclassname=${mysql.datasource.class} - --restype=javax.sql.DataSource"/> - <param name="operand.props" value="${mysql.pool.name}"/> + value="create-jdbc-connection-pool + --datasourceclassname=${mysql.datasource.class} + --restype=javax.sql.DataSource"/> + <param name="operand.props" value="${mysql.pool.name}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.pool.name}.property.User=${mysql.user}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.pool.name}.property.User=${mysql.user}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.pool.name}.property.Password=${mysql.password}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.pool.name}.property.Password=${mysql.password}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.pool.name}.property.serverName=${mysql.serverName}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.pool.name}.property.serverName=${mysql.serverName}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.pool.name}.property.databaseName=${mysql.databaseName}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.pool.name}.property.databaseName=${mysql.databaseName}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.pool.name}.property.port=${mysql.port}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.pool.name}.property.port=${mysql.port}"/> </antcall> </target> <target name="create-jdbc-resource-mysql-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="create-jdbc-resource - --connectionpoolid ${mysql.pool.name}"/> - <param name="operand.props" value="${mysql.resource.name}"/> + value="create-jdbc-resource + --connectionpoolid ${mysql.pool.name}"/> + <param name="operand.props" value="${mysql.resource.name}"/> </antcall> </target> <target name="delete-jdbc-connpool-mysql-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="delete-jdbc-connection-pool"/> - <param name="operand.props" value="${mysql.pool.name}"/> + value="delete-jdbc-connection-pool"/> + <param name="operand.props" value="${mysql.pool.name}"/> </antcall> </target> <target name="delete-jdbc-resource-mysql-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="delete-jdbc-resource"/> - <param name="operand.props" value="${mysql.resource.name}"/> + value="delete-jdbc-resource"/> + <param name="operand.props" value="${mysql.resource.name}"/> </antcall> </target> @@ -290,45 +290,45 @@ <target name="create-jdbc-connpool-mysql-xa-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="create-jdbc-connection-pool - --datasourceclassname=${mysql.xa.datasource.class} - --restype=javax.sql.XADataSource"/> - <param name="operand.props" value="${mysql.xa.pool.name}"/> + value="create-jdbc-connection-pool + --datasourceclassname=${mysql.xa.datasource.class} + --restype=javax.sql.XADataSource"/> + <param name="operand.props" value="${mysql.xa.pool.name}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.xa.pool.name}.property.User=${mysql.user}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.xa.pool.name}.property.User=${mysql.user}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.xa.pool.name}.property.Password=${mysql.password}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.xa.pool.name}.property.Password=${mysql.password}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.xa.pool.name}.property.serverName=${mysql.serverName}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.xa.pool.name}.property.serverName=${mysql.serverName}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.xa.pool.name}.property.databaseName=${mysql.databaseName}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.xa.pool.name}.property.databaseName=${mysql.databaseName}"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.xa.pool.name}.property.port=${mysql.port}"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.${mysql.xa.pool.name}.property.port=${mysql.port}"/> </antcall> </target> <target name="create-jdbc-resource-mysql-xa-common" depends="init-common"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" - value="create-jdbc-resource - --connectionpoolid ${mysql.xa.pool.name}"/> - <param name="operand.props" value="${mysql.xa.resource.name}"/> + value="create-jdbc-resource + --connectionpoolid ${mysql.xa.pool.name}"/> + <param name="operand.props" value="${mysql.xa.resource.name}"/> </antcall> </target> @@ -342,7 +342,7 @@ onerror="continue" print="yes" output="${build.classes.dir}/setupDBTables.out" - classpath="${env.S1AS_HOME}/lib/mysql-connector-java-5.1.7-bin.jar" + classpath="${env.S1AS_HOME}/lib/mysql-connector-java-5.1.7-bin.jar" /> </target> @@ -358,7 +358,7 @@ <condition property="aix"> <os name="AIX"/> </condition> - + <target name="start-derby" depends="init-common"> <antcall target="start-derby-aix"/> <antcall target="start-derby-nonaix"/> @@ -398,7 +398,7 @@ <parallel> <java classname="org.apache.derby.drda.NetworkServerControl" classpath="${db.classpath}" failonerror="true" fork="true"> - <arg line="-h localhost -p 1527 -user ${derby.user} -password ${derby.password} shutdown"/> + <arg line="-h localhost -p 1527 -user ${derby.user} -password ${derby.password} shutdown"/> </java> </parallel> </target> @@ -408,7 +408,7 @@ <parallel> <java classname="org.apache.derby.drda.NetworkServerControl" classpath="${db.classpath}" failonerror="true" fork="true"> - <arg line="-h 0.0.0.0 -p 1527 -user ${derby.user} -password ${derby.password} shutdown"/> + <arg line="-h 0.0.0.0 -p 1527 -user ${derby.user} -password ${derby.password} shutdown"/> </java> </parallel> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauth/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/appauth/build.properties index f8f6a8d..e51e557 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauth/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauth/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-appauth"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauth/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/appauth/build.xml index 0ffcec0..673929c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauth/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauth/build.xml
@@ -40,7 +40,7 @@ <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"/> @@ -52,13 +52,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -81,7 +81,7 @@ <antcall target="runclient-common"/> <antcall target="reset-derby-for-no-authentication"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -94,7 +94,7 @@ </antcall> --> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauth/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/appauth/client/SimpleBMPClient.java index 787259f..c18cf6e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauth/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauth/client/SimpleBMPClient.java
@@ -25,52 +25,52 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class SimpleBMPClient { - + public static void main(String[] args) throws Exception { - + SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "AppAuth "; + String testSuite = "AppAuth "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); - - stat.addDescription("JDBC Application Authentication test"); + + stat.addDescription("JDBC Application Authentication test"); SimpleBMP simpleBMP = simpleBMPHome.create(); - + System.out.println("test 3 will fail with Derby" ); if ( simpleBMP.test1() ) { - stat.addStatus(testSuite+"test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test1 : ", stat.FAIL); - } - if ( simpleBMP.test2() ) { - stat.addStatus(testSuite+"test2 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test2 : ", stat.FAIL); - } + stat.addStatus(testSuite+"test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test1 : ", stat.FAIL); + } + if ( simpleBMP.test2() ) { + stat.addStatus(testSuite+"test2 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test2 : ", stat.FAIL); + } - if ( simpleBMP.test3() ) { - stat.addStatus(testSuite + "test3 : ", stat.PASS); - } else { - stat.addStatus(testSuite + "test3 : ", stat.FAIL); - } - - if ( simpleBMP.test4() ) { - stat.addStatus(testSuite + "test4 : ", stat.PASS); - } else { - stat.addStatus(testSuite + "test4 : ", stat.FAIL); - } + if ( simpleBMP.test3() ) { + stat.addStatus(testSuite + "test3 : ", stat.PASS); + } else { + stat.addStatus(testSuite + "test3 : ", stat.FAIL); + } + + if ( simpleBMP.test4() ) { + stat.addStatus(testSuite + "test4 : ", stat.PASS); + } else { + stat.addStatus(testSuite + "test4 : ", stat.FAIL); + } if ( simpleBMP.test5() ) { - stat.addStatus(testSuite + "test5 : ", stat.PASS); - } else { - stat.addStatus(testSuite + "test5 : ", stat.FAIL); - } + stat.addStatus(testSuite + "test5 : ", stat.PASS); + } else { + stat.addStatus(testSuite + "test5 : ", stat.FAIL); + } System.out.println("jdbc appauth status: "); - stat.printSummary(); + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauth/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/appauth/descriptor/ejb-jar.xml index e1c6e75..0f2b4ca 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauth/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauth/descriptor/ejb-jar.xml
@@ -55,6 +55,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauth/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/appauth/ejb/SimpleBMPBean.java index 23bc657..2bca7de 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauth/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauth/ejb/SimpleBMPBean.java
@@ -81,7 +81,7 @@ } public boolean test3() { - //application auth + wrong user/pwd + //application auth + wrong user/pwd Connection conn = null; boolean passed = false; try { @@ -136,7 +136,7 @@ public boolean test5() { //application auth + user/pwd specified - right initial //ensure that connection with same username is returned in both the cases. - + Connection conn = null; Connection conn2 = null; boolean passed = false;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauth/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/appauth/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauth/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauth/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauth/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/appauth/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauth/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauth/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/build.properties index 96573d4..96515ac 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-appauthtx"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="jdbc.resource.type" value="javax.sql.XADataSource"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/build.xml index 9f0277a..08c3d00 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/build.xml
@@ -40,7 +40,7 @@ <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"/> @@ -52,12 +52,12 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> + </target> <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> @@ -71,9 +71,9 @@ <param name="jdbc.conpool.name" value="jdbc-appauth-pool1"/> <param name="jdbc.resource.name" value="jdbc/s1qeappauth1"/> </antcall> - + <antcall target="deploy-common"/> - </target> + </target> @@ -85,7 +85,7 @@ <antcall target="runclient-common"/> <antcall target="reset-derby-for-no-authentication"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="undeploy-common"/> @@ -100,7 +100,7 @@ <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/client/SimpleBMPClient.java index 52576e7..99430c6 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/client/SimpleBMPClient.java
@@ -28,38 +28,38 @@ public static void main(String[] args) throws Exception { - - String testSuite = "AppAuthTX "; - SimpleReporterAdapter stat = new SimpleReporterAdapter(); + + String testSuite = "AppAuthTX "; + SimpleReporterAdapter stat = new SimpleReporterAdapter(); InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - stat.addDescription("JDBC Application Authentication TX test"); - + stat.addDescription("JDBC Application Authentication TX test"); + System.out.println(" All tests will fail with Derby till XA driver is fixed"); - if ( simpleBMP.test1() ) { - stat.addStatus(testSuite+"test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test1 : ", stat.FAIL); - } + if ( simpleBMP.test1() ) { + stat.addStatus(testSuite+"test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test1 : ", stat.FAIL); + } - if ( simpleBMP.test2() ) { - stat.addStatus(testSuite+"test2 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test2 : ", stat.FAIL); - } + if ( simpleBMP.test2() ) { + stat.addStatus(testSuite+"test2 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test2 : ", stat.FAIL); + } - if ( simpleBMP.test3() ) { - stat.addStatus(testSuite+"test3 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test3 : ", stat.FAIL); - } - - System.out.println("jdbc appauthtx status:"); - stat.printSummary(); + if ( simpleBMP.test3() ) { + stat.addStatus(testSuite+"test3 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test3 : ", stat.FAIL); + } + + System.out.println("jdbc appauthtx status:"); + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/descriptor/ejb-jar.xml index 2a04168..3570a79 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/descriptor/ejb-jar.xml
@@ -55,6 +55,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/ejb/SimpleBMPBean.java index d49233d..b2297c1 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/ejb/SimpleBMPBean.java
@@ -31,78 +31,78 @@ int id; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSourcetx"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSourcetx"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } System.out.println("[**SimpleBMPBean**] Done with setEntityContext...."); } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } public boolean test1() { //application auth + user/pwd not specified - should fail - Connection conn = null; - boolean passed = false; - try { - conn = ds.getConnection(); - } catch (Exception e) { - passed = true; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - - return passed; + Connection conn = null; + boolean passed = false; + try { + conn = ds.getConnection(); + } catch (Exception e) { + passed = true; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } } - + + + return passed; + } + public boolean test2() { //application auth + user/pwd specified - should pass - Connection conn = null; - boolean passed = true; - try { - conn = ds.getConnection("DBUSER", "DBPASSWORD"); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + Connection conn = null; + boolean passed = true; + try { + conn = ds.getConnection("DBUSER", "DBPASSWORD"); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - return passed; + return passed; } public boolean test3() { - //application auth + wrong user/pwd - Connection conn = null; - boolean passed = false; - try { - conn = ds.getConnection("xyz", "xyz" ); - } catch (Exception e) { - passed = true; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + //application auth + wrong user/pwd + Connection conn = null; + boolean passed = false; + try { + conn = ds.getConnection("xyz", "xyz" ); + } catch (Exception e) { + passed = true; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - return passed; + return passed; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/appauthtx/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appbasedMonitoring/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/appbasedMonitoring/build.xml index b995be4..7102e7b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appbasedMonitoring/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/appbasedMonitoring/build.xml
@@ -61,7 +61,7 @@ <target name="clean" depends="init-common"> <antcall target="clean-common"/> </target> - + <target name="compile" depends="clean"> <antcall target="compile-common"> <param name="src" value="client"/> @@ -74,21 +74,21 @@ <param name="appclientjar.classes" value="**/*Client*.class" /> <param name="appclientjar.files" value="${build.classes.dir}" /> <param name="appname" value="appmonitoring"/> - <param name="appclient.jar" value="${assemble.dir}/appmonitoringAppClient.jar"/> + <param name="appclient.jar" value="${assemble.dir}/appmonitoringAppClient.jar"/> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <exec executable="${ASADMIN}" failonerror="true"> <arg line="deploy"/> <arg line="${as.props}"/> <arg line="--upload=true"/> - <arg line="--retrieve ${assemble.dir}"/> - <arg line="--target ${appserver.instance.name}"/> + <arg line="--retrieve ${assemble.dir}"/> + <arg line="--target ${appserver.instance.name}"/> <arg line="${assemble.dir}/appmonitoringAppClient.jar"/> </exec> </target> - + <target name="run" depends="init-common"> <echo message="appclient -client ${assemble.dir}/appmonitoringAppClient.jar -name appmonitoringClient -textauth -user j2ee -password j2ee -xml ${env.S1AS_HOME}/domains/${admin.domain}/config/glassfish-acc.xml ${appclient.application.args}"/> <exec executable="${APPCLIENT}" failonerror="false"> @@ -114,12 +114,12 @@ <exec executable="${ASADMIN}" failonerror="false"> <arg line="undeploy"/> <arg line="${as.props}"/> - <arg line="--target ${appserver.instance.name}"/> + <arg line="--target ${appserver.instance.name}"/> <arg line="appmonitoringAppClient"/> </exec> <ant dir="../contauth" target="undeploy"/> <ant dir="../statementtimeout" target="undeploy-limited"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/appbasedMonitoring/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/appbasedMonitoring/client/Client.java index 48693a5..ba1e406 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/appbasedMonitoring/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/appbasedMonitoring/client/Client.java
@@ -49,18 +49,18 @@ stat.addDescription("App based monitoring tests"); if (getMonitorablePropertyOfConnectionPool(app1, NUM_ACQUIRED) == 2 && getMonitorablePropertyOfConnectionPool(app2, NUM_ACQUIRED) == 3 && getMonitorablePropertyOfConnectionPool(null, NUM_ACQUIRED) == 5) { - System.out.println("Monitoring : Acquired Statistic test pass"); + System.out.println("Monitoring : Acquired Statistic test pass"); stat.addStatus("Monitoring : Acquired Statistic test: ", stat.PASS); } else { - System.out.println("Monitoring : Acquired Statistic test fail"); + System.out.println("Monitoring : Acquired Statistic test fail"); stat.addStatus("Monitoring : Acquired Statistic test: ", stat.FAIL); } if (getMonitorablePropertyOfConnectionPool(app1, NUM_RELEASED) == 2 && getMonitorablePropertyOfConnectionPool(app2, NUM_RELEASED) == 3 && getMonitorablePropertyOfConnectionPool(null, NUM_RELEASED) == 5) { - System.out.println("Monitoring : Released Statistic test pass"); + System.out.println("Monitoring : Released Statistic test pass"); stat.addStatus("Monitoring : Released Statistic test: ", stat.PASS); } else { - System.out.println("Monitoring : Released Statistic test fail"); + System.out.println("Monitoring : Released Statistic test fail"); stat.addStatus("Monitoring : Released Statistic test: ", stat.FAIL); } @@ -69,24 +69,24 @@ public int getMonitorablePropertyOfConnectionPool(String appName, String monitoringStat) throws Exception { - final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; + final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; final JMXServiceURL url = new JMXServiceURL(urlStr); - final JMXConnector jmxConn = JMXConnectorFactory.connect(url); - final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); + final JMXConnector jmxConn = JMXConnectorFactory.connect(url); + final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); ObjectName objectName = null; - if(appName == null) { + if(appName == null) { objectName = new ObjectName("amx:pp=/mon/server-mon[server],type=jdbc-connection-pool-mon,name=resources/" + poolName); - } else { - objectName = new ObjectName("amx:pp=/mon/server-mon[server],type=jdbc-connection-pool-app-mon,name=resources/" + poolName + "/" + appName); - } + } else { + objectName = new ObjectName("amx:pp=/mon/server-mon[server],type=jdbc-connection-pool-app-mon,name=resources/" + poolName + "/" + appName); + } - javax.management.openmbean.CompositeDataSupport returnValue = - (javax.management.openmbean.CompositeDataSupport) - connection.getAttribute(objectName, monitoringStat); + javax.management.openmbean.CompositeDataSupport returnValue = + (javax.management.openmbean.CompositeDataSupport) + connection.getAttribute(objectName, monitoringStat); - System.out.println(">>>" + monitoringStat + "=" + returnValue.get("count")); + System.out.println(">>>" + monitoringStat + "=" + returnValue.get("count")); return new Integer(returnValue.get("count").toString()); }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/build.properties index 6f7be01..5fea2aa 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-autocommit"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/build.xml index d6e4266..0821e21 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/build.xml
@@ -35,7 +35,7 @@ <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"/> @@ -47,29 +47,29 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> - - <antcall target="setup"/> + + <antcall target="setup"/> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -77,7 +77,7 @@ <antcall target="unsetup"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/> @@ -87,12 +87,12 @@ <antcall target="deploy-jdbc-common"> <param name="jdbc.conpool.name" value="jdbc-autocommit-pool"/> - <param name="jdbc.resource.name" value="jdbc/autocommit"/> + <param name="jdbc.resource.name" value="jdbc/autocommit"/> </antcall> - + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-autocommit-pool.steady_pool_size=2"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-autocommit-pool.steady_pool_size=2"/> </antcall> <antcall target="asadmin-common"> @@ -100,7 +100,7 @@ <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-autocommit-pool.max_pool_size=2"/> </antcall> - + </target> <target name="unsetup">
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/client/Client.java index 4d4563f..529b91a 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/client/Client.java
@@ -27,36 +27,36 @@ public class Client { SimpleReporterAdapter stat = new SimpleReporterAdapter(); - + public static void main(String[] args) throws Exception { Client client = new Client(); - client.runTest(); + client.runTest(); } - + public void runTest() throws Exception { InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - stat.addDescription("Autocommit Test"); + stat.addDescription("Autocommit Test"); if ( simpleBMP.test1() ) { - stat.addStatus(" AutoCommit test1 : ", stat.PASS); - } else { - stat.addStatus(" AutoCommit test1 : ", stat.FAIL); - } + stat.addStatus(" AutoCommit test1 : ", stat.PASS); + } else { + stat.addStatus(" AutoCommit test1 : ", stat.FAIL); + } if ( simpleBMP.test2() ) { - stat.addStatus(" AutoCommit test2 : ", stat.PASS); - } else { - stat.addStatus(" AutoCommit test2 : ", stat.FAIL); - } + stat.addStatus(" AutoCommit test2 : ", stat.PASS); + } else { + stat.addStatus(" AutoCommit test2 : ", stat.FAIL); + } - System.out.println("jdbc autocommit status: "); - stat.printSummary(); + System.out.println("jdbc autocommit status: "); + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/descriptor/ejb-jar.xml index 3265f5b..b7bc795 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/descriptor/ejb-jar.xml
@@ -53,7 +53,7 @@ <method-name>*</method-name> </method> <trans-attribute>Required</trans-attribute> - </container-transaction> + </container-transaction> <container-transaction> <method> <ejb-name>SimpleBMPEJB</ejb-name> @@ -62,6 +62,6 @@ <trans-attribute>NotSupported</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/ejb/SimpleBMPBean.java index 50f1766..c780d78 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/ejb/SimpleBMPBean.java
@@ -30,67 +30,67 @@ protected DataSource ds; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } /* Get a single connection and close it */ public boolean test1() { Connection conn = null; boolean passed = true; - try { - conn = ds.getConnection(); - passed = !conn.getAutoCommit(); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - return passed; + try { + conn = ds.getConnection(); + passed = !conn.getAutoCommit(); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } + + return passed; } public boolean test2() { Connection conn1 = null; Connection conn2 = null; - boolean passed = true; + boolean passed = true; - try { - conn1 = ds.getConnection(); - conn2 = ds.getConnection(); + try { + conn1 = ds.getConnection(); + conn2 = ds.getConnection(); - passed = conn1.getAutoCommit() & conn2.getAutoCommit(); - } catch( Exception e ) { - passed = false; - } finally { - if (conn1 != null ) { - try { - conn1.close(); - } catch( Exception ei) {} - } - if (conn2 != null ) { - try { - conn2.close(); - } catch( Exception ei) {} - } - } - - return passed; + passed = conn1.getAutoCommit() & conn2.getAutoCommit(); + } catch( Exception e ) { + passed = false; + } finally { + if (conn1 != null ) { + try { + conn1.close(); + } catch( Exception ei) {} + } + if (conn2 != null ) { + try { + conn2.close(); + } catch( Exception ei) {} + } } - + + return passed; + } + public void ejbLoad() {} public void ejbStore() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/autocommit/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/autocommit/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/build.xml index 16b1817..0715c5c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/build.xml
@@ -30,7 +30,7 @@ <project name="jdbc" default="usage" basedir="."> &commonSetup; &commonBuild; - + &jdbcCommon; &jdbcCommonProperties; <!--&eeCommon; @@ -43,94 +43,94 @@ <fileset dir="${env.APS_HOME}" includes="test_results*"/> </delete> <delete> - <fileset dir="${env.APS_HOME}" includes="JDBCtest_results.html"/> + <fileset dir="${env.APS_HOME}" includes="JDBCtest_results.html"/> </delete> <delete> <fileset dir="." includes="*.output"/> </delete> - <record name="jdbc.output" action="start"/> - <antcall target="run-tests"/> - <antcall target="report"> - <param name="htmlfile" value="${env.APS_HOME}/test_results.html"/> - </antcall> - <record name="jdbc.output" action="stop"/> - + <record name="jdbc.output" action="start"/> + <antcall target="run-tests"/> + <antcall target="report"> + <param name="htmlfile" value="${env.APS_HOME}/test_results.html"/> + </antcall> + <record name="jdbc.output" action="stop"/> + </target> - + <target name="jdbc-all-security"> <delete> <fileset dir="${env.APS_HOME}" includes="test_results*"/> </delete> <delete> - <fileset dir="${env.APS_HOME}" includes="JDBCSecuritytest_results.html"/> + <fileset dir="${env.APS_HOME}" includes="JDBCSecuritytest_results.html"/> </delete> <delete> <fileset dir="." includes="*.output"/> </delete> - <record name="jdbc.secman.output" action="start"/> - <antcall target="run-tests"/> - <antcall target="report"> - <param name="htmlfile" value="${env.APS_HOME}/JDBCSecuritytest_results.html"/> - </antcall> - <record name="jdbc.secman.output" action="stop"/> + <record name="jdbc.secman.output" action="start"/> + <antcall target="run-tests"/> + <antcall target="report"> + <param name="htmlfile" value="${env.APS_HOME}/JDBCSecuritytest_results.html"/> + </antcall> + <record name="jdbc.secman.output" action="stop"/> </target> - + <target name="run-tests"> - <ant dir="appauth" target="all"/> - <ant dir="appauthtx" target="all"/> - <ant dir="contauth" target="all"/> - <ant dir="contauthtx" target="all"/> - <ant dir="contauth1" target="all"/> - <ant dir="contauth1tx" target="all"/> - <ant dir="reconfig" target="all"/> - <ant dir="autocommit" target="all"/> - <ant dir="jdbcjmsauth" target="all"/> - <ant dir="nopasswdfordb" target="all"/> + <ant dir="appauth" target="all"/> + <ant dir="appauthtx" target="all"/> + <ant dir="contauth" target="all"/> + <ant dir="contauthtx" target="all"/> + <ant dir="contauth1" target="all"/> + <ant dir="contauth1tx" target="all"/> + <ant dir="reconfig" target="all"/> + <ant dir="autocommit" target="all"/> + <ant dir="jdbcjmsauth" target="all"/> + <ant dir="nopasswdfordb" target="all"/> <ant dir="txpassthrough" target="all"/> <ant dir="txafternontx" target="all"/> <ant dir="txafternontxjndi" target="all"/> - <ant dir="notxops" target="all"/> - <ant dir="nonacc" target="all"/> - <ant dir="lazyassoc" target="all"/> - <ant dir="markconnectionasbad.local" target="all"/> - <ant dir="markconnectionasbad.xa" target="all"/> - <ant dir="statementwrapper" target="all"/> - <ant dir="maxconnectionusage" target="all"/> - <ant dir="switchoffACCconnpooling" target="all"/> - <ant dir="multipleusercredentials" target="all"/> + <ant dir="notxops" target="all"/> + <ant dir="nonacc" target="all"/> + <ant dir="lazyassoc" target="all"/> + <ant dir="markconnectionasbad.local" target="all"/> + <ant dir="markconnectionasbad.xa" target="all"/> + <ant dir="statementwrapper" target="all"/> + <ant dir="maxconnectionusage" target="all"/> + <ant dir="switchoffACCconnpooling" target="all"/> + <ant dir="multipleusercredentials" target="all"/> <ant dir="multiplecloseconnection" target="all"/> - <ant dir="statementtimeout" target="all"/> - <ant dir="conval" target="all"/> - <ant dir="conval" target="all-assoc-with-thread"/> - <ant dir="connleaktracing" target="all"/> - <ant dir="conncreationretry" target="all"/> - <ant dir="validateatmostonceperiod" target="all"/> - <ant dir="connsharing" target="nonxa"/> - <ant dir="connsharing/nonxa" target="all-assoc-with-thread"/> - <ant dir="cpds" target="all"/> - <ant dir="txisolation" target="all"/> - <ant dir="stmtCaching_hit_miss" target="all"/> - <ant dir="pooling" target="all"/> - <ant dir="dmmcf" target="all"/> - <ant dir="dmmcf.markconnectionasbad.xa" target="all"/> - <ant dir="dmmcf.appclient" target="all"/> + <ant dir="statementtimeout" target="all"/> + <ant dir="conval" target="all"/> + <ant dir="conval" target="all-assoc-with-thread"/> + <ant dir="connleaktracing" target="all"/> + <ant dir="conncreationretry" target="all"/> + <ant dir="validateatmostonceperiod" target="all"/> + <ant dir="connsharing" target="nonxa"/> + <ant dir="connsharing/nonxa" target="all-assoc-with-thread"/> + <ant dir="cpds" target="all"/> + <ant dir="txisolation" target="all"/> + <ant dir="stmtCaching_hit_miss" target="all"/> + <ant dir="pooling" target="all"/> + <ant dir="dmmcf" target="all"/> + <ant dir="dmmcf.markconnectionasbad.xa" target="all"/> + <ant dir="dmmcf.appclient" target="all"/> <ant dir="tracingsql" target="all"/> - <ant dir="datasource40" target="all"/> - <ant dir="custom-validation" target="all"/> - <ant dir="custom-validation-1" target="all"/> - <ant dir="flushconnectionpool" target="all"/> - <ant dir="connleakreclaimnotify" target="all"/> - <ant dir="stmtCaching_hit_miss.monitoring" target="all"/> - <!--ant dir="transparent-pool-reconfig" target="all"/--> - <!--ant dir="transparent-pool-reconfig-resources-xml" target="all"/--> - <!--ant dir="sqltracemonitoring" target="all"/--> - <!--ant dir="statementleakdetection" target="all"/--> - <!--ant dir="appbasedMonitoring" target="all"/--> - <ant dir="jpa-dsd" target="all" /> - <ant dir="jpa-dsd" target="all-appclient-exposed-dsd"/> - <ant dir="stmtCaching_hit_miss.fixed" target="all"/> + <ant dir="datasource40" target="all"/> + <ant dir="custom-validation" target="all"/> + <ant dir="custom-validation-1" target="all"/> + <ant dir="flushconnectionpool" target="all"/> + <ant dir="connleakreclaimnotify" target="all"/> + <ant dir="stmtCaching_hit_miss.monitoring" target="all"/> + <!--ant dir="transparent-pool-reconfig" target="all"/--> + <!--ant dir="transparent-pool-reconfig-resources-xml" target="all"/--> + <!--ant dir="sqltracemonitoring" target="all"/--> + <!--ant dir="statementleakdetection" target="all"/--> + <!--ant dir="appbasedMonitoring" target="all"/--> + <ant dir="jpa-dsd" target="all" /> + <ant dir="jpa-dsd" target="all-appclient-exposed-dsd"/> + <ant dir="stmtCaching_hit_miss.fixed" target="all"/> - <!--<antcall target="all-oracle"/>--> + <!--<antcall target="all-oracle"/>--> </target> <target name="ee-all"> @@ -171,41 +171,41 @@ <ant dir="validateatmostonceperiod" target="all"/> <ant dir="cpds" target="all"/> <ant dir="txisolation" target="all"/> - <ant dir="stmtCaching_hit_miss" target="all"/> - <ant dir="pooling" target="all"/> - <ant dir="transparent-pool-reconfig" target="all"/> - <ant dir="transparent-pool-reconfig-resources-xml" target="all"/> - <ant dir="jpa-dsd" target="all" /> - <ant dir="jpa-dsd" target="all-appclient-exposed-dsd"/> + <ant dir="stmtCaching_hit_miss" target="all"/> + <ant dir="pooling" target="all"/> + <ant dir="transparent-pool-reconfig" target="all"/> + <ant dir="transparent-pool-reconfig-resources-xml" target="all"/> + <ant dir="jpa-dsd" target="all" /> + <ant dir="jpa-dsd" target="all-appclient-exposed-dsd"/> <record name="jdbc.output" action="stop"/> </target> <target name="all"> - <antcall target="jdbc-all"/> + <antcall target="jdbc-all"/> </target> <target name="all-oracle"> - <record name="jdbc-oracle.output" action="start"/> - <ant dir="connsharing" target="xa"/> - <ant dir="simpleoradd" target="all"/> - <ant dir="dmmcf.notxconn" target="all"/> - <ant dir="notxconn" target="all"/> - <ant dir="reconfig" target="userpass"/> - <ant dir="simpleora" target="all"/> - <ant dir="init-sql" target="all"/> - <record name="jdbc-oracle.output" action="stop"/> + <record name="jdbc-oracle.output" action="start"/> + <ant dir="connsharing" target="xa"/> + <ant dir="simpleoradd" target="all"/> + <ant dir="dmmcf.notxconn" target="all"/> + <ant dir="notxconn" target="all"/> + <ant dir="reconfig" target="userpass"/> + <ant dir="simpleora" target="all"/> + <ant dir="init-sql" target="all"/> + <record name="jdbc-oracle.output" action="stop"/> </target> <target name="all-with-security-manager"> - <antcall target="create-jvm-options"> + <antcall target="create-jvm-options"> <param name="option" value="-Djava.security.manager"/> </antcall> - <antcall target="restart-server"/> - <antcall target="jdbc-all-security"/> - <antcall target="delete-jvm-options"> + <antcall target="restart-server"/> + <antcall target="jdbc-all-security"/> + <antcall target="delete-jvm-options"> <param name="option" value="-Djava.security.manager"/> </antcall> - <antcall target="restart-server"/> + <antcall target="restart-server"/> </target> <target name="appauth"> @@ -333,7 +333,7 @@ <ant dir="maxconnectionusage" target="all"/> <record name="maxconnectionusage.output" action="stop"/> </target> - + <target name="statementwrapper"> <record name="statementwrapper.output" action="start"/> <ant dir="statementwrapper" target="all"/> @@ -383,79 +383,79 @@ </target> <target name="stmtCaching_hit_miss"> - <record name="stmtCaching_hit_miss.output" action="start"/> - <ant dir="stmtCaching_hit_miss" target="all"/> - <record name="stmtCaching_hit_miss.output" action="stop"/> + <record name="stmtCaching_hit_miss.output" action="start"/> + <ant dir="stmtCaching_hit_miss" target="all"/> + <record name="stmtCaching_hit_miss.output" action="stop"/> </target> <target name="pooling"> - <record name="pooling.output" action="start"/> - <ant dir="pooling" target="all"/> + <record name="pooling.output" action="start"/> + <ant dir="pooling" target="all"/> </target> <target name="dmmcf"> - <record name="dmmcf.output" action="start"/> - <ant dir="dmmcf" target="all"/> - <record name="dmmcf.output" action="stop"/> + <record name="dmmcf.output" action="start"/> + <ant dir="dmmcf" target="all"/> + <record name="dmmcf.output" action="stop"/> </target> <target name="dmmcf.appclient"> - <record name="dmmcf.appclient.output" action="start"/> - <ant dir="dmmcf.appclient" target="all"/> - <record name="dmmcf.appclient.output" action="stop"/> + <record name="dmmcf.appclient.output" action="start"/> + <ant dir="dmmcf.appclient" target="all"/> + <record name="dmmcf.appclient.output" action="stop"/> </target> <target name="tracingsql"> - <record name="tracingsql.output" action="start"/> - <ant dir="tracingsql" target="all"/> - <record name="tracingsql.output" action="stop"/> + <record name="tracingsql.output" action="start"/> + <ant dir="tracingsql" target="all"/> + <record name="tracingsql.output" action="stop"/> </target> <target name="datasource40"> - <record name="datasource40.output" action="start"/> - <ant dir="datasource40" target="all"/> - <record name="datasource40.output" action="stop"/> + <record name="datasource40.output" action="start"/> + <ant dir="datasource40" target="all"/> + <record name="datasource40.output" action="stop"/> </target> <target name="flushconnectionpool"> - <record name="flushconnectionpool.output" action="start"/> - <ant dir="flushconnectionpool" target="all"/> - <record name="flushconnectionpool.output" action="stop"/> + <record name="flushconnectionpool.output" action="start"/> + <ant dir="flushconnectionpool" target="all"/> + <record name="flushconnectionpool.output" action="stop"/> </target> <target name="init-sql"> - <record name="init-sql.output" action="start"/> - <ant dir="init-sql" target="all"/> - <record name="init-sql.output" action="stop"/> + <record name="init-sql.output" action="start"/> + <ant dir="init-sql" target="all"/> + <record name="init-sql.output" action="stop"/> </target> <target name="connleakreclaimnotify"> - <record name="connleakreclaimnotify.output" action="start"/> - <ant dir="connleakreclaimnotify" target="all"/> - <record name="connleakreclaimnotify.output" action="stop"/> + <record name="connleakreclaimnotify.output" action="start"/> + <ant dir="connleakreclaimnotify" target="all"/> + <record name="connleakreclaimnotify.output" action="stop"/> </target> - + <target name="transparent-pool-reconfig"> - <record name="transparent-pool-reconfig.output" action="start"/> - <ant dir="transparent-pool-reconfig" target="all"/> - <record name="transparent-pool-reconfig.output" action="stop"/> + <record name="transparent-pool-reconfig.output" action="start"/> + <ant dir="transparent-pool-reconfig" target="all"/> + <record name="transparent-pool-reconfig.output" action="stop"/> </target> <target name="transparent-pool-reconfig-resources-xml"> - <record name="transparent-pool-reconfig-resources-xml.output" action="start"/> - <ant dir="transparent-pool-reconfig-resources-xml" target="all"/> - <record name="transparent-pool-reconfig-resources-xml.output" action="stop"/> + <record name="transparent-pool-reconfig-resources-xml.output" action="start"/> + <ant dir="transparent-pool-reconfig-resources-xml" target="all"/> + <record name="transparent-pool-reconfig-resources-xml.output" action="stop"/> </target> <target name="jpa-dsd"> - <record name="jpa-dsd.output" action="start"/> - <ant dir="jpa-dsd" target="all"/> - <record name="jpa-dsd.output" action="stop"/> + <record name="jpa-dsd.output" action="start"/> + <ant dir="jpa-dsd" target="all"/> + <record name="jpa-dsd.output" action="stop"/> </target> <target name="jpa-dsd.appclient-exposed-dsd"> - <record name="jpa-dsd.appclient-exposed-dsd.output" action="start"/> - <ant dir="jpa-dsd" target="all-appclient-exposed-dsd"/> - <record name="jpa-dsd.appclient-exposed-dsd.output" action="stop"/> + <record name="jpa-dsd.appclient-exposed-dsd.output" action="start"/> + <ant dir="jpa-dsd" target="all-appclient-exposed-dsd"/> + <record name="jpa-dsd.appclient-exposed-dsd.output" action="stop"/> </target> <target name="usage">
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/build.properties index 60c72d1..9eae07e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/build.properties
@@ -15,20 +15,20 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-cmpsimple"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="sun-cmp-mappings.xml" value="descriptor/sun-cmp-mappings.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="dbschema" value="sql/cmpsimple.dbschema"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/build.xml index 049feff..3e15430 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/build.xml
@@ -41,7 +41,7 @@ <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"/> @@ -55,39 +55,39 @@ <mkdir dir="${assemble.dir}"/> <antcall target="package-jar"/> <antcall target="appclient-jar-common"> - <param name="appclientjar.classes" - value="**/BlobTest.class, **/BlobTestHome.class,**/*Client*.class" /> + <param name="appclientjar.classes" + value="**/BlobTest.class, **/BlobTestHome.class,**/*Client*.class" /> </antcall> <antcall target="package-ear"/> - </target> + </target> <target name="package-jar"> <antcall target="package-ejbjar-common"> <param name="ejbjar.files" value="${build.classes.dir}"/> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class,**/*dbschema"/> <param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/> </antcall> - </target> + </target> <target name="package-ear"> <delete file="${assemble.dir}/${appname}.ear"/> <mkdir dir="${assemble.dir}"/> - <mkdir dir="${build.classes.dir}/META-INF"/> + <mkdir dir="${build.classes.dir}/META-INF"/> <ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}"> <fileset dir="${assemble.dir}"> <include name="*.jar"/> </fileset> <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/> - </ear> + </ear> </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"/> <antcall target="create-persistence-resource-common"/> @@ -96,17 +96,17 @@ <target name="deploy" depends="init-common"> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="undeploy-common"/> - </target> + </target> <target name="unsetup" depends="init-common"> <antcall target="execute-sql-common"> @@ -114,15 +114,15 @@ </antcall> <antcall target="delete-persistence-resource-common"/> <antcall target="undeploy-jdbc-common"/> - </target> - + </target> + <target name="sql-create" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> </target> - <target name="sql-drop" depends="init-common"> + <target name="sql-drop" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/client/Client.java index dd1166b..fdfa041 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/client/Client.java
@@ -24,11 +24,11 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + public static void main(String[] args) { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "cmpsimple"; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "cmpsimple"; try { Context initial = new InitialContext(); Object objref = initial.lookup("java:comp/env/ejb/BlobTestBean"); @@ -39,7 +39,7 @@ BlobTest bean = bhome.create(new Integer(100), "FOO"); System.out.println("Created: " +bean.getPrimaryKey()); - + System.out.println("Testing new..."); bean = bhome.findByPrimaryKey(new Integer(100)); System.out.println(new String(bean.getName())); @@ -48,16 +48,16 @@ bean = bhome.findByPrimaryKey(new Integer(1)); System.out.println(new String(bean.getName())); - stat.addStatus(testSuite + " test : ", stat.PASS); + stat.addStatus(testSuite + " test : ", stat.PASS); } catch (Exception ex) { System.err.println("Caught an exception:"); ex.printStackTrace(); - stat.addStatus(testSuite + "test : ", stat.FAIL); + stat.addStatus(testSuite + "test : ", stat.FAIL); } - stat.printSummary(); + stat.printSummary(); } - + }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTest.java b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTest.java index 3e7e33b..d023644 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTest.java
@@ -24,8 +24,8 @@ */ public interface BlobTest extends jakarta.ejb.EJBObject { - + public String getName() throws java.rmi.RemoteException; - + }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTestBean.java b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTestBean.java index 7822a4a..37e5a37 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTestBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTestBean.java
@@ -25,75 +25,75 @@ public abstract class BlobTestBean implements jakarta.ejb.EntityBean { - + private jakarta.ejb.EntityContext context; - - + + /** * @see jakarta.ejb.EntityBean#setEntityContext(jakarta.ejb.EntityContext) */ public void setEntityContext(jakarta.ejb.EntityContext aContext) { context=aContext; } - - + + /** * @see jakarta.ejb.EntityBean#ejbActivate() */ public void ejbActivate() { - + } - - + + /** * @see jakarta.ejb.EntityBean#ejbPassivate() */ public void ejbPassivate() { - + } - - + + /** * @see jakarta.ejb.EntityBean#ejbRemove() */ public void ejbRemove() { System.out.println("Debug: BlobTest ejbRemove"); } - - + + /** * @see jakarta.ejb.EntityBean#unsetEntityContext() */ public void unsetEntityContext() { context=null; } - - + + /** * @see jakarta.ejb.EntityBean#ejbLoad() */ public void ejbLoad() { - + } - - + + /** * @see jakarta.ejb.EntityBean#ejbStore() */ public void ejbStore() { - + } - + public abstract Integer getId(); public abstract void setId(Integer id); public abstract java.lang.String getName(); public abstract void setName(java.lang.String name); - + /* public abstract byte[] getBlb(); public abstract void setBlb(byte[] b); - + public java.lang.Integer ejbCreate(Integer id, java.lang.String name, byte[] b) throws jakarta.ejb.CreateException { setId(id); @@ -102,21 +102,21 @@ return null; } - */ - public java.lang.Integer ejbCreate(Integer id, java.lang.String name) - throws jakarta.ejb.CreateException + */ + public java.lang.Integer ejbCreate(Integer id, java.lang.String name) + throws jakarta.ejb.CreateException { setId(id); setName(name); return null; } - + /* public void ejbPostCreate(Integer id, java.lang.String name, byte[] b) throws jakarta.ejb.CreateException { } */ - - public void ejbPostCreate(Integer id, java.lang.String name ) + + public void ejbPostCreate(Integer id, java.lang.String name ) throws jakarta.ejb.CreateException {} -} +}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTestHome.java b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTestHome.java index 562f1f5..0c6d46d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTestHome.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/ejb/BlobTestHome.java
@@ -24,14 +24,14 @@ */ public interface BlobTestHome extends jakarta.ejb.EJBHome { - /* + /* public BlobTest create(Integer i, java.lang.String name, byte[] b) throws java.rmi.RemoteException, jakarta.ejb.CreateException; - + public BlobTest findByPrimaryKey (Integer key) throws java.rmi.RemoteException, jakarta.ejb.FinderException; */ - public BlobTest create(Integer i, java.lang.String name) + public BlobTest create(Integer i, java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException; - - public BlobTest findByPrimaryKey (Integer key) + + public BlobTest findByPrimaryKey (Integer key) throws java.rmi.RemoteException, jakarta.ejb.FinderException; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/sql/blob_ora.sql b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/sql/blob_ora.sql index 5410720..5f22a30 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/sql/blob_ora.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/sql/blob_ora.sql
@@ -1,8 +1,8 @@ drop table myblob; create table myblob ( - id int primary key, - name varchar2(100), + id int primary key, + name varchar2(100), ); insert into myblob values (1, 'AAA');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/sql/create_pointbase.sql index 7fc1741..673c096 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/cmpsimple/sql/create_pointbase.sql
@@ -1,8 +1,8 @@ drop table myblob; create table myblob ( - id integer NOT NULL, - name varchar(100) + id integer NOT NULL, + name varchar(100) ); insert into myblob values (1, 'AAA');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/config/ee-common.xml b/appserver/tests/appserv-tests/devtests/jdbc/config/ee-common.xml index 6e5d736..c870bda 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/config/ee-common.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/config/ee-common.xml
@@ -70,11 +70,11 @@ <!-- clean --> <target name="clean-classes-common" depends="init-common"> - <delete dir="${build.classes.dir}" failonerror="false"/> + <delete dir="${build.classes.dir}" failonerror="false"/> </target> <target name="clean-jars-common" depends="init-common"> - <delete dir="${assemble.dir}" failonerror="false"/> + <delete dir="${assemble.dir}" failonerror="false"/> </target> <target name="clean-common" depends="init-common"> @@ -86,7 +86,7 @@ <echo message="cleaning all *.output, *.log and RepRunConf.txt files..."/> <delete dir="${env.APS_HOME}/build" failonerror="false"/> <delete failonerror="false"> - <fileset dir="${env.APS_HOME}" + <fileset dir="${env.APS_HOME}" includes="**/*results*.*ml, **/*.output, **/*.log, @@ -103,8 +103,8 @@ <!-- compile --> <target name="compile-common" depends="init-common"> - <antcall target="compile-common-as"/> - <antcall target="compile-common-as80"/> + <antcall target="compile-common-as"/> + <antcall target="compile-common-as80"/> </target> <target name="compile-common-as" depends="init-common" unless="AS80"> @@ -132,38 +132,38 @@ <!-- war targets --> <target name="webclient-war-common" if="hasWebclient" depends="init-common"> - <mkdir dir="${assemble.dir}"/> - <antcall target="package-war-common"> - <!--param name="war.classes" value="${build.classes.dir}"/--> - <param name="war.file" value="${assemble.dir}/${appname}-web.war"/> - </antcall> + <mkdir dir="${assemble.dir}"/> + <antcall target="package-war-common"> + <!--param name="war.classes" value="${build.classes.dir}"/--> + <param name="war.file" value="${assemble.dir}/${appname}-web.war"/> + </antcall> </target> <target name="package-war-without-sun.xml" unless="sun-web.xml"> - <echo message="This war does not contain sun-web.xml"/> - <echo message="my build classes dir is:${build.classes.dir}"/> - <delete file="${war.file}"/> - <mkdir dir="${build.classes.dir}/WEB-INF"/> - <copy file="${web.xml}" - tofile="${build.classes.dir}/WEB-INF/web.xml"/> - <echo message="Creating war file ${war.file}"/> - <!--jar jarfile="${war.file}" basedir="${war.classes}" update="true"--> - <jar jarfile="${war.file}" basedir="${build.classes.dir}" - update="true" includes ="${webclient.war.classes}"> - <fileset dir="${basedir}/web" casesensitive="yes"> - <include name="*.html"/> - <include name="*.jsp"/> - <include name="*.gif"/> - <include name="*.do"/> - <exclude name="**/*.java"/> - </fileset> - <fileset dir="${build.classes.dir}" casesensitive="true"> - <include name="WEB-INF/web.xml"/> - </fileset> - </jar> - <echo message="created war file ${war.file}"/> - <delete dir="${build.classes.dir}/WEB-INF" failonerror="false"/> - <echo message="my webclient war classes are:${webclient.war.classes}"/> + <echo message="This war does not contain sun-web.xml"/> + <echo message="my build classes dir is:${build.classes.dir}"/> + <delete file="${war.file}"/> + <mkdir dir="${build.classes.dir}/WEB-INF"/> + <copy file="${web.xml}" + tofile="${build.classes.dir}/WEB-INF/web.xml"/> + <echo message="Creating war file ${war.file}"/> + <!--jar jarfile="${war.file}" basedir="${war.classes}" update="true"--> + <jar jarfile="${war.file}" basedir="${build.classes.dir}" + update="true" includes ="${webclient.war.classes}"> + <fileset dir="${basedir}/web" casesensitive="yes"> + <include name="*.html"/> + <include name="*.jsp"/> + <include name="*.gif"/> + <include name="*.do"/> + <exclude name="**/*.java"/> + </fileset> + <fileset dir="${build.classes.dir}" casesensitive="true"> + <include name="WEB-INF/web.xml"/> + </fileset> + </jar> + <echo message="created war file ${war.file}"/> + <delete dir="${build.classes.dir}/WEB-INF" failonerror="false"/> + <echo message="my webclient war classes are:${webclient.war.classes}"/> </target> <target name="package-war-common"> @@ -172,58 +172,58 @@ </target> <target name="package-war-with-sun.xml" if="sun-web.xml"> - <echo message="my build classes dir is:${build.classes.dir}"/> - <delete file="${war.file}"/> - <mkdir dir="${build.classes.dir}/tmp"/> - <mkdir dir="${build.classes.dir}/tmp/WEB-INF"/> - <mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/> - <copy file="${sun-web.xml}" - tofile="${build.classes.dir}/tmp/WEB-INF/sun-web.xml" - failonerror="false"/> - <copy file="${webservices.xml}" - tofile="${build.classes.dir}/tmp/WEB-INF/webservices.xml" - failonerror="false"/> - <copy file="${mappingfile.location}/${mappingfile.name}" - tofile="${build.classes.dir}/tmp/${mappingfile.name}" - failonerror="false"/> - <copy file="${wsdlfile.location}/${wsdlfile.name}" - tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}" - failonerror="false"/> - <copy file="${web.xml}" - tofile="${build.classes.dir}/tmp/WEB-INF/web.xml"/> - <copy todir="${build.classes.dir}/tmp/WEB-INF/classes"> - <fileset dir="${build.classes.dir}"> - <include name="${war.classes}"/> - </fileset> - </copy> - <echo message="Creating war file ${war.file}"/> - <jar jarfile="${war.file}" update="true"> - <fileset dir="${build.classes.dir}/tmp" casesensitive="yes"> - <include name="**/*class*"/> - </fileset> - <fileset dir="${basedir}/web" casesensitive="yes"> - <include name="**/*.html"/> - <include name="**/*.jsp"/> - <include name="**/*.gif"/> - <include name="**/*.do"/> - <exclude name="**/*.java,**/*.xml,**/*.properties"/> - </fileset> - <fileset dir="${build.classes.dir}/tmp/" casesensitive="true"> - <include name="WEB-INF/web.xml"/> - <include name="WEB-INF/sun-web.xml"/> - <include name="WEB-INF/webservices.xml"/> - <include name="WEB-INF/wsdl/${wsdlfile.name}"/> - <include name="${mappingfile.name}"/> - </fileset> - </jar> - <echo message="created war file ${war.file}"/> - <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/> - <echo message="my webclient war classes are:${webclient.war.classes}"/> + <echo message="my build classes dir is:${build.classes.dir}"/> + <delete file="${war.file}"/> + <mkdir dir="${build.classes.dir}/tmp"/> + <mkdir dir="${build.classes.dir}/tmp/WEB-INF"/> + <mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/> + <copy file="${sun-web.xml}" + tofile="${build.classes.dir}/tmp/WEB-INF/sun-web.xml" + failonerror="false"/> + <copy file="${webservices.xml}" + tofile="${build.classes.dir}/tmp/WEB-INF/webservices.xml" + failonerror="false"/> + <copy file="${mappingfile.location}/${mappingfile.name}" + tofile="${build.classes.dir}/tmp/${mappingfile.name}" + failonerror="false"/> + <copy file="${wsdlfile.location}/${wsdlfile.name}" + tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}" + failonerror="false"/> + <copy file="${web.xml}" + tofile="${build.classes.dir}/tmp/WEB-INF/web.xml"/> + <copy todir="${build.classes.dir}/tmp/WEB-INF/classes"> + <fileset dir="${build.classes.dir}"> + <include name="${war.classes}"/> + </fileset> + </copy> + <echo message="Creating war file ${war.file}"/> + <jar jarfile="${war.file}" update="true"> + <fileset dir="${build.classes.dir}/tmp" casesensitive="yes"> + <include name="**/*class*"/> + </fileset> + <fileset dir="${basedir}/web" casesensitive="yes"> + <include name="**/*.html"/> + <include name="**/*.jsp"/> + <include name="**/*.gif"/> + <include name="**/*.do"/> + <exclude name="**/*.java,**/*.xml,**/*.properties"/> + </fileset> + <fileset dir="${build.classes.dir}/tmp/" casesensitive="true"> + <include name="WEB-INF/web.xml"/> + <include name="WEB-INF/sun-web.xml"/> + <include name="WEB-INF/webservices.xml"/> + <include name="WEB-INF/wsdl/${wsdlfile.name}"/> + <include name="${mappingfile.name}"/> + </fileset> + </jar> + <echo message="created war file ${war.file}"/> + <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/> + <echo message="my webclient war classes are:${webclient.war.classes}"/> </target> <!-- ===== package ejb jar ===== --> <target name="package-ejbjar-common"> - <mkdir dir="${assemble.dir}"/> + <mkdir dir="${assemble.dir}"/> <delete file="${ejb.jar}" failonerror="false"/> <echo message="sqe-common.xml: Generating ejb-jar inside build directory"/> <mkdir dir="${build.classes.dir}/META-INF"/> @@ -232,9 +232,9 @@ <copy file="${sun-ejb-jar.xml}" tofile="${build.classes.dir}/META-INF/sun-ejb-jar.xml"/> <!-- optional files --> - <copy file="${sun-cmp-mappings.xml}" + <copy file="${sun-cmp-mappings.xml}" tofile="${build.classes.dir}/META-INF/sun-cmp-mappings.xml" - failonerror="false"/> + failonerror="false"/> <copy file="${dbschema}" todir="${build.classes.dir}" failonerror="false"/> <copy file="${mapping.xml}" todir="${build.classes.dir}/META-INF" failonerror="false"/> <copy file="${webservices.xml}" todir="${build.classes.dir}/META-INF" failonerror="false"/> @@ -250,7 +250,7 @@ </jar> <delete dir="${build.classes.dir}/META-INF" failonerror="false"/> -</target> +</target> <!-- ========================================= --> <!-- appclient package --> @@ -259,20 +259,20 @@ <delete file="${appclient.jar}" failonerror="false"/> <echo message="sqe-common.xml: Generating appclient-jar in build dir"/> <mkdir dir="${build.classes.dir}/META-INF"/> - <copy file="${application-client.xml}" - tofile="${build.classes.dir}/META-INF/application-client.xml"/> - <copy file="${sun-application-client.xml}" - tofile="${build.classes.dir}/META-INF/sun-application-client.xml"/> - <jar jarfile="${appclient.jar}" basedir="${appclientjar.files}" - update="true" includes ="${appclientjar.classes}" - manifest="./client/MANIFEST.MF"> + <copy file="${application-client.xml}" + tofile="${build.classes.dir}/META-INF/application-client.xml"/> + <copy file="${sun-application-client.xml}" + tofile="${build.classes.dir}/META-INF/sun-application-client.xml"/> + <jar jarfile="${appclient.jar}" basedir="${appclientjar.files}" + update="true" includes ="${appclientjar.classes}" + manifest="./client/MANIFEST.MF"> <metainf dir="${build.classes.dir}/META-INF"> <include name="application-client.xml"/> <include name="sun-application-client.xml"/> - </metainf> - </jar> - <delete dir="${build.classes.dir}/META-INF" failonerror="false"/> -</target> + </metainf> + </jar> + <delete dir="${build.classes.dir}/META-INF" failonerror="false"/> +</target> <!-- ejb jar packager --> <target name="ejb-jar-common" depends="init-common"> @@ -281,28 +281,28 @@ <param name="ejbjar.files" value="${build.classes.dir}"/> <param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/> </antcall> -</target> +</target> <!-- appclient jar create --> <target name="appclient-jar-common" depends="init-common"> <mkdir dir="${assemble.dir}"/> <antcall target="package-appclientjar-common"> - <param name="appclientjar.files" + <param name="appclientjar.files" value="${build.classes.dir}"/> - <param name="appclient.jar" + <param name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> </antcall> -</target> +</target> <!-- ear --> <target name="build-ear-common" depends="fixFiles,ejb-jar-common,appclient-jar-common,webclient-war-common"> <delete file="${assemble.dir}/${appname}.ear"/> <mkdir dir="${assemble.dir}"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy file="${sun-application.xml}" - tofile="${build.classes.dir}/META-INF/sun-application.xml" - failonerror="false"/> - <ear earfile="${assemble.dir}/${appname}App.ear" + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy file="${sun-application.xml}" + tofile="${build.classes.dir}/META-INF/sun-application.xml" + failonerror="false"/> + <ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}"> <fileset dir="${assemble.dir}"> <include name="*.jar"/> @@ -312,18 +312,18 @@ <include name="META-INF/sun-application.xml"/> </fileset> <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/> - </ear> + </ear> </target> <!-- ear (Without dependencies) --> <target name="ear-common" depends="fixFiles,init-common"> <delete file="${assemble.dir}/${appname}.ear"/> <mkdir dir="${assemble.dir}"/> - <mkdir dir="${build.classes.dir}/META-INF"/> - <copy file="${sun-application.xml}" - tofile="${build.classes.dir}/META-INF/sun-application.xml" - failonerror="false"/> - <ear earfile="${assemble.dir}/${appname}App.ear" + <mkdir dir="${build.classes.dir}/META-INF"/> + <copy file="${sun-application.xml}" + tofile="${build.classes.dir}/META-INF/sun-application.xml" + failonerror="false"/> + <ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}"> <fileset dir="${assemble.dir}"> <include name="*.jar"/> @@ -333,20 +333,20 @@ <include name="META-INF/sun-application.xml"/> </fileset> <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/> - </ear> + </ear> </target> <!-- asadmin common target --> <target name="asadmin-common"> <echo message="Doing admin task ${admin.command}"/> <exec executable="${ASADMIN}" failonerror="false"> - <arg line="${admin.command} ${as.props} ${operand.props}" /> + <arg line="${admin.command} ${as.props} ${operand.props}" /> </exec> </target> <!-- reconfig the AppServ --> <target name="reconfig-common" depends="init-common"> - <echo message="Reconfig has been deprecated. No Action will be taken by the Appserver !!"/> + <echo message="Reconfig has been deprecated. No Action will be taken by the Appserver !!"/> </target> @@ -363,7 +363,7 @@ <arg line="${user}"/> </exec> </target> - + <target name="delete-user-common" depends="init-common"> <echo message="Deleting user ${user} in file realm"/> <exec executable="${ASADMIN}" failonerror="false"> @@ -374,16 +374,16 @@ <arg line="${user}"/> </exec> </target> - + <!-- create JDBC connection pool --> -<target name="create-jdbc-connpool-common" depends="init-common"> +<target name="create-jdbc-connpool-common" depends="init-common"> <exec executable="${ASADMIN}" failonerror="false"> - <arg line="create-jdbc-connection-pool"/> - <arg line="--datasourceclassname ${db.class}"/> - <arg line="--restype ${jdbc.resource.type}"/> + <arg line="create-jdbc-connection-pool"/> + <arg line="--datasourceclassname ${db.class}"/> + <arg line="--restype ${jdbc.resource.type}"/> <arg line="--target ${appserver.instance.name}"/> <arg line="${as.props}"/> - <arg line="${jdbc.conpool.name}"/> + <arg line="${jdbc.conpool.name}"/> </exec> <antcall target="set-pool-props"/> </target> @@ -403,7 +403,7 @@ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.Password=${db.pwd}"/> </exec> - <antcall target="set-${db.type}-connpool-props"/> + <antcall target="set-${db.type}-connpool-props"/> </target> <target name="set-derby-connpool-props"> @@ -474,13 +474,13 @@ </target> <target name="set-sybase-connpool-props-common" unless="datadirect"> - <antcall target="set-non-db2-type2-connpool-props"/> + <antcall target="set-non-db2-type2-connpool-props"/> <exec executable="${ASADMIN}" failonerror="false"> <arg line="set"/> <arg line="${as.props}"/> <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.DatabaseName=${db.name}" /> </exec> -</target> +</target> <target name="set-oracle-connpool-props"> <antcall target="set-datadirect-pool-props"/> @@ -488,7 +488,7 @@ </target> <target name="set-oracle-connpool-props-common" unless="datadirect"> - <antcall target="set-non-db2-type2-connpool-props"/> + <antcall target="set-non-db2-type2-connpool-props"/> <exec executable="${ASADMIN}" failonerror="false"> <arg line="set"/> <arg line="${as.props}"/> @@ -500,7 +500,7 @@ <arg line="${as.props}"/> <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.url=${db.url}" /> </exec> - <!-- inet driver property added for enabling CLOB's in oracle Deepa + <!-- inet driver property added for enabling CLOB's in oracle Deepa Singh 01/27/04 --> <exec executable="${ASADMIN}" failonerror="false"> <arg line="set"/> @@ -547,7 +547,7 @@ </target> <target name="set-pointbase-connpool-props"> - <antcall target="set-non-db2-type2-connpool-props"/> + <antcall target="set-non-db2-type2-connpool-props"/> <exec executable="${ASADMIN}" failonerror="false"> <arg line="set"/> <arg line="${as.props}"/> @@ -569,7 +569,7 @@ </target> <target name="set-microsoft-connpool-props-common"> - <antcall target="set-non-db2-type2-connpool-props"/> + <antcall target="set-non-db2-type2-connpool-props"/> <exec executable="${ASADMIN}" failonerror="false"> <arg line="set"/> <arg line="${as.props}"/> @@ -580,7 +580,7 @@ <arg line="${as.props}"/> <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.databaseName=${db.name}" /> </exec> -</target> +</target> <!-- create XA JDBC connection pool --> <target name="create-jdbc-xa-connpool-common" depends="init-common"> @@ -603,7 +603,7 @@ <arg line="domain.resources.jdbc-connection-pool.${jdbc.conpool.name}.property.Password=${db.pwd}"/> </exec> - <antcall target="set-${db.type}-connpool-props"/> + <antcall target="set-${db.type}-connpool-props"/> </target> <!-- delete JDBC connection-pool --> @@ -750,10 +750,10 @@ <!-- drop all tables as part of cleanup --> <target name="drop-sqe-alltables" depends="init-common"> - <echo message="Droping all tables...executing all drop_xxx.sql + <echo message="Droping all tables...executing all drop_xxx.sql files"/> <antcall target="execute-sql-common"> - <param name="sql.file.type" value="drop"/> + <param name="sql.file.type" value="drop"/> </antcall> </target> @@ -840,8 +840,8 @@ <antcall target="set-unix-classpath-suffix"/> </target> -<target name="set-unix-classpath-suffix" - depends="init-common" if="isUnix"> +<target name="set-unix-classpath-suffix" + depends="init-common" if="isUnix"> <!-- Get classpath-suffix --> <exec executable="${ASADMIN}" failonerror="false" output="${classpathsuffix.file}"> @@ -862,8 +862,8 @@ <!-- <antcall target="reconfig-common"/> --> </target> -<target name="set-win-classpath-suffix" - depends="init-common" if="isWindows"> +<target name="set-win-classpath-suffix" + depends="init-common" if="isWindows"> <!-- Get classpath-suffix --> <exec executable="${ASADMIN}" failonerror="false" @@ -887,8 +887,8 @@ </target> <!-- create/delete Connector connection pool --> -<target name="create-connector-connpool-common" - depends="init-common, create-connector-connpool"/> +<target name="create-connector-connpool-common" + depends="init-common, create-connector-connpool"/> <target name="create-connector-connpool" depends="init-common"> <exec executable="${ASADMIN}" failonerror="false"> @@ -907,7 +907,7 @@ <arg line="delete-connector-connection-pool"/> <arg line="${as.props}"/> <arg line="--target ${appserver.instance.name}"/> - <arg line="${connector.conpool.name}"/> + <arg line="${connector.conpool.name}"/> </exec> </target> @@ -1014,7 +1014,7 @@ <target name="create-jms-resource-topic-common" if="topic"> - <echo message="Creating JMS resource with name + <echo message="Creating JMS resource with name ${jms.resource.name}"/> <exec executable="${ASADMIN}" failonerror="false"> <arg line="create-jmsdest"/> @@ -1063,11 +1063,11 @@ </target> <!-- deploy the applications in AppServ --> -<target name="deploy-common" depends="init-common"> +<target name="deploy-common" depends="init-common"> <antcall target="deploy-common-${execution.mode}"/> </target> -<target name="deploy-common-pe" depends="init-common"> +<target name="deploy-common-pe" depends="init-common"> <exec executable="${ASADMIN}" failonerror="false"> <arg line="deploy"/> <arg line="${as.props}"/> @@ -1077,7 +1077,7 @@ </exec> </target> -<target name="deploy-common-ee" depends="init-common"> +<target name="deploy-common-ee" depends="init-common"> <echo message="So you are using Enterprise Version eh ?"/> <property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/> @@ -1093,7 +1093,7 @@ <!-- deployed.app defaults to ${assemble.dir}/${appname}App.ear defined in properties.xml--> <arg line="${deployed.app}"/> </exec> - <echo message="Deployment on target server ${appserver.instance.name} + <echo message="Deployment on target server ${appserver.instance.name} successful"/> </target> @@ -1101,8 +1101,8 @@ <!-- start cmp deploy/undeploy targets --> <!-- deploy the applications in java2DB for createtable --> - <target name="deploy-common-createtable" depends="init-common"> - <echo message="using java2DB targets"/> + <target name="deploy-common-createtable" depends="init-common"> + <echo message="using java2DB targets"/> <exec executable="${ASADMIN}" failonerror="false"> <arg line="deploy"/> <arg line="${as.props}"/> @@ -1110,23 +1110,23 @@ <arg line="--retrieve ${assemble.dir}"/> <arg line="--target ${appserver.instance.name}"/> <arg line="--dbvendorname ${db.type}"/> - <arg line="--createtables=true"/> - <arg line="--uniquetablenames=true"/> + <arg line="--createtables=true"/> + <arg line="--uniquetablenames=true"/> <arg line="${assemble.dir}/${appname}App.ear"/> </exec> </target> <!-- deploy the applications in java2DB for dropandcreatetable --> - <target name="deploy-common-dropcreatetable" depends="init-common"> - <echo message="using java2DB targets"/> + <target name="deploy-common-dropcreatetable" depends="init-common"> + <echo message="using java2DB targets"/> <exec executable="${ASADMIN}" failonerror="false"> <arg line="deploy"/> <arg line="${as.props}"/> <arg line="--name ${appname}App"/> <arg line="--retrieve ${assemble.dir}"/> <arg line="--dbvendorname ${db.type}"/> - <arg line="--dropandcreatetables=true"/> - <arg line="--uniquetablenames=true"/> + <arg line="--dropandcreatetables=true"/> + <arg line="--uniquetablenames=true"/> <arg line="--target ${appserver.instance.name}"/> <arg line="${assemble.dir}/${appname}App.ear"/> </exec> @@ -1134,7 +1134,7 @@ <!-- undeploy the applications in java2DB for droptable --> <target name="undeploy-common-droptable" depends="init-common"> - <echo message="using java2DB targets"/> + <echo message="using java2DB targets"/> <echo message="Undeploying ${appname}."/> <exec executable="${ASADMIN}"> <arg line="undeploy"/> @@ -1142,9 +1142,9 @@ <arg line="--password ${admin.password}"/> <arg line="--host ${admin.host}"/> <arg line="--port ${admin.port}"/> - <arg line="--droptables=true"/> + <arg line="--droptables=true"/> <arg line="--target ${appserver.instance.name}"/> - <arg line="${appname}App"/> + <arg line="${appname}App"/> </exec> </target> <!-- end cmp targets --> @@ -1159,11 +1159,11 @@ <arg line="--target ${appserver.instance.name}"/> <arg line="--retrieve ${assemble.dir}"/> </exec> -</target> +</target> <!-- deploy/undeploy module files --> -<!-- - Note: Set "modulefile" param to following values: +<!-- + Note: Set "modulefile" param to following values: * <archive_name>.<jar|war|rar> ( for deploy-module-common) * <archive_name> (for undeploy-module-common) * <archive_name> (for runclient-module-common) @@ -1228,8 +1228,8 @@ <param name="test.description" value="${test.description}"/> </antcall> </target> - - + + <!-- deploy/undeploy RAR files --> <target name="deploy-rar-common" depends="init-common"> <echo message="Deploying ${rarfile}."/> @@ -1249,7 +1249,7 @@ <arg line="--target ${appserver.instance.name}"/> <arg line="${undeployrar}"/> </exec> -</target> +</target> <!-- setup RAR config values for all instances in a cluster --> <target name="create-cluster-rarconfig" depends="init-common"> @@ -1294,7 +1294,7 @@ <arg line="undeploy"/> <arg line="${as.props}"/> <arg line="--target ${appserver.instance.name}"/> - <arg line="${appname}App"/> + <arg line="${appname}App"/> </exec> <echo message="cmd executed for ${appserver.instance.name}"/> </target> @@ -1340,27 +1340,27 @@ <target name="startPB" depends="init-common"> <echo message="Starting Pointbase servers"/> <property name="jvm.args" - value="-Ddatabase.home=${db.root}/databases + value="-Ddatabase.home=${db.root}/databases -Dpointbase.ini=${db.root}/tools/serveroption/pointbase.ini"/> <parallel> - <java classname="com.pointbase.net.netServer" + <java classname="com.pointbase.net.netServer" classpath="${db.classpath}" failonerror="true" fork="true"> <jvmarg line="${jvm.args}"/> <arg line="/port:9092"/> </java> - <java classname="com.pointbase.net.netServer" + <java classname="com.pointbase.net.netServer" classpath="${db.classpath}" failonerror="true" fork="true"> <jvmarg line="${jvm.args}"/> <arg line="/port:9093"/> - </java> + </java> <!-- ports 9094 and 9095 are being used by the Tomcat group --> - <java classname="com.pointbase.net.netServer" + <java classname="com.pointbase.net.netServer" classpath="${db.classpath}" failonerror="true" fork="true"> <jvmarg line="${jvm.args}"/> <arg line="/port:9094"/> </java> - <java classname="com.pointbase.net.netServer" + <java classname="com.pointbase.net.netServer" classpath="${db.classpath}" failonerror="true" fork="true"> <jvmarg line="${jvm.args}"/> <arg line="/port:9095"/> @@ -1374,21 +1374,21 @@ <echo message="Creating Pointbase Databases"/> <sleep seconds="10"/> <parallel> - <java classname="com.pointbase.tools.toolsCommander" + <java classname="com.pointbase.tools.toolsCommander" classpath="${db.classpath}" failonerror="false"> <arg line="${db.driver}"/> <arg line="jdbc:pointbase:server://${db.host}:9093/sqe-samples,new"/> <arg line="${db.user}"/> <arg line="${db.pwd}"/> </java> - <java classname="com.pointbase.tools.toolsCommander" + <java classname="com.pointbase.tools.toolsCommander" classpath="${db.classpath}" failonerror="false"> <arg line="${db.driver}"/> <arg line="jdbc:pointbase:server://${db.host}:9094/ActivityDB,new"/> <arg line="PBPUBLIC"/> <arg line="PBPUBLIC"/> </java> - <java classname="com.pointbase.tools.toolsCommander" + <java classname="com.pointbase.tools.toolsCommander" classpath="${db.classpath}" failonerror="false"> <arg line="${db.driver}"/> <arg line="jdbc:pointbase:server://${db.host}:9095/app_centric_test_servlet2_4_workflow,new"/> @@ -1397,7 +1397,7 @@ </java> </parallel> </target> - + <target name="copyDrivers" depends="init-common"> <echo message="db.driver.dir=${db.driver.dir}"/> <echo message="db.driver=${db.driver}"/> @@ -1424,7 +1424,7 @@ <property file="${env.APS_HOME}/devtests/jdbc/config/oracle_datadirect.properties"/> </target> -<!-- this target cleans up oracle schema, drops all tables under a user +<!-- this target cleans up oracle schema, drops all tables under a user and creates a new one Added 8/21/2003 Deepa+Sailaja --> @@ -1432,7 +1432,7 @@ <property file="${env.APS_HOME}/devtests/jdbc/config/oracle.properties"/> <sql driver="${db.driver}" url="${db.url}" userid="system" password="sysdba" - onerror="continue" + onerror="continue" classpath="${env.S1AS_HOME}/lib/jdbcdrivers/smoracle.jar"> drop user ${db.user} cascade; create user ${db.user} identified by ${db.pwd}; @@ -1441,8 +1441,8 @@ </target> <target name="reconfig" depends="init-common"> - <echo> - Reconfig has been deprecated. + <echo> + Reconfig has been deprecated. No Action will be taken by the Appserver !!"/> </echo> </target> @@ -1460,7 +1460,7 @@ </target> <target name="stopPB" depends="init-common" if="isUnix"> - <java classname="com.pointbase.tools.toolsCommander" + <java classname="com.pointbase.tools.toolsCommander" classpath="${db.classpath}" failonerror="false"> <arg line="${db.driver}"/> <arg line="jdbc:pointbase:server://${admin.host}:9092/sqe-samples"/> @@ -1473,7 +1473,7 @@ <!-- ======= restart server instance targets ======= --> <target name="restart-server-instance-common" depends="init-common"> - <antcall target="restart-server-instance-common-${execution.mode}"/> + <antcall target="restart-server-instance-common-${execution.mode}"/> </target> <target name="restart-server-instance-common-ee" depends="init-common"> @@ -1515,7 +1515,7 @@ <arg line="--port ${admin.port}"/> <arg line="${cluster.name}"/> </exec> - + <sleep seconds="30"/> <exec executable="${ASADMIN}" failonerror="false"> <arg line="start-cluster"/> @@ -1549,7 +1549,7 @@ </target> <target name="start-domain-ee" depends="init-common" if="isEE"> - <echo message="start-domain is running on Standard/Enterprise Edition..."/> + <echo message="start-domain is running on Standard/Enterprise Edition..."/> <antcall target="start-domain-win"/> <antcall target="start-domain-unix"/> <echo message="Waiting for 90 secs to make sure server properly started..."/> @@ -1655,15 +1655,15 @@ <target name="run-loose-reporter" depends="init-common"> <!-- - Caution: + Caution: the test description should be passed as 'one' word with no spaces - testname_and_status parameter can be overloaded by specifying multiple + testname_and_status parameter can be overloaded by specifying multiple test names and their status in the order: testname teststatus - thus, passing space seperated argument makes more sense here. + thus, passing space seperated argument makes more sense here. --> <property name="testdesc" value="default"/> <property name="testname_and_status" value="defaultname did_not_run"/> - <java + <java classname="com.sun.ejte.ccl.reporter.LooseReporterClient" classpath="${env.APS_HOME}/lib/reporter.jar"> <arg line="${testdesc}"/> @@ -1673,7 +1673,7 @@ <!-- End Report Targets --> <target name="list-components-common" depends="init-common"> - <exec executable="${ASADMIN}" + <exec executable="${ASADMIN}" outputproperty="components-list" failonerror="false"> <arg line="list-components"/> @@ -1682,7 +1682,7 @@ </target> <target name="show-component-status-common" depends="init-common"> - <exec executable="${ASADMIN}" outputproperty="component-status" + <exec executable="${ASADMIN}" outputproperty="component-status" failonerror="false"> <arg line="show-component-status"/> <arg line="${as.props}"/> @@ -1718,13 +1718,13 @@ <!-- usage --> <target name="usage-common"> - <echo> + <echo> ant clean Remove all classes files ant build Build the application ant deploy Deploy the ear files to S1AS - ant run Run the application + ant run Run the application ant undeploy Undeploy the ear files from S1AS - ant usage Display this message + ant usage Display this message </echo> </target> @@ -1757,21 +1757,21 @@ </target> <target name="setupTimer" depends="init-common" if="ee"> - <exec executable="${ASADMIN}" failonerror="false"> - <arg line="create-resource-ref"/> - <arg line="--user ${admin.user}"/> - <arg line="--password ${admin.password}"/> - <arg line="--host ${admin.host}"/> - <arg line="--port ${admin.port}"/> - <arg line="--target ${appserver.instance.name}"/> - <arg line="${jdbc.resource.name}"/> + <exec executable="${ASADMIN}" failonerror="false"> + <arg line="create-resource-ref"/> + <arg line="--user ${admin.user}"/> + <arg line="--password ${admin.password}"/> + <arg line="--host ${admin.host}"/> + <arg line="--port ${admin.port}"/> + <arg line="--target ${appserver.instance.name}"/> + <arg line="${jdbc.resource.name}"/> </exec> <exec executable="${ASADMIN}" failonerror="false"> - <arg line="set"/> - <arg line="--user ${admin.user}"/> - <arg line="--password ${admin.password}"/> - <arg line="--host ${admin.host}"/> - <arg line="--port ${admin.port}"/> + <arg line="set"/> + <arg line="--user ${admin.user}"/> + <arg line="--password ${admin.password}"/> + <arg line="--host ${admin.host}"/> + <arg line="--port ${admin.port}"/> <arg line="${appserver.instance.name}-config.ejb-container.ejb-timer-service.timer-datasource=${jdbc.resource.name}"/> </exec> <echo message="creating timer table from ${env.S1AS_HOME}/lib/install/ejbtimer_${db.type}"/> @@ -1814,17 +1814,17 @@ <target name="asadmin-common-ignore-fail"> - <echo message="Doing admin task ${admin.command} (ignore failures)" + <echo message="Doing admin task ${admin.command} (ignore failures)" level="verbose"/> <echo message="Operand ${operand.props}" level="verbose"/> <echo message="asadmin ${admin.command} ${as.props} ${operand.props}"/> <exec executable="${ASADMIN}" failonerror="false"> - <arg line="${admin.command} ${as.props} ${operand.props}" /> + <arg line="${admin.command} ${as.props} ${operand.props}" /> </exec> </target> <target name="asadmin-batch-common"> - <echo message="Doing admin batch task ${admin.command} --file" + <echo message="Doing admin batch task ${admin.command} --file" level="verbose"/> <exec executable="${ASADMIN}" failonerror="true"> <env key="AS_ADMIN_PORT" value="${admin.port}"/> @@ -1832,8 +1832,8 @@ <env key="AS_ADMIN_PASSWORD" value="${admin.password}"/> <env key="AS_ADMIN_HOST" value="${admin.host}"/> <env key="AS_ADMIN_INSTANCE" value="${appserver.instance.name}"/> - <arg line="--target ${appserver.instance.name} - multimode --file ${asadmin.file}" /> + <arg line="--target ${appserver.instance.name} + multimode --file ${asadmin.file}" /> </exec> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/config/ee-properties.xml b/appserver/tests/appserv-tests/devtests/jdbc/config/ee-properties.xml index 01a3246..91afceb 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/config/ee-properties.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/config/ee-properties.xml
@@ -18,26 +18,26 @@ <property environment="env"/> -<target name="init-common" - depends="setdefaultmode, setToolProperty,setS1ASclassPath,setS1AS80classPath,setS1WSclassPath, - setJWSDPclassPath,setTimeStamp"> +<target name="init-common" + depends="setdefaultmode, setToolProperty,setS1ASclassPath,setS1AS80classPath,setS1WSclassPath, + setJWSDPclassPath,setTimeStamp"> <exec executable="uname" outputproperty="hostname"> <arg line="-n"/> - </exec> + </exec> <exec executable="uname" outputproperty="osname"> <arg line="-s"/> </exec> - + <property name="pe" value="Platform Edition of S1AS"/> <!-- Appserv properties --> <property name="classpathsuffix.file" value="classpathsuffix.txt"/> <property name="apptype" value="application"/> <property name="appuser" value="j2ee"/> - <property name="apppwd" value="j2ee"/> + <property name="apppwd" value="j2ee"/> <property name="authrealmname" value="file"/> - <property name="serverinstance.name" value="test-server"/> + <property name="serverinstance.name" value="test-server"/> <echo file="${admin.password.file}" append="false"/> <property name="as.props" value="--user ${admin.user} --passwordfile ${admin.password.file} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/> @@ -52,7 +52,7 @@ <property name="jms.factory.type" value="jakarta.jms.QueueConnectionFactory"/> <property name="jms.resource.name" value="jms/SampleQueue"/> <property name="jms.resource.type" value="jakarta.jms.Queue"/> - <property name="jms.factory.type" + <property name="jms.factory.type" value="jakarta.jms.QueueConnectionFactory" /> <property name="queue.property.name" value="imqDestinationName" /> <property name="queue.property.value" value="SampleQueue" /> @@ -81,7 +81,7 @@ <property name="mqadmin.password" value="admin"/> <!-- pointbase properties --> - <!-- Changed to derby properties + <!-- Changed to derby properties <property file="${env.APS_HOME}/devtests/jdbc/config/pointbase.properties"/> <property name="db.root" value="${env.S1AS_HOME}/pointbase"/> <property name="db.classpath" value="${db.root}/lib/pbtools.jar:${db.root}/lib/pbclient.jar:${db.root}/lib/pbembedded.jar"/>--> @@ -91,7 +91,7 @@ <!-- Test Harness properties --> <property name="glassfish-acc.xml" value="${env.S1AS_HOME}/domains/domain1/config/glassfish-acc.xml"/> - <property name="build.base.dir" + <property name="build.base.dir" value="${env.APS_HOME}/build/${execution.mode}/${os.arch}_${hostname}_${osname}/${module}"/> <property name="build.classes.dir" value="${build.base.dir}/classes"/> <property name="assemble.dir" value="${build.base.dir}/archive"/> @@ -117,14 +117,14 @@ <property name="component.name" value="${appname}App"/> <property name="test.base" value="pe"/> - <property name="base.report.dir" - value="${env.APS_HOME}/reports/${test.base}-${execution.mode}"/> + <property name="base.report.dir" + value="${env.APS_HOME}/reports/${test.base}-${execution.mode}"/> <!-- - <property name="results.golden.list.file" - value="${env.APS_HOME}/build-config/results_baseline.properties"/> + <property name="results.golden.list.file" + value="${env.APS_HOME}/build-config/results_baseline.properties"/> <property name="results.analysis.file" value="test_analysis"/> - <property name="results.list.file" - value="${env.rPS_HOME}/build-config/results.properties"/> + <property name="results.list.file" + value="${env.rPS_HOME}/build-config/results.properties"/> <property name="results.summary.file" value="summaryreport"/> --> <!-- Test Harness properties for WebTest ============ --> @@ -151,8 +151,8 @@ <fileset dir="${env.APS_HOME}/lib" includes="**/*.jar,**/*.zip"/> <fileset dir="${env.ANT_HOME}/lib" includes="*.jar"/> </path> - <pathconvert pathsep=":" - property="s1as.classpath" + <pathconvert pathsep=":" + property="s1as.classpath" refid="s1as_classpath_jars"/> </target> @@ -169,11 +169,11 @@ <target name="setS1WSclassPath" if="isS1WS"> <path id="s1ws_classpath_jars"> - <fileset dir="${env.IWS_SERVER_HOME}/bin/https/jar" + <fileset dir="${env.IWS_SERVER_HOME}/bin/https/jar" includes="*.jar"/> </path> - <pathconvert pathsep=":" - property="s1ws.classpath" + <pathconvert pathsep=":" + property="s1ws.classpath" refid="s1ws_classpath_jars"/> </target> @@ -187,11 +187,11 @@ refid="jwsdp_classpath_jars"/> </target> -<target name="setToolProperty" +<target name="setToolProperty" depends="setOSConditions,setToolWin,setToolUnix"> </target> -<target name="setOSConditions"> +<target name="setOSConditions"> <condition property="isUnix"> <os family="unix"/> </condition> @@ -200,7 +200,7 @@ </condition> </target> -<target name="setToolWin" if="isWindows"> +<target name="setToolWin" if="isWindows"> <property name="APPCLIENT" value="${env.S1AS_HOME}/bin/appclient.bat"/> <property name="ASADMIN" value="${env.S1AS_HOME}/bin/asadmin.bat"/> <property name="IMQCMD" value="${env.S1AS_HOME}/imq/bin/imqcmd.exe"/> @@ -218,7 +218,7 @@ <property name="WSCOMPILE" value="${env.S1AS_HOME}/bin/wscompile.bat"/> </target> -<target name="setToolUnix" if="isUnix"> +<target name="setToolUnix" if="isUnix"> <property name="APPCLIENT" value="${env.S1AS_HOME}/bin/appclient"/> <property name="ASADMIN" value="${env.S1AS_HOME}/bin/asadmin"/> <property name="IMQCMD" value="${env.S1AS_HOME}/imq/bin/imqcmd"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/config/mail.xml b/appserver/tests/appserv-tests/devtests/jdbc/config/mail.xml index 66b7fe5..4cb32d5 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/config/mail.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/config/mail.xml
@@ -22,11 +22,11 @@ <property name="mail.host" value="ha21sca-mail1.sfbay.sun.com"/> <property name="machine.config" value="default_${os.name}_${os.arch}" /> <target name="mail" depends="init-common"> - <mail from="${results.mailer}" tolist="${results.mailee}" - subject="Test results for ${machine.config}" - mailhost="${mail.host}" - message="Yeh lo results..."> - <fileset dir="${env.SPS_HOME}" + <mail from="${results.mailer}" tolist="${results.mailee}" + subject="Test results for ${machine.config}" + mailhost="${mail.host}" + message="Yeh lo results..."> + <fileset dir="${env.SPS_HOME}" includes="test_results.html"/> - </mail> + </mail> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/build.properties index b1b1fae..8653ef5 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-connectioncreationretry"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="poolname" value="jdbc-connectioncreationretry"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/build.xml index dc25220..c2fd088 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/build.xml
@@ -22,8 +22,8 @@ <!ENTITY commonBuild SYSTEM "./../../../config/common.xml"> <!ENTITY testproperties SYSTEM "./build.properties"> <!ENTITY run SYSTEM "./../../../config/run.xml"> - <!ENTITY jdbcxml SYSTEM "./../JdbcCommon.xml"> - <!ENTITY jdbcProps SYSTEM "./../JdbcCommon.properties"> + <!ENTITY jdbcxml SYSTEM "./../JdbcCommon.xml"> + <!ENTITY jdbcProps SYSTEM "./../JdbcCommon.properties"> ]> <project name="mix" default="usage" basedir="."> @@ -71,13 +71,13 @@ <target name="run" depends="init-common"> <antcall target="stop-derby"/> - <parallel> - <antcall target="runclient-common"/> - <sequential> - <sleep seconds="15"/> - <antcall target="start-derby"/> - </sequential> - </parallel> + <parallel> + <antcall target="runclient-common"/> + <sequential> + <sleep seconds="15"/> + <antcall target="start-derby"/> + </sequential> + </parallel> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/client/Client.java index dff045a..7ec3880 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/client/Client.java
@@ -36,12 +36,12 @@ javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP convalBMP = convalBMPHome.create(); - stat.addDescription("Connection Creation Retry Tests"); + stat.addDescription("Connection Creation Retry Tests"); if (convalBMP.test1()) { - stat.addStatus(testSuite + "test ", stat.PASS); + stat.addStatus(testSuite + "test ", stat.PASS); } else { - stat.addStatus(testSuite + "test ", stat.FAIL); + stat.addStatus(testSuite + "test ", stat.FAIL); } stat.printSummary(); }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/ejb/SimpleBMPBean.java index cd1d898..5d1b466 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/ejb/SimpleBMPBean.java
@@ -41,7 +41,7 @@ } - + /* Get a single connection and close it */ public boolean test1(){ Connection conn = null;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/conncreationretry/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/build.properties index 4959885..021d74c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-statementwrapper"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/build.xml index 27d58ec..675d758 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/build.xml
@@ -42,7 +42,7 @@ <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"/> @@ -54,13 +54,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -76,7 +76,7 @@ <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -90,7 +90,7 @@ <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.ql-jdbc-pool.steady_pool_size=${steady-pool-size}"/> </antcall> @@ -124,14 +124,14 @@ </target> -<target name="switch-on-monitoring"> +<target name="switch-on-monitoring"> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="server.monitoring-service.module-monitoring-levels.jdbc-connection-pool=HIGH"/> </antcall> </target> -<target name="switch-off-monitoring"> +<target name="switch-off-monitoring"> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" @@ -145,7 +145,7 @@ <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/client/SimpleBMPClient.java index a3b5855..c8b9e6e 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/client/SimpleBMPClient.java
@@ -34,7 +34,7 @@ public class SimpleBMPClient { - + private static long count = 0; private static final Object lock = new Integer(10); private long totalIterations = 0; @@ -84,7 +84,7 @@ for (int i = 0; i < threads.length; i++) { threads[i].start(); } -// System.out.println("Started at : " + +// System.out.println("Started at : " + TimerTask task = new TimerTask() { public void run() { @@ -102,7 +102,7 @@ System.out.println("-----------------------------------------------------------------------------------"); System.out.println("Total getConnection() : " + totalCount + ", monitoring-count : " + monitoringCount); System.out.println("-----------------------------------------------------------------------------------"); - + if(totalCount == monitoringCount){ stat.addStatus(testSuite + " Perf-test : ", stat.PASS); }else{ @@ -112,7 +112,7 @@ e.printStackTrace(); } stat.printSummary(); - + } }; Timer timer = new Timer();
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/sql/create_pointbase.sql index dd4c5e5..11e61ee 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/connection-pool-perf/sql/create_pointbase.sql
@@ -1,10 +1,10 @@ - -Drop table customer_stmt_wrapper; - -CREATE TABLE customer_stmt_wrapper ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); + +Drop table customer_stmt_wrapper; + +CREATE TABLE customer_stmt_wrapper ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); INSERT INTO customer_stmt_wrapper VALUES(2, 'pqrs'); \ No newline at end of file
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/build.properties index 05a29ca..37e3ca6 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-statementwrapper"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/build.xml index 9cd6061..b7ca06c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/build.xml
@@ -36,7 +36,7 @@ <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"/> @@ -48,13 +48,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -80,7 +80,7 @@ <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.ql-jdbc-pool.connection_leak_timeout_in_seconds=10"/> </antcall> @@ -91,11 +91,11 @@ </antcall> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -103,7 +103,7 @@ <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/client/SimpleBMPClient.java index a9a87e3..5e3d5bf 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/client/SimpleBMPClient.java
@@ -27,21 +27,21 @@ public class SimpleBMPClient { - public static int NO_OF_THREADS = 20; + public static int NO_OF_THREADS = 20; public int failedCount = 0; SimpleReporterAdapter stat = new SimpleReporterAdapter(); String testSuite = "ConnectionLeakReclaim "; public SimpleBMPClient(){ - execute(); + execute(); } public static void main(String[] args) { - new SimpleBMPClient(); + new SimpleBMPClient(); } private void execute() { - stat.addDescription("Connection Leak Reclaim Notify Tests"); + stat.addDescription("Connection Leak Reclaim Notify Tests"); WorkerThread workers[] = new WorkerThread[NO_OF_THREADS]; for(int i=0; i< workers.length;i++){ workers[i] = new WorkerThread(); @@ -60,11 +60,11 @@ for(int i=0; i<workers.length;i++){ workers[i].setExit(true); } - if(failedCount > 0) { - stat.addStatus(testSuite + "test1 : ", stat.FAIL); - } else { - stat.addStatus(testSuite + "test1 : ", stat.PASS); - } + if(failedCount > 0) { + stat.addStatus(testSuite + "test1 : ", stat.FAIL); + } else { + stat.addStatus(testSuite + "test1 : ", stat.PASS); + } stat.printSummary(); } @@ -88,7 +88,7 @@ javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - test(simpleBMP); + test(simpleBMP); }catch(Exception e){ System.out.println("Thread : " + Thread.currentThread().getName() + "did not run "); e.printStackTrace(); @@ -97,10 +97,10 @@ } public boolean test(SimpleBMP bmp) throws RemoteException{ - if( ! bmp.test1()) { - SimpleBMPClient.this.failedCount++; - } - return true; + if( ! bmp.test1()) { + SimpleBMPClient.this.failedCount++; + } + return true; } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/descriptor/ejb-jar.xml index 951ef92..addd03a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/descriptor/ejb-jar.xml
@@ -52,6 +52,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/ejb/SimpleBMPBean.java index 4857269..403288b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/ejb/SimpleBMPBean.java
@@ -29,7 +29,7 @@ private transient jakarta.ejb.SessionContext m_ctx = null; public void setSessionContext(SessionContext context) { - m_ctx = context; + m_ctx = context; } public Integer ejbCreate() throws CreateException { @@ -42,26 +42,26 @@ Connection conn = null; boolean passed = true; Context context = null; - long startTime = 0, endTime = 0, timeTaken =0; + long startTime = 0, endTime = 0, timeTaken =0; try { context = new InitialContext(); ds = (DataSource) context.lookup("java:comp/env/jdbc/DataSource"); } catch(NamingException e) { throw new EJBException("cant find datasource"); } - try { + try { startTime = System.currentTimeMillis(); conn = ds.getConnection(); - endTime = System.currentTimeMillis(); + endTime = System.currentTimeMillis(); } catch (Exception e) { e.printStackTrace(); passed = false; - } - timeTaken = (endTime-startTime)/1000; + } + timeTaken = (endTime-startTime)/1000; System.out.println("preparedStmtTest : TimeTaken : " + timeTaken); - if(timeTaken > 59) { - passed = false; - } + if(timeTaken > 59) { + passed = false; + } return passed; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/sql/create_pointbase.sql index e4914f6..f256076 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/sql/drop_pointbase.sql index 70d1fcc..d854b95 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleakreclaimnotify/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/build.properties index c4cbed0..61986d7 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-connectionleaktracing"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="poolname" value="jdbc-connectionleaktracing"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/build.xml index 525787d..4f6c720 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/build.xml
@@ -19,9 +19,9 @@ --> <!ENTITY commonSetup SYSTEM "./../../../config/properties.xml"> - <!ENTITY commonBuild SYSTEM "./../../../config/common.xml"> + <!ENTITY commonBuild SYSTEM "./../../../config/common.xml"> <!ENTITY testproperties SYSTEM "./build.properties"> - <!ENTITY run SYSTEM "./../config/run.xml"> + <!ENTITY run SYSTEM "./../config/run.xml"> ]> <project name="mix" default="usage" basedir="."> @@ -51,9 +51,9 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> <param name="ejbjar.classes" - value="**/ejb/*.class"/> + value="**/ejb/*.class"/> <param name="appclientjar.classes" - value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class"/> + value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class"/> </antcall> </target> @@ -67,7 +67,7 @@ </target> <target name="run" depends="init-common"> - <antcall target="runclient-common"/> + <antcall target="runclient-common"/> </target> @@ -77,7 +77,7 @@ <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> <antcall target="delete-jdbc-stuff"/> - <antcall target="undeploy-common"/> + <antcall target="undeploy-common"/> </target> <target name="usage">
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/client/Client.java index 671c68c..082f433 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/client/Client.java
@@ -32,20 +32,20 @@ String testSuite = "ConnectionLeakTracing"; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - stat.addDescription("Connection Leak Tracing Tests"); + stat.addDescription("Connection Leak Tracing Tests"); - for(int i=0; i<3; i++){ + for(int i=0; i<3; i++){ SimpleBMPHome convalBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP convalBMP = convalBMPHome.create(); - if(!convalBMP.test1()){ - stat.addStatus(testSuite + "test1 : ", stat.FAIL); - break; - } - Thread.sleep(20000); - } - stat.addStatus(testSuite + "test1 : ", stat.PASS); + if(!convalBMP.test1()){ + stat.addStatus(testSuite + "test1 : ", stat.FAIL); + break; + } + Thread.sleep(20000); + } + stat.addStatus(testSuite + "test1 : ", stat.PASS); stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/descriptor/ejb-jar.xml index bc6233e..7db7cb2 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/descriptor/ejb-jar.xml
@@ -31,16 +31,16 @@ <ejb-name>SimpleBMPEJB</ejb-name> <home>com.sun.s1asdev.jdbc.connectionleaktracing.ejb.SimpleBMPHome</home> <remote>com.sun.s1asdev.jdbc.connectionleaktracing.ejb.SimpleBMP</remote> - <ejb-class>com.sun.s1asdev.jdbc.connectionleaktracing.ejb.SimpleBMPBean</ejb-class> - <session-type>Stateful</session-type> - <transaction-type>Container</transaction-type> - <!--<persistence-type>Bean</persistence-type> + <ejb-class>com.sun.s1asdev.jdbc.connectionleaktracing.ejb.SimpleBMPBean</ejb-class> + <session-type>Stateful</session-type> + <transaction-type>Container</transaction-type> + <!--<persistence-type>Bean</persistence-type> <prim-key-class>java.lang.Integer</prim-key-class> <reentrant>False</reentrant> <security-identity> <description></description> <use-caller-identity></use-caller-identity> - </security-identity>--> + </security-identity>--> <resource-ref> <res-ref-name>DataSource</res-ref-name> <res-type>javax.sql.DataSource</res-type>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/ejb/SimpleBMPBean.java index 98a69ed..dd98a7d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/ejb/SimpleBMPBean.java
@@ -28,7 +28,7 @@ private transient jakarta.ejb.SessionContext m_ctx = null; public void setSessionContext(SessionContext context) { - m_ctx = context; + m_ctx = context; } public Integer ejbCreate() throws CreateException { @@ -36,7 +36,7 @@ } - + /* Get a single connection and close it */ public boolean test1() { Connection conn = null;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/connleaktracing/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/build.xml index 93b22e5..be1352a 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/build.xml
@@ -23,7 +23,7 @@ ]> <project name="jdbc" default="usage" basedir="."> - + &eeCommon; &eeCommonProperties; @@ -32,24 +32,24 @@ <target name="all"> <antcall target="${execution.mode}-all"/> </target> - + <target name="pe-all"> <delete> <fileset dir="." includes="*.output"/> </delete> <record name="connsharing.output" action="start" /> - <ant dir="nonxa" target="all"/> - <ant dir="xa" target="all"/> + <ant dir="nonxa" target="all"/> + <ant dir="xa" target="all"/> <record name="connsharing.output" action="stop" /> </target> - + <target name="ee-all"> <delete> <fileset dir="." includes="*.output"/> </delete> <record name="connsharing.output" action="start" /> - <ant dir="nonxa" target="all"/> - <ant dir="xa" target="all"/> + <ant dir="nonxa" target="all"/> + <ant dir="xa" target="all"/> <record name="connsharing.output" action="stop" /> </target> @@ -65,9 +65,9 @@ <record name="xa.output" action="stop" /> </target> <target name="usage"> - <echo> - Usage: - ant all (Executes all the jdbc tests) - </echo> + <echo> + Usage: + ant all (Executes all the jdbc tests) + </echo> </target> </project>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/build.properties index 6dbdb88..249fb74 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-connsharingnonxa"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/build.xml index d90a558..7dd22cb 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/build.xml
@@ -41,11 +41,11 @@ &eeSetup; &eeProperties; &testproperties; - --> + --> <property name="execution.mode" value="pe"/> - - + + <target name="all" depends="build,deploy,run,undeploy"/> <target name="all-assoc-with-thread" depends="build,deploy,set-assoc-with-thread,run,undeploy"/> @@ -64,13 +64,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-connsharing-pool"/> @@ -114,12 +114,12 @@ <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="jdbc-connsharing-pool"/> - <param name="jdbc.resource.name" value="jdbc/connsharing"/> + <param name="jdbc.resource.name" value="jdbc/connsharing"/> </antcall> <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="jdbc-connsharing-pool"/> - <param name="jdbc.resource.name" value="jdbc/connsharing2"/> + <param name="jdbc.resource.name" value="jdbc/connsharing2"/> </antcall> <antcall target="deploy-common"/> @@ -133,14 +133,14 @@ </antcall> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -149,7 +149,7 @@ <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/connsharing"/> </antcall> - + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/connsharing2"/> </antcall> @@ -175,7 +175,7 @@ </antcall> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/descriptor/ejb-jar.xml index abc8439..3411113 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/descriptor/ejb-jar.xml
@@ -48,11 +48,11 @@ <transaction-type>Container</transaction-type> <ejb-ref> <description></description> - <ejb-ref-name>ejb/SimpleSession2EJB</ejb-ref-name> - <ejb-ref-type>Session</ejb-ref-type> + <ejb-ref-name>ejb/SimpleSession2EJB</ejb-ref-name> + <ejb-ref-type>Session</ejb-ref-type> <home>com.sun.s1asdev.jdbc.connsharing.nonxa.ejb.SimpleSession2Home</home> <remote>com.sun.s1asdev.jdbc.connsharing.nonxa.ejb.SimpleSession2</remote> - <ejb-link>SimpleSession2EJB</ejb-link> + <ejb-link>SimpleSession2EJB</ejb-link> </ejb-ref> <resource-ref> <res-ref-name>DataSource</res-ref-name> @@ -93,6 +93,6 @@ <trans-attribute>RequiresNew</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/ejb/SimpleSession2Bean.java b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/ejb/SimpleSession2Bean.java index 81e154a..ec6d0af 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/ejb/SimpleSession2Bean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/ejb/SimpleSession2Bean.java
@@ -28,14 +28,14 @@ { private SessionContext ctxt_; - private InitialContext ic_; + private InitialContext ic_; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + try { + ic_ = new InitialContext(); + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { @@ -44,57 +44,57 @@ /** */ public boolean test1() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - boolean passed = false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + boolean passed = false; - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeUpdate( "UPDATE CONNSHARING SET c_phone='CONN_SHARING_BEAN_2' WHERE c_id=100"); + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeUpdate( "UPDATE CONNSHARING SET c_phone='CONN_SHARING_BEAN_2' WHERE c_id=100"); - return true; - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null) { - try { stmt1.close(); } catch( Exception e1 ) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - + return true; + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null) { + try { stmt1.close(); } catch( Exception e1 ) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } } - + + } + public boolean test2() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - boolean passed = false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + boolean passed = false; - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeUpdate( "UPDATE CONNSHARING SET c_phone='CONN_SHARING_BEAN_2_2' WHERE c_id=200"); + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeUpdate( "UPDATE CONNSHARING SET c_phone='CONN_SHARING_BEAN_2_2' WHERE c_id=200"); - return true; - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null) { - try { stmt1.close(); } catch( Exception e1 ) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - + return true; + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null) { + try { stmt1.close(); } catch( Exception e1 ) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } + } public boolean test3() throws Exception {
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/sql/create_pointbase.sql index 8cb3174..721d9e8 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/sql/create_pointbase.sql
@@ -1,6 +1,6 @@ -Drop table CONNSHARING; - -CREATE TABLE CONNSHARING ( - c_id integer constraint pk_key primary key, - c_phone char(25) -); +Drop table CONNSHARING; + +CREATE TABLE CONNSHARING ( + c_id integer constraint pk_key primary key, + c_phone char(25) +);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/sql/drop_pointbase.sql index c2817f6..77d1d5a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/nonxa/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table CONNSHARING; +Drop table CONNSHARING;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/build.properties index be244a3..e93d487 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-connsharingxa"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/build.xml index 21ab02e..109029b 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/build.xml
@@ -39,7 +39,7 @@ <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"/> @@ -51,13 +51,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="deploy-jdbc-oracle-xa-common"> <param name="oracle.xapool.name" value="jdbc-connsharing-xa-pool"/> @@ -69,7 +69,7 @@ </antcall> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -78,15 +78,15 @@ <antcall target="run-lazy-enlist"/> </target> - + <target name="run-lazy-enlist" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-connsharing-xa-pool.property.LazyConnectionEnlistment=true"/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-connsharing-xa-pool.property.LazyConnectionEnlistment=true"/> </antcall> <antcall target="runclient-common"/> @@ -100,7 +100,7 @@ <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/connsharing-xa"/> </antcall> - + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/connsharing2-xa"/> </antcall> @@ -108,9 +108,9 @@ <antcall target="delete-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-connsharing-xa-pool"/> </antcall> - + <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/client/Client.java index 32a9624..a5f4b6f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/client/Client.java
@@ -25,45 +25,45 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "connsharing-test1 "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "connsharing-test1 "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); - - stat.addDescription("Running notxops testSuite1 "); + + stat.addDescription("Running notxops testSuite1 "); SimpleSession simpleSession = simpleSessionHome.create(); if (simpleSession.test1() && simpleSession.query()) { - stat.addStatus( testSuite + " test1 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test1 : " , stat.FAIL ); - } + stat.addStatus( testSuite + " test1 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test1 : " , stat.FAIL ); + } if (simpleSession.test2() && simpleSession.query()) { - stat.addStatus( testSuite + " test2 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test2 : " , stat.FAIL ); - } + stat.addStatus( testSuite + " test2 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test2 : " , stat.FAIL ); + } if (simpleSession.test3() && simpleSession.query2()) { - stat.addStatus( testSuite + " test3 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test3 : " , stat.FAIL ); - } + stat.addStatus( testSuite + " test3 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test3 : " , stat.FAIL ); + } if (simpleSession.test4() && simpleSession.query2()) { - stat.addStatus( testSuite + " test4 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test4 : " , stat.FAIL ); - } - - - stat.printSummary(); + stat.addStatus( testSuite + " test4 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test4 : " , stat.FAIL ); + } + + + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/descriptor/ejb-jar.xml index bb887bc..71162c9 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/descriptor/ejb-jar.xml
@@ -49,11 +49,11 @@ <transaction-type>Container</transaction-type> <ejb-ref> <description></description> - <ejb-ref-name>ejb/SimpleSession2EJB</ejb-ref-name> - <ejb-ref-type>Session</ejb-ref-type> + <ejb-ref-name>ejb/SimpleSession2EJB</ejb-ref-name> + <ejb-ref-type>Session</ejb-ref-type> <home>com.sun.s1asdev.jdbc.connsharing.xa.ejb.SimpleSession2Home</home> <remote>com.sun.s1asdev.jdbc.connsharing.xa.ejb.SimpleSession2</remote> - <ejb-link>SimpleSession2EJB</ejb-link> + <ejb-link>SimpleSession2EJB</ejb-link> </ejb-ref> <resource-ref> <res-ref-name>DataSource</res-ref-name> @@ -87,6 +87,6 @@ <trans-attribute>RequiresNew</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/ejb/SimpleSession2Bean.java b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/ejb/SimpleSession2Bean.java index 062ebe2..efa1a4f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/ejb/SimpleSession2Bean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/ejb/SimpleSession2Bean.java
@@ -28,14 +28,14 @@ { private SessionContext ctxt_; - private InitialContext ic_; + private InitialContext ic_; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + try { + ic_ = new InitialContext(); + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { @@ -44,37 +44,37 @@ /** * Get connection and do some database inserts. Then call another * EJB's method in the same transaction and change the inserted value. - * Since all this is in the same tx, the other bean's method should + * Since all this is in the same tx, the other bean's method should * get the same connection (physical) and hence be able to see the * inserted value even though the tx has not committed yet. * The idea is to test connection sharing */ public boolean test1(String newVal, int key) throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); - Connection conn1 = null; - Statement stmt1 = null; - boolean passed = false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); + Connection conn1 = null; + Statement stmt1 = null; + boolean passed = false; - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeUpdate( "UPDATE CONNSHARING SET c_phone = '"+ newVal +"' WHERE" + - " c_id = " + key); - + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeUpdate( "UPDATE CONNSHARING SET c_phone = '"+ newVal +"' WHERE" + + " c_id = " + key); + return true; - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null) { - try { stmt1.close(); } catch( Exception e1 ) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null) { + try { stmt1.close(); } catch( Exception e1 ) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } } - + } + public void ejbLoad() {} public void ejbStore() {} public void ejbRemove() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/ejb/SimpleSessionBean.java index 1c12088..c93560f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/ejb/SimpleSessionBean.java
@@ -28,14 +28,14 @@ { private SessionContext ctxt_; - private InitialContext ic_; + private InitialContext ic_; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + try { + ic_ = new InitialContext(); + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { @@ -44,47 +44,47 @@ /** * Get connection and do some database inserts. Then call another * EJB's method in the same transaction and change the inserted value. - * Since all this is in the same tx, the other bean's method should + * Since all this is in the same tx, the other bean's method should * get the same connection (physical) and hence be able to see the * inserted value even though the tx has not committed yet. * The idea is to test connection sharing */ public boolean test1() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - boolean passed = false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + boolean passed = false; - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeUpdate( "INSERT INTO CONNSHARING values (100, 'ADITYA')"); - - Object o = ic_.lookup("java:comp/env/ejb/SimpleSession2EJB"); - SimpleSession2Home home = (SimpleSession2Home) - javax.rmi.PortableRemoteObject.narrow( o, SimpleSession2Home.class); - SimpleSession2 bean = home.create(); + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeUpdate( "INSERT INTO CONNSHARING values (100, 'ADITYA')"); - return bean.test1("ADITYA_BEAN_2", 100); + Object o = ic_.lookup("java:comp/env/ejb/SimpleSession2EJB"); + SimpleSession2Home home = (SimpleSession2Home) + javax.rmi.PortableRemoteObject.narrow( o, SimpleSession2Home.class); + SimpleSession2 bean = home.create(); - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null) { - try { stmt1.close(); } catch( Exception e1 ) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + return bean.test1("ADITYA_BEAN_2", 100); + + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null) { + try { stmt1.close(); } catch( Exception e1 ) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } } - + } + /** * Get connection and do some database inserts. Then call another * EJB's method in the same transaction and change the inserted value. - * Since all this is in the same tx, the other bean's method should + * Since all this is in the same tx, the other bean's method should * get the same connection (physical) and hence be able to see the * inserted value even though the tx has not committed yet. * This test does the same thing as test1 except that it closes the @@ -92,119 +92,119 @@ * The idea is to test connection sharing */ public boolean test2() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - boolean passed = false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + boolean passed = false; - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeUpdate( "INSERT INTO CONNSHARING values (100, 'ADITYA')"); - - stmt1.close(); - conn1.close(); + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeUpdate( "INSERT INTO CONNSHARING values (100, 'ADITYA')"); - Object o = ic_.lookup("java:comp/env/ejb/SimpleSession2EJB"); - SimpleSession2Home home = (SimpleSession2Home) - javax.rmi.PortableRemoteObject.narrow( o, SimpleSession2Home.class); - SimpleSession2 bean = home.create(); + stmt1.close(); + conn1.close(); - return bean.test1("ADITYA_BEAN_2", 100); + Object o = ic_.lookup("java:comp/env/ejb/SimpleSession2EJB"); + SimpleSession2Home home = (SimpleSession2Home) + javax.rmi.PortableRemoteObject.narrow( o, SimpleSession2Home.class); + SimpleSession2 bean = home.create(); - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null) { - try { stmt1.close(); } catch( Exception e1 ) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + return bean.test1("ADITYA_BEAN_2", 100); + + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null) { + try { stmt1.close(); } catch( Exception e1 ) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } } public boolean test3() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Connection conn2 = null; - Statement stmt1 = null; - Statement stmt2 = null; - ResultSet rs1 = null; - boolean passed = false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + Connection conn2 = null; + Statement stmt1 = null; + Statement stmt2 = null; + ResultSet rs1 = null; + boolean passed = false; - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeUpdate( "INSERT INTO CONNSHARING values (100, 'ADITYA')"); - - conn2 = ds.getConnection(); - stmt2 = conn2.createStatement(); - stmt2.executeUpdate( "INSERT INTO CONNSHARING values (200, 'ADITYA_200')"); + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeUpdate( "INSERT INTO CONNSHARING values (100, 'ADITYA')"); - Object o = ic_.lookup("java:comp/env/ejb/SimpleSession2EJB"); - SimpleSession2Home home = (SimpleSession2Home) - javax.rmi.PortableRemoteObject.narrow( o, SimpleSession2Home.class); - SimpleSession2 bean = home.create(); + conn2 = ds.getConnection(); + stmt2 = conn2.createStatement(); + stmt2.executeUpdate( "INSERT INTO CONNSHARING values (200, 'ADITYA_200')"); - return bean.test1("ADITYA_BEAN_2_2", 200); + Object o = ic_.lookup("java:comp/env/ejb/SimpleSession2EJB"); + SimpleSession2Home home = (SimpleSession2Home) + javax.rmi.PortableRemoteObject.narrow( o, SimpleSession2Home.class); + SimpleSession2 bean = home.create(); - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null) { - try { stmt1.close(); } catch( Exception e1 ) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + return bean.test1("ADITYA_BEAN_2_2", 200); + + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null) { + try { stmt1.close(); } catch( Exception e1 ) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } } public boolean test4() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Connection conn2 = null; - Statement stmt1 = null; - Statement stmt2 = null; - boolean passed = false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + Connection conn2 = null; + Statement stmt1 = null; + Statement stmt2 = null; + boolean passed = false; - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeUpdate( "INSERT INTO CONNSHARING values (100, 'ADITYA')"); - - stmt1.close(); + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeUpdate( "INSERT INTO CONNSHARING values (100, 'ADITYA')"); + + stmt1.close(); conn1.close(); - conn2 = ds.getConnection(); - stmt2 = conn2.createStatement(); - stmt2.executeUpdate( "INSERT INTO CONNSHARING values (200, 'ADITYA_200')"); + conn2 = ds.getConnection(); + stmt2 = conn2.createStatement(); + stmt2.executeUpdate( "INSERT INTO CONNSHARING values (200, 'ADITYA_200')"); - stmt2.close(); - conn2.close(); + stmt2.close(); + conn2.close(); - Object o = ic_.lookup("java:comp/env/ejb/SimpleSession2EJB"); - SimpleSession2Home home = (SimpleSession2Home) - javax.rmi.PortableRemoteObject.narrow( o, SimpleSession2Home.class); - SimpleSession2 bean = home.create(); + Object o = ic_.lookup("java:comp/env/ejb/SimpleSession2EJB"); + SimpleSession2Home home = (SimpleSession2Home) + javax.rmi.PortableRemoteObject.narrow( o, SimpleSession2Home.class); + SimpleSession2 bean = home.create(); - return bean.test1("ADITYA_BEAN_2_2", 200); + return bean.test1("ADITYA_BEAN_2_2", 200); - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null) { - try { stmt1.close(); } catch( Exception e1 ) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null) { + try { stmt1.close(); } catch( Exception e1 ) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } } /** @@ -213,50 +213,50 @@ */ public boolean query() throws Exception { DataSource ds = (DataSource) ic_.lookup("java:comp/env/DataSource"); - Connection conn = null; - Statement stmt = null; - ResultSet rs = null; + Connection conn = null; + Statement stmt = null; + ResultSet rs = null; - try { - conn = ds.getConnection(); - stmt = conn.createStatement(); - rs = stmt.executeQuery("SELECT * FROM CONNSHARING WHERE c_id=100"); - if ( rs.next() ) { + try { + conn = ds.getConnection(); + stmt = conn.createStatement(); + rs = stmt.executeQuery("SELECT * FROM CONNSHARING WHERE c_id=100"); + if ( rs.next() ) { String str = rs.getString( 2 ); - System.out.println(" str => " + str ); - if( "ADITYA_BEAN_2".equals(str.trim()) ) { - return true; - } - } + System.out.println(" str => " + str ); + if( "ADITYA_BEAN_2".equals(str.trim()) ) { + return true; + } + } - return false; - } catch( SQLException e ) { - e.printStackTrace(); - return false; - } finally { - if( rs != null ) { - try { rs.close() ; }catch( Exception e ) {} - } + return false; + } catch( SQLException e ) { + e.printStackTrace(); + return false; + } finally { + if( rs != null ) { + try { rs.close() ; }catch( Exception e ) {} + } - if( stmt != null) { - try { stmt.close(); } catch(Exception e) { } - } - - //cleanup table - try { - stmt = conn.createStatement(); - stmt.executeUpdate( "DELETE FROM CONNSHARING WHERE c_id=100" ); - stmt.close(); - } catch( Exception e ) { - e.printStackTrace(); - } + if( stmt != null) { + try { stmt.close(); } catch(Exception e) { } + } - if( conn != null ) { try { conn.close(); } catch(Exception e) { } - } - } - + //cleanup table + try { + stmt = conn.createStatement(); + stmt.executeUpdate( "DELETE FROM CONNSHARING WHERE c_id=100" ); + stmt.close(); + } catch( Exception e ) { + e.printStackTrace(); + } + + if( conn != null ) { try { conn.close(); } catch(Exception e) { } + } + } + } /** @@ -265,72 +265,72 @@ */ public boolean query2() throws Exception { DataSource ds = (DataSource) ic_.lookup("java:comp/env/DataSource"); - Connection conn = null; - Statement stmt = null; - ResultSet rs = null; - ResultSet rs1 = null; - String str1 = null; - String str2 = null; - + Connection conn = null; + Statement stmt = null; + ResultSet rs = null; + ResultSet rs1 = null; + String str1 = null; + String str2 = null; - try { - conn = ds.getConnection(); - stmt = conn.createStatement(); - rs = stmt.executeQuery("SELECT * FROM CONNSHARING WHERE c_id=100"); - if ( rs.next() ) { + + try { + conn = ds.getConnection(); + stmt = conn.createStatement(); + rs = stmt.executeQuery("SELECT * FROM CONNSHARING WHERE c_id=100"); + if ( rs.next() ) { str1 = rs.getString(2); System.out.println(" str1 => " + str1 ); - } + } - rs1 = stmt.executeQuery("SELECT * FROM CONNSHARING WHERE c_id=200"); - if ( rs1.next() ) { - str2 = rs1.getString(2); + rs1 = stmt.executeQuery("SELECT * FROM CONNSHARING WHERE c_id=200"); + if ( rs1.next() ) { + str2 = rs1.getString(2); System.out.println(" str2 => " + str2 ); - } - if( "ADITYA".equals(str1.trim()) && - "ADITYA_BEAN_2_2".equals(str2.trim())) { + } + if( "ADITYA".equals(str1.trim()) && + "ADITYA_BEAN_2_2".equals(str2.trim())) { return true; - } + } - return false; - } catch( SQLException e ) { - e.printStackTrace(); - return false; - } finally { - if( rs != null ) { - try { rs.close() ; }catch( Exception e ) {} - } + return false; + } catch( SQLException e ) { + e.printStackTrace(); + return false; + } finally { + if( rs != null ) { + try { rs.close() ; }catch( Exception e ) {} + } if( rs1 != null) { - try { rs1.close(); } catch(Exception e) { } - } + try { rs1.close(); } catch(Exception e) { } + } - if( stmt != null) { - try { stmt.close(); } catch(Exception e) { } - } + if( stmt != null) { + try { stmt.close(); } catch(Exception e) { } + } - - //cleanup table - try { - stmt = conn.createStatement(); - stmt.executeUpdate( "DELETE FROM CONNSHARING WHERE c_id=100" ); - stmt.close(); - } catch( Exception e ) { - e.printStackTrace(); - } - try { - stmt = conn.createStatement(); - stmt.executeUpdate( "DELETE FROM CONNSHARING WHERE c_id=200" ); - stmt.close(); - } catch( Exception e ) { - e.printStackTrace(); - } + //cleanup table + try { + stmt = conn.createStatement(); + stmt.executeUpdate( "DELETE FROM CONNSHARING WHERE c_id=100" ); + stmt.close(); + } catch( Exception e ) { + e.printStackTrace(); + } - if( conn != null ) { try { conn.close(); } catch(Exception e) { } - } - } - + try { + stmt = conn.createStatement(); + stmt.executeUpdate( "DELETE FROM CONNSHARING WHERE c_id=200" ); + stmt.close(); + } catch( Exception e ) { + e.printStackTrace(); + } + + if( conn != null ) { try { conn.close(); } catch(Exception e) { } + } + } + } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/sql/create_pointbase.sql index 5a333fd..cd5ff58 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/sql/create_pointbase.sql
@@ -1,6 +1,6 @@ -Drop table CONNSHARING; - -CREATE TABLE CONNSHARING ( - c_id integer constraint pk_key primary key, - c_phone char(16) -); +Drop table CONNSHARING; + +CREATE TABLE CONNSHARING ( + c_id integer constraint pk_key primary key, + c_phone char(16) +);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/sql/drop_pointbase.sql index c2817f6..77d1d5a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/connsharing/xa/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table CONNSHARING; +Drop table CONNSHARING;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/contauth/build.properties index f417fb4..97a6230 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-contauth"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/contauth/build.xml index f7ef969..5090459 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth/build.xml
@@ -37,7 +37,7 @@ <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"/> @@ -49,13 +49,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -63,14 +63,14 @@ <antcall target="deploy-jdbc-common"/> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -78,7 +78,7 @@ <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/contauth/client/SimpleBMPClient.java index 4b74b6f..1894299 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth/client/SimpleBMPClient.java
@@ -29,34 +29,34 @@ SimpleReporterAdapter stat = new SimpleReporterAdapter(); public static void main(String[] args) throws Exception { - - SimpleBMPClient client = new SimpleBMPClient(); + + SimpleBMPClient client = new SimpleBMPClient(); client.runTest(); } public void runTest() throws Exception { - String testSuite = "ContAuth "; + String testSuite = "ContAuth "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); stat.addDescription("JDBC Container Authentication test"); if ( simpleBMP.test1() ) { - stat.addStatus(testSuite+"test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test1 : ", stat.FAIL); - } - if ( simpleBMP.test2() ) { - stat.addStatus(testSuite+"test2 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test2 : ", stat.FAIL); - } + stat.addStatus(testSuite+"test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test1 : ", stat.FAIL); + } + if ( simpleBMP.test2() ) { + stat.addStatus(testSuite+"test2 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test2 : ", stat.FAIL); + } - System.out.println("jdbc contauth status: "); - stat.printSummary(); + System.out.println("jdbc contauth status: "); + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/contauth/descriptor/ejb-jar.xml index c6c2569..05a7bec 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth/descriptor/ejb-jar.xml
@@ -57,6 +57,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/contauth/ejb/SimpleBMPBean.java index 5ceec41..52d9900 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth/ejb/SimpleBMPBean.java
@@ -30,58 +30,58 @@ protected DataSource ds; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } System.out.println("[**SimpleBMPBean**] Done with setEntityContext...."); } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } public boolean test1() { //container auth + user/pwd specified - should pass - Connection conn = null; - boolean passed = true; - try { - conn = ds.getConnection("DBUSER", "DBPASSWORD" ); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - - return passed; + Connection conn = null; + boolean passed = true; + try { + conn = ds.getConnection("DBUSER", "DBPASSWORD" ); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } } - + + + return passed; + } + public boolean test2() { //container auth + user/pwd NOT specified - should pass - Connection conn = null; - boolean passed = true; - try { - conn = ds.getConnection(); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + Connection conn = null; + boolean passed = true; + try { + conn = ds.getConnection(); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - - return passed; + + return passed; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/contauth/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/contauth/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/build.properties index 43227cc..9a684d8 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-contauth1"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/build.xml index 42af9e7..7e817b4 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/build.xml
@@ -46,7 +46,7 @@ <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"/> @@ -58,13 +58,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -81,7 +81,7 @@ <antcall target="runclient-common"/> <antcall target="reset-derby-for-no-authentication"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -89,7 +89,7 @@ <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/client/SimpleBMPClient.java index 9ea74cb..8960bdc 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/client/SimpleBMPClient.java
@@ -28,32 +28,32 @@ public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "ContAuth1 "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "ContAuth1 "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); - - System.out.println(" Test 2 will fail with Derby"); - stat.addDescription("JDBC Container Authentication 1 tests "); - SimpleBMP simpleBMP = simpleBMPHome.create(); - - if ( simpleBMP.test1() ) { - stat.addStatus(testSuite+"test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test1 : ", stat.FAIL); - } - if ( simpleBMP.test2() ) { - stat.addStatus(testSuite+"test2 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test2 : ", stat.FAIL); - } - System.out.println("jdbc contauth1 status: "); - stat.printSummary(); - + System.out.println(" Test 2 will fail with Derby"); + stat.addDescription("JDBC Container Authentication 1 tests "); + SimpleBMP simpleBMP = simpleBMPHome.create(); + + if ( simpleBMP.test1() ) { + stat.addStatus(testSuite+"test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test1 : ", stat.FAIL); + } + if ( simpleBMP.test2() ) { + stat.addStatus(testSuite+"test2 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test2 : ", stat.FAIL); + } + + System.out.println("jdbc contauth1 status: "); + stat.printSummary(); + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/descriptor/ejb-jar.xml index 99856f6..d851c4b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/descriptor/ejb-jar.xml
@@ -57,6 +57,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/ejb/SimpleBMPBean.java index 004b8d3..6dd7058 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/ejb/SimpleBMPBean.java
@@ -31,13 +31,13 @@ int id; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } } public Integer ejbCreate() throws CreateException { @@ -46,42 +46,42 @@ public boolean test1() { //container auth + user/pwd specified - should pass - boolean passed = true; - Connection conn = null; - try { - conn = ds.getConnection("DBUSER", "DBPASSWORD" ); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - - return passed; + boolean passed = true; + Connection conn = null; + try { + conn = ds.getConnection("DBUSER", "DBPASSWORD" ); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } } - + + + return passed; + } + public boolean test2() { //container auth + wrong user/passwd in resourceref - should fail - Connection conn = null; - boolean passed = false; - try { - conn = ds.getConnection(); - } catch (Exception e) { - passed = true; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + Connection conn = null; + boolean passed = false; + try { + conn = ds.getConnection(); + } catch (Exception e) { + passed = true; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - return passed; + return passed; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/build.properties index dc16894..e32b4c9 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-contauth1tx"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="jdbc.resource.type" value="javax.sql.XADataSource"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/build.xml index daebb85..2c09d3b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/build.xml
@@ -46,7 +46,7 @@ <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"/> @@ -58,12 +58,12 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> + </target> <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> @@ -77,9 +77,9 @@ <param name="jdbc.conpool.name" value="jdbc-appauth-pool1"/> <param name="jdbc.resource.name" value="jdbc/s1qeappauth1"/> </antcall> - + <antcall target="deploy-common"/> - </target> + </target> <target name="run" depends="init-common"> <antcall target="setup-derby-for-authentication"/> @@ -89,7 +89,7 @@ <antcall target="runclient-common"/> <antcall target="reset-derby-for-no-authentication"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="undeploy-common"/> @@ -104,7 +104,7 @@ <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/client/SimpleBMPClient.java index e7fd30f..8798706 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/client/SimpleBMPClient.java
@@ -29,29 +29,29 @@ public static void main(String[] args) throws Exception { - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "ContAuth1TX "; + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "ContAuth1TX "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - stat.addDescription("JDBC ContAuth1TX tests"); + stat.addDescription("JDBC ContAuth1TX tests"); System.out.println(" All tests shall fail till a stable XA driver is integrated into Derby"); if ( simpleBMP.test1() ) { - stat.addStatus(testSuite+"test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test1 : ", stat.FAIL); - } - if ( simpleBMP.test2() ) { - stat.addStatus(testSuite+"test2 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test2 : ", stat.FAIL); - } + stat.addStatus(testSuite+"test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test1 : ", stat.FAIL); + } + if ( simpleBMP.test2() ) { + stat.addStatus(testSuite+"test2 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test2 : ", stat.FAIL); + } - System.out.println("jdbc contauth1tx status: "); - stat.printSummary(); + System.out.println("jdbc contauth1tx status: "); + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/descriptor/ejb-jar.xml index d920989..0bbf856 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/descriptor/ejb-jar.xml
@@ -57,6 +57,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/ejb/SimpleBMPBean.java index 6fc6da8..2562bc8 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/ejb/SimpleBMPBean.java
@@ -31,13 +31,13 @@ int id; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSourcetx"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSourcetx"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } System.out.println("[**SimpleBMPBean**] Done with setEntityContext...."); } @@ -47,42 +47,42 @@ public boolean test1() { //container auth + user/pwd specified - should pass - boolean passed = true; - Connection conn = null; - try { - conn = ds.getConnection("DBUSER", "DBPASSWORD" ); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - - return passed; + boolean passed = true; + Connection conn = null; + try { + conn = ds.getConnection("DBUSER", "DBPASSWORD" ); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } } - + + + return passed; + } + public boolean test2() { //container auth + wrong user/passwd in resourceref - should fail - Connection conn = null; - boolean passed = false; - try { - conn = ds.getConnection(); - } catch (Exception e) { - passed = true; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + Connection conn = null; + boolean passed = false; + try { + conn = ds.getConnection(); + } catch (Exception e) { + passed = true; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - return passed; + return passed; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauth1tx/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/build.properties index ead98ac..b0d3687 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-contauthtx"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="jdbc.resource.type" value="javax.sql.XADataSource"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/build.xml index e129c8e..79ba1f8 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/build.xml
@@ -34,7 +34,7 @@ <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"/> @@ -46,12 +46,12 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> + </target> <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> @@ -65,19 +65,19 @@ <param name="jdbc.conpool.name" value="jdbc-appauth-pool1"/> <param name="jdbc.resource.name" value="jdbc/s1qeappauth1"/> </antcall> - - <antcall target="deploy-common"/> - </target> - - + <antcall target="deploy-common"/> + </target> + + + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="undeploy-common"/> @@ -93,7 +93,7 @@ </antcall> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/client/SimpleBMPClient.java index 56b664a..1f8d58f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/client/SimpleBMPClient.java
@@ -31,34 +31,34 @@ public static void main(String[] args) throws Exception { - SimpleBMPClient client = new SimpleBMPClient(); - client.runTest(); + SimpleBMPClient client = new SimpleBMPClient(); + client.runTest(); } public void runTest() throws Exception { - - String testSuite = "ContAuthTX "; + + String testSuite = "ContAuthTX "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); System.out.println(" Will Fail till a better XA driver is integrated into Derby"); - stat.addDescription("JDBC Container Authentication TX test"); + stat.addDescription("JDBC Container Authentication TX test"); if ( simpleBMP.test1() ) { - stat.addStatus(testSuite+"test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test1 : ", stat.FAIL); - } - if ( simpleBMP.test2() ) { - stat.addStatus(testSuite+"test2 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test2 : ", stat.FAIL); - } + stat.addStatus(testSuite+"test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test1 : ", stat.FAIL); + } + if ( simpleBMP.test2() ) { + stat.addStatus(testSuite+"test2 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test2 : ", stat.FAIL); + } - System.out.println("jdbc contauthtx status: "); - stat.printSummary(); + System.out.println("jdbc contauthtx status: "); + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/descriptor/ejb-jar.xml index 3e58616..ff0c252 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/descriptor/ejb-jar.xml
@@ -57,6 +57,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/ejb/SimpleBMPBean.java index f12be1f..2f8c90e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/ejb/SimpleBMPBean.java
@@ -30,58 +30,58 @@ protected DataSource ds; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSourcetx"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSourcetx"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } System.out.println("[**SimpleBMPBean**] Done with setEntityContext...."); } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } public boolean test1() { //container auth + user/pwd specified - should pass - Connection conn = null; - boolean passed = true; - try { - conn = ds.getConnection("DBUSER", "DBPASSWORD" ); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - - return passed; + Connection conn = null; + boolean passed = true; + try { + conn = ds.getConnection("DBUSER", "DBPASSWORD" ); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } } - + + + return passed; + } + public boolean test2() { //container auth + user/pwd NOT specified - should pass - Connection conn = null; - boolean passed = true; - try { - conn = ds.getConnection(); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + Connection conn = null; + boolean passed = true; + try { + conn = ds.getConnection(); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - - return passed; + + return passed; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/contauthtx/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/conval/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/conval/build.properties index 7313ca0..fc835fc 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/conval/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/conval/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-conval"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="classes12.zip" value="/tmp/classes12.zip"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/conval/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/conval/build.xml index 9e8116d..7678f77 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/conval/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/conval/build.xml
@@ -80,8 +80,8 @@ <param name="appclient.application.args" value="1"/> </antcall> - <antcall target="stop-derby"/> - <antcall target="start-derby"/> + <antcall target="stop-derby"/> + <antcall target="start-derby"/> <antcall target="runclient-common"> <param name="appclient.application.args" value="2"/> @@ -111,8 +111,8 @@ <param name="appclient.application.args" value="3"/> </antcall> - <antcall target="stop-derby"/> - <antcall target="start-derby"/> + <antcall target="stop-derby"/> + <antcall target="start-derby"/> <antcall target="runclient-common"> <param name="appclient.application.args" value="4"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/conval/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/conval/client/Client.java index 616b865..7786153 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/conval/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/conval/client/Client.java
@@ -38,7 +38,7 @@ javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP convalBMP = convalBMPHome.create(); - stat.addDescription("Connection Validation Tests"); + stat.addDescription("Connection Validation Tests"); if (args != null && args.length > 0) { String param = args[0];
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/conval/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/conval/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/conval/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/conval/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/conval/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/conval/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/conval/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/conval/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpds/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/cpds/build.properties index 781a7a7..292926c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpds/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpds/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-cpds"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpds/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/cpds/build.xml index 3934b3e..182fd2c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpds/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpds/build.xml
@@ -61,7 +61,7 @@ <target name="deploy" depends="init-common"> - <antcall target="deploy-jdbc-common"> + <antcall target="deploy-jdbc-common"> <param name="jdbc.resource.type" value="javax.sql.ConnectionPoolDataSource"/> <param name="jdbc.resource.name" value="jdbc/s1qeDB-cpds"/> <param name="jdbc.conpool.name" value="jdbc-cpds"/> @@ -70,7 +70,7 @@ <antcall target="setup-derby-for-authentication"/> - <antcall target="execute-sql-common"> + <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpds/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/cpds/client/SimpleBMPClient.java index c7ccacf..581097e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpds/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpds/client/SimpleBMPClient.java
@@ -28,41 +28,41 @@ public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "ConnectionPoolDataSource "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "ConnectionPoolDataSource "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - stat.addDescription("Connection Pool DataSource tests"); - - if ( simpleBMP.test1() ) { - stat.addStatus(testSuite + " test1 : ", stat.PASS ); - } else { - stat.addStatus(testSuite + " test1 : ", stat.FAIL ); - } + stat.addDescription("Connection Pool DataSource tests"); - if ( simpleBMP.test2() ) { - stat.addStatus(testSuite + " test2 : ", stat.PASS ); - } else { - stat.addStatus(testSuite + " test2 : ", stat.FAIL ); - } + if ( simpleBMP.test1() ) { + stat.addStatus(testSuite + " test1 : ", stat.PASS ); + } else { + stat.addStatus(testSuite + " test1 : ", stat.FAIL ); + } - if ( simpleBMP.test3() ) { - stat.addStatus(testSuite + " test3 : ", stat.PASS ); - } else { - stat.addStatus(testSuite + " test3 : ", stat.FAIL ); - } - if ( simpleBMP.test4() ) { - stat.addStatus(testSuite + " test4 : ", stat.PASS ); - } else { - stat.addStatus(testSuite + " test4 : ", stat.FAIL ); - } - - stat.printSummary(); + if ( simpleBMP.test2() ) { + stat.addStatus(testSuite + " test2 : ", stat.PASS ); + } else { + stat.addStatus(testSuite + " test2 : ", stat.FAIL ); + } + + if ( simpleBMP.test3() ) { + stat.addStatus(testSuite + " test3 : ", stat.PASS ); + } else { + stat.addStatus(testSuite + " test3 : ", stat.FAIL ); + } + if ( simpleBMP.test4() ) { + stat.addStatus(testSuite + " test4 : ", stat.PASS ); + } else { + stat.addStatus(testSuite + " test4 : ", stat.FAIL ); + } + + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpds/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/cpds/descriptor/ejb-jar.xml index 54cf72e..1cc03c3 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpds/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpds/descriptor/ejb-jar.xml
@@ -42,7 +42,7 @@ <resource-ref> <res-ref-name>DataSource</res-ref-name> <res-type>javax.sql.ConnectionPoolDataSource</res-type> - <res-auth>Container</res-auth> + <res-auth>Container</res-auth> <!-- <res-auth>Application</res-auth> --> <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> @@ -58,6 +58,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpds/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/cpds/ejb/SimpleBMPBean.java index 99e1269..0c3247a 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpds/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpds/ejb/SimpleBMPBean.java
@@ -84,7 +84,7 @@ } public boolean test3() { - //application auth + wrong user/pwd + //application auth + wrong user/pwd System.out.println("-----------------Start test3--------------"); Connection conn = null; boolean passed = false;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpds/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/cpds/sql/create_pointbase.sql index e4914f6..f256076 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpds/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpds/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpds/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/cpds/sql/drop_pointbase.sql index 70d1fcc..d854b95 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpds/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpds/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/build.properties index 48043ef..b582e0c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-cpdsperf"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="200000"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/build.xml index 676fc7c..e229021 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/build.xml
@@ -42,7 +42,7 @@ <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"/> @@ -54,22 +54,22 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <!-- Create the ORACLE connection pool connection pool and datasource --> <antcall target="create-jdbc-connpool-common"> <param name="jdbc.resource.type" value="javax.sql.ConnectionPoolDataSource"/> <param name="jdbc.conpool.name" value="jdbc-cpdsperf-1"/> - <param name="db.class" value="oracle.jdbc.pool.OracleConnectionPoolDataSource"/> - <param name="db.user" value="system"/> - <param name="db.pwd" value="manager"/> - <param name="db.url" value="ORA"/> + <param name="db.class" value="oracle.jdbc.pool.OracleConnectionPoolDataSource"/> + <param name="db.user" value="system"/> + <param name="db.pwd" value="manager"/> + <param name="db.url" value="ORA"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> @@ -79,7 +79,7 @@ <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-cpdsperf-1.property.URL=jdbc:oracle:thin:@129.158.229.239:1521:ORA"/> </antcall> - + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-cpdsperf-1.property.ServerName=129.158.229.239"/> @@ -90,10 +90,10 @@ <antcall target="create-jdbc-connpool-common"> <param name="jdbc.resource.type" value="javax.sql.DataSource"/> <param name="jdbc.conpool.name" value="jdbc-cpdsperf-2"/> - <param name="db.class" value="oracle.jdbc.pool.OracleDataSource"/> - <param name="db.user" value="system"/> - <param name="db.pwd" value="manager"/> - <param name="db.url" value="ORA"/> + <param name="db.class" value="oracle.jdbc.pool.OracleDataSource"/> + <param name="db.user" value="system"/> + <param name="db.pwd" value="manager"/> + <param name="db.url" value="ORA"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> @@ -103,7 +103,7 @@ <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-cpdsperf-2.property.URL=jdbc:oracle:thin:@129.158.229.239:1521:ORA"/> </antcall> - + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-cpdsperf-2.property.ServerName=129.158.229.239"/> @@ -120,23 +120,23 @@ </antcall> - + <antcall target="deploy-common"/> <echo message="Executing sql from ${sql.file}"/> <sql src="sql/create_pointbase.sql" - driver="oracle.jdbc.driver.OracleDriver" - userid="system" - password="manager" - url="jdbc:oracle:thin:@129.158.229.239:1521:ORA" - classpath="${env.APS_HOME}/devtests/jdbc/classes12.zip" - onerror="continue" - print="yes" + driver="oracle.jdbc.driver.OracleDriver" + userid="system" + password="manager" + url="jdbc:oracle:thin:@129.158.229.239:1521:ORA" + classpath="${env.APS_HOME}/devtests/jdbc/classes12.zip" + onerror="continue" + print="yes" /> - + <antcall target="reconfig-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="runclient-common"/> </target> @@ -145,31 +145,31 @@ <echo message="Executing sql from ${sql.file}"/> <sql src="sql/drop_pointbase.sql" - driver="oracle.jdbc.driver.OracleDriver" - userid="system" - password="manager" - url="jdbc:oracle:thin:@129.158.229.239:1521:ORA" - classpath="${env.APS_HOME}/devtests/jdbc/classes12.zip" - onerror="continue" - print="yes" + driver="oracle.jdbc.driver.OracleDriver" + userid="system" + password="manager" + url="jdbc:oracle:thin:@129.158.229.239:1521:ORA" + classpath="${env.APS_HOME}/devtests/jdbc/classes12.zip" + onerror="continue" + print="yes" /> - <antcall target="undeploy-common"/> + <antcall target="undeploy-common"/> - <antcall target="delete-jdbc-resource-common"> + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/s1qeDB-cpdsperf-1"/> </antcall> - <antcall target="delete-jdbc-resource-common"> + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/s1qeDB-cpdsperf-2"/> </antcall> - <antcall target="delete-jdbc-connpool-common"> + <antcall target="delete-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-cpdsperf-1"/> </antcall> - <antcall target="delete-jdbc-connpool-common"> + <antcall target="delete-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-cpdsperf-2"/> </antcall> <antcall target="reconfig-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/client/SimpleBMPClient.java index bafea23..8ac9fc0 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/client/SimpleBMPClient.java
@@ -24,41 +24,41 @@ import com.sun.s1asdev.jdbc.cpdsperf.ejb.SimpleBMP; public class SimpleBMPClient { - + public static void main(String[] args) throws Exception { - int numTimes = 100; - if (args.length == 1) { + int numTimes = 100; + if (args.length == 1) { numTimes = Integer.parseInt( args[0] ); - } - + } + InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create( numTimes ); - - long timeTaken = 0; - System.out.println("----------------------------"); - System.out.println(" test1: Using ConnectionPoolDataSource"); - if ( (timeTaken = simpleBMP.test1()) != -1 ) { - System.out.println("Passed: Num Connections: " + numTimes+ - " Time taken :" + timeTaken); - } else { - System.out.println("Failed"); - } - System.out.println("----------------------------"); - System.out.println(); - System.out.println("----------------------------"); - System.out.println(" test2: Using DataSource"); - if ( (timeTaken = simpleBMP.test2()) != -1 ) { - System.out.println("Passed: Num Connections: " + numTimes+ - " Time taken :" + timeTaken); - } else { - System.out.println("Failed"); - } - System.out.println("----------------------------"); - } + long timeTaken = 0; + System.out.println("----------------------------"); + System.out.println(" test1: Using ConnectionPoolDataSource"); + if ( (timeTaken = simpleBMP.test1()) != -1 ) { + System.out.println("Passed: Num Connections: " + numTimes+ + " Time taken :" + timeTaken); + } else { + System.out.println("Failed"); + } + System.out.println("----------------------------"); + System.out.println(); + System.out.println("----------------------------"); + System.out.println(" test2: Using DataSource"); + if ( (timeTaken = simpleBMP.test2()) != -1 ) { + System.out.println("Passed: Num Connections: " + numTimes+ + " Time taken :" + timeTaken); + } else { + System.out.println("Failed"); + } + + System.out.println("----------------------------"); + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/descriptor/ejb-jar.xml index 4d594e1..da17f21 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/descriptor/ejb-jar.xml
@@ -63,6 +63,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/ejb/SimpleBMPBean.java index a08964d..e4c0b8b 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/ejb/SimpleBMPBean.java
@@ -32,154 +32,154 @@ protected int numRuns; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - dsCP = (DataSource) context.lookup("java:comp/env/DataSource-cp"); - dsNormal = (DataSource) context.lookup("java:comp/env/DataSource-normal"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + dsCP = (DataSource) context.lookup("java:comp/env/DataSource-cp"); + dsNormal = (DataSource) context.lookup("java:comp/env/DataSource-normal"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } System.out.println("[**SimpleBMPBean**] Done with setEntityContext...."); } public Integer ejbCreate(int _numRuns) throws CreateException { numRuns = _numRuns; - return new Integer(1); + return new Integer(1); } - + /** * Do an SQL insert into the database and time this * @return time taken. -1 If test fails */ public long test1() { //ConnectionPoolDataSource - System.out.println("-----------------Start test1--------------"); - Connection conn = null; - boolean passed = true; - long startTime = 0 ; - long endTime = 0; - try { - startTime = System.currentTimeMillis(); - for ( int i = 0; i < numRuns; i++ ) { - conn = dsCP.getConnection("system", "manager"); - insertEntry( i, "1234567890", conn); - if (i / 10 == 0 ) { - queryTable( conn ); - } - conn.close(); - } - endTime = System.currentTimeMillis(); - } catch (Exception e) { - e.printStackTrace(); - passed = false; - } finally { - if ( conn != null ) { - try { conn.close(); } catch( Exception e1) {} - } - } - System.out.println("-----------------End test1--------------"); - - try { - emptyTable( conn ); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (conn != null) { - try { conn.close(); } catch( Exception e1 ) {} - } - } - if (passed) { - return (endTime - startTime)/1000; - } - return -1; + System.out.println("-----------------Start test1--------------"); + Connection conn = null; + boolean passed = true; + long startTime = 0 ; + long endTime = 0; + try { + startTime = System.currentTimeMillis(); + for ( int i = 0; i < numRuns; i++ ) { + conn = dsCP.getConnection("system", "manager"); + insertEntry( i, "1234567890", conn); + if (i / 10 == 0 ) { + queryTable( conn ); + } + conn.close(); + } + endTime = System.currentTimeMillis(); + } catch (Exception e) { + e.printStackTrace(); + passed = false; + } finally { + if ( conn != null ) { + try { conn.close(); } catch( Exception e1) {} + } } - + System.out.println("-----------------End test1--------------"); + + try { + emptyTable( conn ); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (conn != null) { + try { conn.close(); } catch( Exception e1 ) {} + } + } + if (passed) { + return (endTime - startTime)/1000; + } + return -1; + } + public long test2() { //Normal DataSource - System.out.println("-----------------Start test2--------------"); - Connection conn = null; - boolean passed = true; - long startTime = 0 ; - long endTime = 0; - try { - startTime = System.currentTimeMillis(); - for ( int i = 0; i < numRuns; i++ ) { - conn = dsNormal.getConnection("system", "manager"); - insertEntry( i, "1234567890", conn); - if (i / 10 == 0 ) { - queryTable( conn ); - } - conn.close(); - } - endTime = System.currentTimeMillis(); - } catch (Exception e) { - e.printStackTrace(); - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - System.out.println("-----------------End test2--------------"); - - try { - conn = dsNormal.getConnection("system","manager"); - emptyTable(conn); - conn.close(); - } catch( Exception e) { - e.printStackTrace(); - } finally { - if (conn != null) { - try { conn.close(); } catch( Exception e1) {} - } - } + System.out.println("-----------------Start test2--------------"); + Connection conn = null; + boolean passed = true; + long startTime = 0 ; + long endTime = 0; + try { + startTime = System.currentTimeMillis(); + for ( int i = 0; i < numRuns; i++ ) { + conn = dsNormal.getConnection("system", "manager"); + insertEntry( i, "1234567890", conn); + if (i / 10 == 0 ) { + queryTable( conn ); + } + conn.close(); + } + endTime = System.currentTimeMillis(); + } catch (Exception e) { + e.printStackTrace(); + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } + System.out.println("-----------------End test2--------------"); + + try { + conn = dsNormal.getConnection("system","manager"); + emptyTable(conn); + conn.close(); + } catch( Exception e) { + e.printStackTrace(); + } finally { + if (conn != null) { + try { conn.close(); } catch( Exception e1) {} + } + } if (passed) { - return (endTime - startTime)/1000; - } - return -1; + return (endTime - startTime)/1000; + } + return -1; } private void insertEntry( int id, String phone, Connection con ) throws SQLException { - - PreparedStatement stmt = con.prepareStatement( - "insert into O_Customer values (?, ?)" ); - stmt.setInt(1, id); - stmt.setString(2, phone); - - stmt.executeUpdate(); - stmt.close(); - /* PreparedStatement stmt = con.prepareStatement( - "select * from O_Customer" ); - stmt.executeUpdate(); - stmt.close(); - */ + "insert into O_Customer values (?, ?)" ); + + stmt.setInt(1, id); + stmt.setString(2, phone); + + stmt.executeUpdate(); + stmt.close(); + /* + PreparedStatement stmt = con.prepareStatement( + "select * from O_Customer" ); + stmt.executeUpdate(); + stmt.close(); + */ } private void emptyTable( Connection con ) { try { Statement stmt = con.createStatement(); - - stmt.execute("delete * from O_Customer"); - stmt.close(); + + stmt.execute("delete * from O_Customer"); + stmt.close(); } catch( Exception e) { - } - + } + } private void queryTable( Connection con ) { try { - Statement stmt = con.createStatement(); - ResultSet rs = stmt.executeQuery("select * from O_Customer"); - while( rs.next() ) ; - rs.close(); - } catch( Exception e) { - } + Statement stmt = con.createStatement(); + ResultSet rs = stmt.executeQuery("select * from O_Customer"); + while( rs.next() ) ; + rs.close(); + } catch( Exception e) { + } } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/sql/create_pointbase.sql index e4914f6..f256076 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/sql/drop_pointbase.sql index 70d1fcc..d854b95 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/cpdsperf/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/build.properties index 1a0af6f..252a395 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-customval-1"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="classes12.zip" value="/tmp/classes12.zip"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/build.xml index 92ed03d..34d09fd 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/build.xml
@@ -21,9 +21,9 @@ <!ENTITY commonSetup SYSTEM "./../../../config/properties.xml"> <!ENTITY commonBuild SYSTEM "./../../../config/common.xml"> <!ENTITY testproperties SYSTEM "./build.properties"> - <!ENTITY run SYSTEM "./../../../config/run.xml"> - <!ENTITY jdbcxml SYSTEM "./../JdbcCommon.xml"> - <!ENTITY jdbcProps SYSTEM "./../JdbcCommon.properties"> + <!ENTITY run SYSTEM "./../../../config/run.xml"> + <!ENTITY jdbcxml SYSTEM "./../JdbcCommon.xml"> + <!ENTITY jdbcProps SYSTEM "./../JdbcCommon.properties"> ]> <project name="mix" default="usage" basedir="."> @@ -61,8 +61,8 @@ <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class"/> </antcall> - <jar jarfile="${custom-validator-jar}" update="true"> - <fileset dir="${build.classes.dir}" casesensitive="yes"> + <jar jarfile="${custom-validator-jar}" update="true"> + <fileset dir="${build.classes.dir}" casesensitive="yes"> <include name="**/MyValidator.class"/> </fileset> </jar> @@ -85,8 +85,8 @@ <param name="appclient.application.args" value="1"/> </antcall> - <antcall target="stop-derby"/> - <antcall target="start-derby"/> + <antcall target="stop-derby"/> + <antcall target="start-derby"/> <antcall target="runclient-common"> <param name="appclient.application.args" value="2"/> @@ -103,7 +103,7 @@ <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.${poolname}.validation_classname=com.sun.s1asdev.jdbc.customval.validator.MyValidator"/> + value="${resources.dottedname.prefix}.jdbc-connection-pool.${poolname}.validation_classname=com.sun.s1asdev.jdbc.customval.validator.MyValidator"/> </antcall> <antcall target="asadmin-common"> @@ -116,8 +116,8 @@ <param name="appclient.application.args" value="3"/> </antcall> - <antcall target="stop-derby"/> - <antcall target="start-derby"/> + <antcall target="stop-derby"/> + <antcall target="start-derby"/> <antcall target="runclient-common"> <param name="appclient.application.args" value="4"/> @@ -131,9 +131,9 @@ <target name="undeploy" depends="init-common"> <antcall target="delete-jdbc-stuff"/> <antcall target="undeploy-common"/> - <delete file="${env.S1AS_HOME}/lib/myvalidator.jar"/> - <delete file="${custom-validator-jar}"/> - <antcall target="restart-server"/> + <delete file="${env.S1AS_HOME}/lib/myvalidator.jar"/> + <delete file="${custom-validator-jar}"/> + <antcall target="restart-server"/> </target> <target name="usage">
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/client/Client.java index 34090d7..d820d45 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/client/Client.java
@@ -38,7 +38,7 @@ javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP convalBMP = convalBMPHome.create(); - stat.addDescription("Custom Validation Test using a custom validator "); + stat.addDescription("Custom Validation Test using a custom validator "); if (args != null && args.length > 0) { String param = args[0];
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/sql/create_pointbase.sql index 32dca8a..7aa4b60 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/sql/create_pointbase.sql
@@ -1,15 +1,15 @@ -Drop table O_CUSTOMER; - -CREATE TABLE O_CUSTOMER ( - c_id integer not null, - c_phone char(16) -); - -Drop table DUMMY; - -CREATE TABLE DUMMY ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO DUMMY VALUES(1, 'wxyz'); +Drop table O_CUSTOMER; + +CREATE TABLE O_CUSTOMER ( + c_id integer not null, + c_phone char(16) +); + +Drop table DUMMY; + +CREATE TABLE DUMMY ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO DUMMY VALUES(1, 'wxyz');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/validator/com/sun/s1asdev/jdbc/customval/validator/MyValidator.java b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/validator/com/sun/s1asdev/jdbc/customval/validator/MyValidator.java index 7f15c1c..64efa23 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/validator/com/sun/s1asdev/jdbc/customval/validator/MyValidator.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation-1/validator/com/sun/s1asdev/jdbc/customval/validator/MyValidator.java
@@ -22,13 +22,13 @@ public class MyValidator implements ConnectionValidation { public boolean isConnectionValid(Connection con) { - boolean valid = false; - try { + boolean valid = false; + try { valid = isValid(con, "select count(*) as COUNT from DUMMY"); - } catch(Exception ex) { + } catch(Exception ex) { ex.printStackTrace(); - } - return valid; + } + return valid; } /** @@ -40,32 +40,32 @@ * @throws ResourceException if the connection is not valid */ protected boolean isValid(java.sql.Connection con, - String query) throws Exception{ - int count = 1; - boolean valid = false; + String query) throws Exception{ + int count = 1; + boolean valid = false; if (con == null) { - throw new Exception("The connection is not valid as " - + "the connection is null"); - } + throw new Exception("The connection is not valid as " + + "the connection is null"); + } java.sql.PreparedStatement stmt = null; java.sql.ResultSet rs = null; try { - stmt = con.prepareStatement(query); - rs = stmt.executeQuery(); + stmt = con.prepareStatement(query); + rs = stmt.executeQuery(); while(rs.next()) { - int resultCount = rs.getInt("COUNT"); - if(count == resultCount) { - valid = true; + int resultCount = rs.getInt("COUNT"); + if(count == resultCount) { + valid = true; } else { System.out.println("Expected count [" + count + "] does not match result[" + resultCount + "]"); - valid = false; + valid = false; } } - } catch (Exception sqle) { - throw new Exception(sqle); + } catch (Exception sqle) { + throw new Exception(sqle); } finally { try { if (rs != null) { @@ -79,6 +79,6 @@ } } catch (Exception e2) {} } - return valid; + return valid; } -} +}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/build.properties index 142ceef..0599ebf 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-customval"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="classes12.zip" value="/tmp/classes12.zip"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/build.xml index b439690..dbb992f 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/build.xml
@@ -22,8 +22,8 @@ <!ENTITY commonBuild SYSTEM "./../../../config/common.xml"> <!ENTITY testproperties SYSTEM "./build.properties"> <!ENTITY run SYSTEM "./../../../config/run.xml"> - <!ENTITY jdbcxml SYSTEM "./../JdbcCommon.xml"> - <!ENTITY jdbcProps SYSTEM "./../JdbcCommon.properties"> + <!ENTITY jdbcxml SYSTEM "./../JdbcCommon.xml"> + <!ENTITY jdbcProps SYSTEM "./../JdbcCommon.properties"> ]> <project name="mix" default="usage" basedir="."> @@ -74,8 +74,8 @@ <param name="appclient.application.args" value="1"/> </antcall> - <antcall target="stop-derby"/> - <antcall target="start-derby"/> + <antcall target="stop-derby"/> + <antcall target="start-derby"/> <antcall target="runclient-common"> <param name="appclient.application.args" value="2"/> @@ -105,8 +105,8 @@ <param name="appclient.application.args" value="3"/> </antcall> - <antcall target="stop-derby"/> - <antcall target="start-derby"/> + <antcall target="stop-derby"/> + <antcall target="start-derby"/> <antcall target="runclient-common"> <param name="appclient.application.args" value="4"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/client/Client.java index 29ce4bf..90873f5 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/client/Client.java
@@ -38,7 +38,7 @@ javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP convalBMP = convalBMPHome.create(); - stat.addDescription("Custom Validation Tests"); + stat.addDescription("Custom Validation Tests"); if (args != null && args.length > 0) { String param = args[0];
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/custom-validation/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/datasource40/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/datasource40/build.properties index 76ef749..3779711 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/datasource40/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/datasource40/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-datasource40"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/datasource40/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/datasource40/build.xml index df64822..f5e4c92 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/datasource40/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/datasource40/build.xml
@@ -62,7 +62,7 @@ <antcall target="deploy-jdbc-common"> <param name="jdbc.conpool.name" value="ds-pool"/> <param name="jdbc.resource.name" value="jdbc/ds-resource"/> - <param name="db.class" value="org.apache.derby.jdbc.ClientDataSource40"/> + <param name="db.class" value="org.apache.derby.jdbc.ClientDataSource40"/> <param name="jdbc.resource.type" value="javax.sql.DataSource"/> </antcall> @@ -120,7 +120,7 @@ <param name="jdbc.conpool.name" value="xa-pool"/> <param name="jdbc.resource.name" value="jdbc/xa-resource"/> </antcall> - + <antcall target="undeploy-common"/> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/datasource40/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/datasource40/ejb/SimpleBMPBean.java index c6dbe6d..083945d 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/datasource40/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/datasource40/ejb/SimpleBMPBean.java
@@ -108,16 +108,16 @@ String physicalConnection2 = (((com.sun.appserv.jdbc.DataSource) ds).getConnection(conn)).toString(); //Ensure that both the connections are the same. - System.out.println("PhysicalConn 1 : " + physicalConnection1); + System.out.println("PhysicalConn 1 : " + physicalConnection1); System.out.println("PhysicalConn 2 : " + physicalConnection1); if (physicalConnection2.equals(physicalConnection1)) { passed = true; - System.out.println("Physical Connections are equal"); + System.out.println("Physical Connections are equal"); }else{ - System.out.println("Physical Connections are not equal"); - } - + System.out.println("Physical Connections are not equal"); + } + } catch (Exception e) { e.printStackTrace(); @@ -178,7 +178,7 @@ System.out.println("DataSource unwrap() did not return appropriate db-datasources"); } - + } catch (Exception e) { e.printStackTrace(); passed = false;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/datasource40/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/datasource40/sql/create_pointbase.sql index d3f5a12..8b13789 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/datasource40/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/datasource40/sql/create_pointbase.sql
@@ -1 +1 @@ - +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/build.properties index af24daf..20bc85d 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-markconnectionasbad.xa"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/build.xml index 7d766f0..5e7771f 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/build.xml
@@ -107,7 +107,7 @@ <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-local-pool.idle_timeout_in_seconds=3600"/> </antcall> - <!--<antcall target="asadmin-common"> + <!--<antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-local-pool.property.URL=jdbc:derby://localhost:1527/testdb;user=dbuser;password=dbpassword"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/client/Client.java index ff0fb53..ccf34b6 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/client/Client.java
@@ -38,27 +38,27 @@ public void runTest() throws Exception { - Set<Integer> localdsSet = new HashSet(); - Set<Integer> localdsAfterSet = new HashSet(); - int countLocalds = 0; + Set<Integer> localdsSet = new HashSet(); + Set<Integer> localdsAfterSet = new HashSet(); + int countLocalds = 0; InitialContext ic = new InitialContext(); - com.sun.appserv.jdbc.DataSource ds = (com.sun.appserv.jdbc.DataSource) ic.lookup("jdbc/localdatasource"); - - stat.addDescription("DMMCF Mark-Connection-As-Bad Appclient "); + com.sun.appserv.jdbc.DataSource ds = (com.sun.appserv.jdbc.DataSource) ic.lookup("jdbc/localdatasource"); + + stat.addDescription("DMMCF Mark-Connection-As-Bad Appclient "); - localdsSet = getFromLocalDS(MAX_POOL_SIZE, ds); - System.out.println("localds = " + localdsSet); - - //jdbc-local-pool + localdsSet = getFromLocalDS(MAX_POOL_SIZE, ds); + System.out.println("localds = " + localdsSet); + + //jdbc-local-pool test1(ds); - localdsAfterSet = getFromLocalDS(MAX_POOL_SIZE, ds); - System.out.println("localdsAfter = " + localdsAfterSet); + localdsAfterSet = getFromLocalDS(MAX_POOL_SIZE, ds); + System.out.println("localdsAfter = " + localdsAfterSet); - countLocalds = compareAndGetCount(localdsSet, localdsAfterSet); - if(MAX_POOL_SIZE-countLocalds == 5) { + countLocalds = compareAndGetCount(localdsSet, localdsAfterSet); + if(MAX_POOL_SIZE-countLocalds == 5) { stat.addStatus(" Mark-Connection-As-Bad destroyedCount localds: ", stat.PASS); } else { stat.addStatus(" Mark-Connection-As-Bad destroyedCount localds: ", stat.FAIL); @@ -69,27 +69,27 @@ public int compareAndGetCount(Set<Integer> beforeSet, Set<Integer> afterSet) { //denotes the count of hashcodes that matched in both sets. - int contains = 0; - if(!beforeSet.containsAll(afterSet)) { + int contains = 0; + if(!beforeSet.containsAll(afterSet)) { //if it does not contain all the elements of the after set - //find how many are absent from the beforeSet + //find how many are absent from the beforeSet for(int afterInt : afterSet) { if(beforeSet.contains(afterInt)) { - contains++; - } - } - } + contains++; + } + } + } return contains; } public Set<Integer> getFromLocalDS(int count, com.sun.appserv.jdbc.DataSource localds1) { - int connHashCode = 0; + int connHashCode = 0; Connection conn = null; - Set<Integer> hashCodeSet = new HashSet(); + Set<Integer> hashCodeSet = new HashSet(); for (int i = 0; i < count; i++) { - try { - conn = localds1.getNonTxConnection(); - connHashCode = (localds1.getConnection(conn)).hashCode(); + try { + conn = localds1.getNonTxConnection(); + connHashCode = (localds1.getConnection(conn)).hashCode(); hashCodeSet.add(connHashCode); } catch (Exception e) { @@ -101,8 +101,8 @@ } } } - } - return hashCodeSet; + } + return hashCodeSet; } /* Read Operation - Driver - shareable */
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/sql/create_pointbase.sql index dcc321c..fa84161 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/sql/create_pointbase.sql
@@ -1,29 +1,29 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer (id integer , description char(50)); - -Drop table DESTROYED_INFO; - -CREATE TABLE DESTROYED_INFO (test_name varchar(20), pool_name varchar(30), num_des_count integer); - -insert into DESTROYED_INFO values ('test1', 'jdbc-unshareable-pool', 5); -insert into DESTROYED_INFO values ('test2', 'jdbc-unshareable-pool', 5); -insert into DESTROYED_INFO values ('test3', 'jdbc-shareable-pool', 5); -insert into DESTROYED_INFO values ('test4', 'jdbc-shareable-pool', 5); -insert into DESTROYED_INFO values ('test5', 'jdbc-unshareable-pool', 5); -insert into DESTROYED_INFO values ('test6', 'jdbc-unshareable-pool', 5); -insert into DESTROYED_INFO values ('test7', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test8', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test9', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test9', 'jdbc-local-pool', 1); -insert into DESTROYED_INFO values ('test10', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test10', 'jdbc-local-pool', 1); -insert into DESTROYED_INFO values ('test11', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test11', 'jdbc-local-pool', 1); -insert into DESTROYED_INFO values ('test12', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test12', 'jdbc-local-pool', 1); - -drop table owner; - -create table owner ( id integer, description char(50)); - +Drop table O_Customer; + +CREATE TABLE O_Customer (id integer , description char(50)); + +Drop table DESTROYED_INFO; + +CREATE TABLE DESTROYED_INFO (test_name varchar(20), pool_name varchar(30), num_des_count integer); + +insert into DESTROYED_INFO values ('test1', 'jdbc-unshareable-pool', 5); +insert into DESTROYED_INFO values ('test2', 'jdbc-unshareable-pool', 5); +insert into DESTROYED_INFO values ('test3', 'jdbc-shareable-pool', 5); +insert into DESTROYED_INFO values ('test4', 'jdbc-shareable-pool', 5); +insert into DESTROYED_INFO values ('test5', 'jdbc-unshareable-pool', 5); +insert into DESTROYED_INFO values ('test6', 'jdbc-unshareable-pool', 5); +insert into DESTROYED_INFO values ('test7', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test8', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test9', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test9', 'jdbc-local-pool', 1); +insert into DESTROYED_INFO values ('test10', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test10', 'jdbc-local-pool', 1); +insert into DESTROYED_INFO values ('test11', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test11', 'jdbc-local-pool', 1); +insert into DESTROYED_INFO values ('test12', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test12', 'jdbc-local-pool', 1); + +drop table owner; + +create table owner ( id integer, description char(50)); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/sql/drop_pointbase.sql index a5ea2f8..d87d5de 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.appclient/sql/drop_pointbase.sql
@@ -1,2 +1,2 @@ -Drop table O_Customer; -drop table owner; +Drop table O_Customer; +drop table owner;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/build.properties index af24daf..20bc85d 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-markconnectionasbad.xa"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/build.xml index 93e60c8..498ad55 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/build.xml
@@ -184,7 +184,7 @@ <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-local-pool.idle_timeout_in_seconds=3600"/> </antcall> - <!--<antcall target="asadmin-common"> + <!--<antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-local-pool.property.URL=jdbc:derby://localhost:1527/testdb;user=dbuser;password=dbpassword"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/client/Client.java index 28acbe9..7c8722d 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/client/Client.java
@@ -48,21 +48,21 @@ switch (Integer.parseInt(param)) { case 1: {//old method - client.runNonAMXTest(); - break; - } - case 2: { //using amx + client.runNonAMXTest(); + break; + } + case 2: { //using amx client.runTest(); - break; - } - } - } + break; + } + } + } } public void runNonAMXTest() throws Exception { - Set<Integer> localdsSet = new HashSet(); - Set<Integer> localdsAfterSet = new HashSet(); - int countLocalds = 0; + Set<Integer> localdsSet = new HashSet(); + Set<Integer> localdsAfterSet = new HashSet(); + int countLocalds = 0; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); @@ -73,17 +73,17 @@ stat.addDescription("DMMCF Mark-Connection-As-Bad NonAMX "); - localdsSet = simpleBMP.getFromLocalDS(MAX_POOL_SIZE); - System.out.println("localds = " + localdsSet); - - //jdbc-local-pool + localdsSet = simpleBMP.getFromLocalDS(MAX_POOL_SIZE); + System.out.println("localds = " + localdsSet); + + //jdbc-local-pool simpleBMP.test0(); - localdsAfterSet = simpleBMP.getFromLocalDS(MAX_POOL_SIZE); - System.out.println("localdsAfter = " + localdsAfterSet); + localdsAfterSet = simpleBMP.getFromLocalDS(MAX_POOL_SIZE); + System.out.println("localdsAfter = " + localdsAfterSet); - countLocalds = compareAndGetCount(localdsSet, localdsAfterSet); - if(MAX_POOL_SIZE-countLocalds == 5) { + countLocalds = compareAndGetCount(localdsSet, localdsAfterSet); + if(MAX_POOL_SIZE-countLocalds == 5) { stat.addStatus(" DMMCF Mark-Connection-As-Bad destroyedCount localds: ", stat.PASS); } else { stat.addStatus(" DMMCF Mark-Connection-As-Bad destroyedCount localds: ", stat.FAIL); @@ -165,14 +165,14 @@ stat.addStatus(" DMMCF Mark-Connection-As-Bad [Local-XA -Shareable-Shareable - Read-Write] : ", stat.FAIL); } - if (simpleBMP.test11() && getMonitorablePropertyOfConnectionPool("jdbc-shareable-pool") == 15 && + if (simpleBMP.test11() && getMonitorablePropertyOfConnectionPool("jdbc-shareable-pool") == 15 && getMonitorablePropertyOfConnectionPool("jdbc-local-pool") == 3) { stat.addStatus(" DMMCF Mark-Connection-As-Bad [Local-XA -Shareable-Shareable - Read-Read] : ", stat.PASS); } else { stat.addStatus(" DMMCF Mark-Connection-As-Bad [Local-XA -Shareable-Shareable - Read-Read] : ", stat.FAIL); } - if (simpleBMP.test12() && getMonitorablePropertyOfConnectionPool("jdbc-shareable-pool") == 16 && + if (simpleBMP.test12() && getMonitorablePropertyOfConnectionPool("jdbc-shareable-pool") == 16 && getMonitorablePropertyOfConnectionPool("jdbc-local-pool") == 4) { stat.addStatus(" DMMCF Mark-Connection-As-Bad [Local-XA -Shareable-Shareable - Write-Read] : ", stat.PASS); } else { @@ -186,33 +186,33 @@ public int compareAndGetCount(Set<Integer> beforeSet, Set<Integer> afterSet) { //denotes the count of hashcodes that matched in both sets. - int contains = 0; - if(!beforeSet.containsAll(afterSet)) { + int contains = 0; + if(!beforeSet.containsAll(afterSet)) { //if it does not contain all the elements of the after set - //find how many are absent from the beforeSet + //find how many are absent from the beforeSet for(int afterInt : afterSet) { if(beforeSet.contains(afterInt)) { - contains++; - } - } - } + contains++; + } + } + } return contains; } public int getMonitorablePropertyOfConnectionPool(String poolName) throws Exception { - final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; + final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; final JMXServiceURL url = new JMXServiceURL(urlStr); - final JMXConnector jmxConn = JMXConnectorFactory.connect(url); - final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); + final JMXConnector jmxConn = JMXConnectorFactory.connect(url); + final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); ObjectName objectName = new ObjectName("amx:pp=/mon/server-mon[server],type=jdbc-connection-pool-mon,name=resources/" + poolName); - javax.management.openmbean.CompositeDataSupport returnValue = - (javax.management.openmbean.CompositeDataSupport) - connection.getAttribute(objectName, NUM_CON_DESTROYED_COUNT); + javax.management.openmbean.CompositeDataSupport returnValue = + (javax.management.openmbean.CompositeDataSupport) + connection.getAttribute(objectName, NUM_CON_DESTROYED_COUNT); return new Integer(returnValue.get("count").toString()); }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/ejb/SimpleBMPBean.java index 0e6f501..6f0e8a8 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/ejb/SimpleBMPBean.java
@@ -51,13 +51,13 @@ public Set<Integer> getFromLocalDS(int count) { - int connHashCode = 0; + int connHashCode = 0; Connection conn = null; - Set<Integer> hashCodeSet = new HashSet(); + Set<Integer> hashCodeSet = new HashSet(); for (int i = 0; i < count; i++) { - try { - conn = localds.getNonTxConnection(); - connHashCode = (localds.getConnection(conn)).hashCode(); + try { + conn = localds.getNonTxConnection(); + connHashCode = (localds.getConnection(conn)).hashCode(); hashCodeSet.add(connHashCode); } catch (Exception e) { @@ -69,8 +69,8 @@ } } } - } - return hashCodeSet; + } + return hashCodeSet; } /* Read Operation - Driver - shareable */ @@ -332,7 +332,7 @@ stmt.executeUpdate("insert into owner values (9,'localds')"); conn1 = ds1.getConnection(); - System.out.println("Conn1 got " + conn1); + System.out.println("Conn1 got " + conn1); Statement stmt1 = conn1.createStatement(); stmt1.executeUpdate("insert into o_customer values (9,'xads')"); @@ -351,7 +351,7 @@ try { ds1.markConnectionAsBad(conn1); conn1.close(); - System.out.println("Conn1 closed "+ conn1); + System.out.println("Conn1 closed "+ conn1); } catch (Exception e1) { } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/sql/create_pointbase.sql index 0c1818a..7694f07 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/sql/create_pointbase.sql
@@ -1,29 +1,29 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer (id integer , description char(50)); - -Drop table DESTROYED_INFO; - -CREATE TABLE DESTROYED_INFO (test_name varchar(20), pool_name varchar(30), num_des_count integer); - -insert into DESTROYED_INFO values ('test0', 'jdbc-unshareable-pool', 5); -insert into DESTROYED_INFO values ('test2', 'jdbc-unshareable-pool', 5); -insert into DESTROYED_INFO values ('test3', 'jdbc-shareable-pool', 5); -insert into DESTROYED_INFO values ('test4', 'jdbc-shareable-pool', 5); -insert into DESTROYED_INFO values ('test5', 'jdbc-unshareable-pool', 5); -insert into DESTROYED_INFO values ('test6', 'jdbc-unshareable-pool', 5); -insert into DESTROYED_INFO values ('test7', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test8', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test9', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test9', 'jdbc-local-pool', 1); -insert into DESTROYED_INFO values ('test10', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test10', 'jdbc-local-pool', 1); -insert into DESTROYED_INFO values ('test11', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test11', 'jdbc-local-pool', 1); -insert into DESTROYED_INFO values ('test12', 'jdbc-shareable-pool', 1); -insert into DESTROYED_INFO values ('test12', 'jdbc-local-pool', 1); - -drop table owner; - -create table owner ( id integer, description char(50)); - +Drop table O_Customer; + +CREATE TABLE O_Customer (id integer , description char(50)); + +Drop table DESTROYED_INFO; + +CREATE TABLE DESTROYED_INFO (test_name varchar(20), pool_name varchar(30), num_des_count integer); + +insert into DESTROYED_INFO values ('test0', 'jdbc-unshareable-pool', 5); +insert into DESTROYED_INFO values ('test2', 'jdbc-unshareable-pool', 5); +insert into DESTROYED_INFO values ('test3', 'jdbc-shareable-pool', 5); +insert into DESTROYED_INFO values ('test4', 'jdbc-shareable-pool', 5); +insert into DESTROYED_INFO values ('test5', 'jdbc-unshareable-pool', 5); +insert into DESTROYED_INFO values ('test6', 'jdbc-unshareable-pool', 5); +insert into DESTROYED_INFO values ('test7', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test8', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test9', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test9', 'jdbc-local-pool', 1); +insert into DESTROYED_INFO values ('test10', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test10', 'jdbc-local-pool', 1); +insert into DESTROYED_INFO values ('test11', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test11', 'jdbc-local-pool', 1); +insert into DESTROYED_INFO values ('test12', 'jdbc-shareable-pool', 1); +insert into DESTROYED_INFO values ('test12', 'jdbc-local-pool', 1); + +drop table owner; + +create table owner ( id integer, description char(50)); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/sql/drop_pointbase.sql index a5ea2f8..d87d5de 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.markconnectionasbad.xa/sql/drop_pointbase.sql
@@ -1,2 +1,2 @@ -Drop table O_Customer; -drop table owner; +Drop table O_Customer; +drop table owner;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/build.xml index cef436d..c12fa40 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/build.xml
@@ -32,8 +32,8 @@ <fileset dir="." includes="*.output"/> </delete> <record name="notxconn.output" action="start" /> - <ant dir="test1" target="all"/> - <ant dir="test2" target="all"/> + <ant dir="test1" target="all"/> + <ant dir="test2" target="all"/> <record name="notxconn.output" action="stop" /> </target> @@ -49,9 +49,9 @@ </target> <target name="usage"> - <echo> - Usage: - ant all (Executes all the reconfig tests) - </echo> + <echo> + Usage: + ant all (Executes all the reconfig tests) + </echo> </target> </project>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/build.properties index cf4625c..dfd1ca3 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-dmmcfnotxconn"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="oracle.resource.type" value="java.sql.Driver"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/build.xml index 269c23b..18cee81 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/build.xml
@@ -32,14 +32,14 @@ &testproperties; &jdbcCommon; &jdbcCommonProps; - - + + <target name="all" depends="clean,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"/> @@ -51,28 +51,28 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="deploy-jdbc-driver-oracle-common"> - <param name="oracle.resource.type" value="${oracle.resource.type}"/> + <param name="oracle.resource.type" value="${oracle.resource.type}"/> </antcall> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -80,7 +80,7 @@ <antcall target="undeploy-jdbc-oracle-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/descriptor/ejb-jar.xml index cc9b0e8..a1aa729 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/descriptor/ejb-jar.xml
@@ -49,6 +49,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/descriptor/sun-ejb-jar.xml index afa0207..b0d631a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/descriptor/sun-ejb-jar.xml
@@ -28,10 +28,10 @@ <resource-ref> <res-ref-name>DataSource</res-ref-name> <jndi-name>jdbc/oracleres</jndi-name> - <default-resource-principal> - <name>scott</name> - <password>tiger</password> - </default-resource-principal> + <default-resource-principal> + <name>scott</name> + <password>tiger</password> + </default-resource-principal> </resource-ref> </ejb> </enterprise-beans>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/ejb/SimpleSessionBean.java index 619ff8c..767d521 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/ejb/SimpleSessionBean.java
@@ -56,27 +56,27 @@ ds = (com.sun.appserv.jdbc.DataSource) ic_.lookup("java:comp/env/DataSource"); UserTransaction tx =(UserTransaction)ctxt_.getUserTransaction(); - tx.begin(); + tx.begin(); conn = ds.getConnection(); - noTxConn = ds.getNonTxConnection(); + noTxConn = ds.getNonTxConnection(); stmt = conn.createStatement(); - stmt.executeUpdate("INSERT INTO NOTXCONNTABLE VALUES('method1',3)"); + stmt.executeUpdate("INSERT INTO NOTXCONNTABLE VALUES('method1',3)"); String query1 = "SELECT * FROM NOTXCONNTABLE"; rs = stmt.executeQuery(query1); - stmt2 = noTxConn.createStatement(); + stmt2 = noTxConn.createStatement(); rs2 = stmt2.executeQuery("SELECT * FROM NOTXCONNTABLE"); - + if ( rs2.next() ) { - return false; - } - - tx.commit(); - return true; - + return false; + } + + tx.commit(); + return true; + } catch (Exception e) { - System.out.println("Caught Exception---"); - e.printStackTrace(); - return false; + System.out.println("Caught Exception---"); + e.printStackTrace(); + return false; } finally { if (rs != null ) { try { rs.close(); } catch( Exception e1) {} @@ -87,72 +87,72 @@ if (conn != null ) { try {conn.close();} catch( Exception e1) {} } - + if (rs2 != null ) { try {rs2.close();} catch( Exception e1 ) {} } if (stmt2 != null ) { try {stmt2.close(); } catch( Exception e1) {} } - + if (noTxConn != null ) { try { noTxConn.close(); }catch( Exception e1) {} } - } + } - + } public boolean test2() throws Exception { - Connection conn = null; - Connection noTxConn = null; + Connection conn = null; + Connection noTxConn = null; try { ds = (com.sun.appserv.jdbc.DataSource)ic_.lookup("java:comp/env/DataSource"); UserTransaction tx =(UserTransaction)ctxt_.getUserTransaction(); - tx.begin(); + tx.begin(); System.out.println("Getting TRANSACTIONAL connection"); conn = ds.getConnection(); System.out.println("Autocommit => " + conn.getAutoCommit()); - if (conn.getAutoCommit() == true ) { - return false; - } + if (conn.getAutoCommit() == true ) { + return false; + } - conn.close(); - for (int i = 0; i < 20; i++ ) { - System.out.println("Getting NonTx connection"); - noTxConn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection(); - System.out.println("Autocommit => " + noTxConn.getAutoCommit()); - if (noTxConn.getAutoCommit() == false ) { - return false; - } - noTxConn.close(); - } + conn.close(); + for (int i = 0; i < 20; i++ ) { + System.out.println("Getting NonTx connection"); + noTxConn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection(); + System.out.println("Autocommit => " + noTxConn.getAutoCommit()); + if (noTxConn.getAutoCommit() == false ) { + return false; + } + noTxConn.close(); + } System.out.println("Getting TRANSACTIONAL connection"); conn = ds.getConnection(); System.out.println("Autocommit => " + conn.getAutoCommit()); - if (conn.getAutoCommit() == true ) { - return false; - } - conn.close(); - tx.commit(); + if (conn.getAutoCommit() == true ) { + return false; + } + conn.close(); + tx.commit(); - return true; - + return true; + } catch (Exception e) { - System.out.println("Caught Exception---"); - e.printStackTrace(); - return false; + System.out.println("Caught Exception---"); + e.printStackTrace(); + return false; } finally { - try { - if (noTxConn != null ) { - noTxConn.close(); - } - } catch( Exception e1 ) {} - } + try { + if (noTxConn != null ) { + noTxConn.close(); + } + } catch( Exception e1 ) {} + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/sql/create_pointbase.sql index 00eb96c..2d3d1a2 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/sql/create_pointbase.sql
@@ -1,5 +1,5 @@ -DROP TABLE NOTXCONNTABLE; -CREATE TABLE NOTXCONNTABLE( - name char(20), - num integer -); +DROP TABLE NOTXCONNTABLE; +CREATE TABLE NOTXCONNTABLE( + name char(20), + num integer +);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/sql/drop_pointbase.sql index 03490d0..762a0f6 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test1/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table NOTXCONNTABLE; +Drop table NOTXCONNTABLE;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/build.properties index cf4625c..dfd1ca3 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-dmmcfnotxconn"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="oracle.resource.type" value="java.sql.Driver"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/build.xml index 269c23b..18cee81 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/build.xml
@@ -32,14 +32,14 @@ &testproperties; &jdbcCommon; &jdbcCommonProps; - - + + <target name="all" depends="clean,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"/> @@ -51,28 +51,28 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="deploy-jdbc-driver-oracle-common"> - <param name="oracle.resource.type" value="${oracle.resource.type}"/> + <param name="oracle.resource.type" value="${oracle.resource.type}"/> </antcall> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -80,7 +80,7 @@ <antcall target="undeploy-jdbc-oracle-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/descriptor/ejb-jar.xml index 2e09567..ffb9817 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/descriptor/ejb-jar.xml
@@ -49,6 +49,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor>--> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/ejb/SimpleSessionBean.java index 3e6c8b9..215fb8e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/ejb/SimpleSessionBean.java
@@ -56,28 +56,28 @@ ds = (com.sun.appserv.jdbc.DataSource) ic_.lookup("java:comp/env/DataSource"); UserTransaction tx =(UserTransaction)ctxt_.getUserTransaction(); - tx.begin(); + tx.begin(); conn = ds.getConnection("scott", "tiger"); stmt = conn.createStatement(); - stmt.executeUpdate("INSERT INTO NOTXCONNTABLE VALUES('method1',3)"); + stmt.executeUpdate("INSERT INTO NOTXCONNTABLE VALUES('method1',3)"); String query1 = "SELECT * FROM NOTXCONNTABLE"; rs = stmt.executeQuery(query1); - noTxConn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection("scott", "tiger"); + noTxConn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection("scott", "tiger"); - stmt2 = noTxConn.createStatement(); + stmt2 = noTxConn.createStatement(); rs2 = stmt2.executeQuery("SELECT * FROM NOTXCONNTABLE"); - tx.commit(); + tx.commit(); if ( rs2.next() ) { - return false; - } - - - return true; - + return false; + } + + + return true; + } catch (Exception e) { - System.out.println("Caught Exception---"); - e.printStackTrace(); - return false; + System.out.println("Caught Exception---"); + e.printStackTrace(); + return false; } finally { if (rs != null ) { try { rs.close(); } catch( Exception e1) {} @@ -88,20 +88,20 @@ if (conn != null ) { try {conn.close();} catch( Exception e1) {} } - + if (rs2 != null ) { try {rs2.close();} catch( Exception e1 ) {} } if (stmt2 != null ) { try {stmt2.close(); } catch( Exception e1) {} } - + if (noTxConn != null ) { try { noTxConn.close(); }catch( Exception e1) {} } - } + } - + } public void ejbLoad() {
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/sql/create_pointbase.sql index 00eb96c..2d3d1a2 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/sql/create_pointbase.sql
@@ -1,5 +1,5 @@ -DROP TABLE NOTXCONNTABLE; -CREATE TABLE NOTXCONNTABLE( - name char(20), - num integer -); +DROP TABLE NOTXCONNTABLE; +CREATE TABLE NOTXCONNTABLE( + name char(20), + num integer +);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/sql/drop_pointbase.sql index 03490d0..762a0f6 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf.notxconn/test2/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table NOTXCONNTABLE; +Drop table NOTXCONNTABLE;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/build.properties index 049277f..92ad954 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-dmmcf"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/build.xml index 6b8c415..6ff589c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/build.xml
@@ -32,14 +32,14 @@ &run; <property name="execution.mode" value="pe"/> - - + + <target name="all" 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"/> @@ -51,13 +51,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="create-jdbc-driver-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-driver-pool"/> @@ -67,29 +67,29 @@ <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="jdbc-driver-pool"/> - <param name="jdbc.resource.name" value="jdbc/driverRes"/> + <param name="jdbc.resource.name" value="jdbc/driverRes"/> </antcall> <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="jdbc-driver-pool"/> - <param name="jdbc.resource.name" value="jdbc/driverRes1"/> + <param name="jdbc.resource.name" value="jdbc/driverRes1"/> </antcall> - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-driver-pool.property.URL=jdbc:derby://localhost:1527/testdb;user=dbuser;password=dbpassword"/> + value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-driver-pool.property.URL=jdbc:derby://localhost:1527/testdb;user=dbuser;password=dbpassword"/> </antcall> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -98,7 +98,7 @@ <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/driverRes"/> </antcall> - + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/driverRes1"/> </antcall> @@ -106,9 +106,9 @@ <antcall target="delete-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-driver-pool"/> </antcall> - + <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/client/Client.java index 4db1e69..570fa67 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/client/Client.java
@@ -74,7 +74,7 @@ } else { stat.addStatus(testSuite + " test6 : ", stat.FAIL); } - + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/descriptor/ejb-jar.xml index 531463b..5d4143b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/descriptor/ejb-jar.xml
@@ -49,11 +49,11 @@ <transaction-type>Container</transaction-type> <ejb-ref> <description></description> - <ejb-ref-name>ejb/SimpleSession2EJB</ejb-ref-name> - <ejb-ref-type>Session</ejb-ref-type> + <ejb-ref-name>ejb/SimpleSession2EJB</ejb-ref-name> + <ejb-ref-type>Session</ejb-ref-type> <home>com.sun.s1asdev.jdbc.dmmcf.ejb.SimpleSession2Home</home> <remote>com.sun.s1asdev.jdbc.dmmcf.ejb.SimpleSession2</remote> - <ejb-link>SimpleSession2EJB</ejb-link> + <ejb-link>SimpleSession2EJB</ejb-link> </ejb-ref> <resource-ref> <res-ref-name>DataSource</res-ref-name> @@ -94,6 +94,6 @@ <trans-attribute>RequiresNew</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/ejb/SimpleSession2Bean.java b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/ejb/SimpleSession2Bean.java index a510de4..23593e6 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/ejb/SimpleSession2Bean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/ejb/SimpleSession2Bean.java
@@ -28,14 +28,14 @@ { private SessionContext ctxt_; - private InitialContext ic_; + private InitialContext ic_; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + try { + ic_ = new InitialContext(); + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { @@ -44,57 +44,57 @@ /** */ public boolean test1() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - boolean passed = false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + boolean passed = false; - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeUpdate( "UPDATE CONNSHARING SET c_phone='CONN_SHARING_BEAN_2' WHERE c_id=100"); + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeUpdate( "UPDATE CONNSHARING SET c_phone='CONN_SHARING_BEAN_2' WHERE c_id=100"); - return true; - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null) { - try { stmt1.close(); } catch( Exception e1 ) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - + return true; + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null) { + try { stmt1.close(); } catch( Exception e1 ) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } } - + + } + public boolean test2() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - boolean passed = false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + boolean passed = false; - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeUpdate( "UPDATE CONNSHARING SET c_phone='CONN_SHARING_BEAN_2_2' WHERE c_id=200"); + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeUpdate( "UPDATE CONNSHARING SET c_phone='CONN_SHARING_BEAN_2_2' WHERE c_id=200"); - return true; - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null) { - try { stmt1.close(); } catch( Exception e1 ) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - + return true; + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null) { + try { stmt1.close(); } catch( Exception e1 ) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } + } public boolean test3() throws Exception {
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/sql/create_pointbase.sql index 8cb3174..721d9e8 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/sql/create_pointbase.sql
@@ -1,6 +1,6 @@ -Drop table CONNSHARING; - -CREATE TABLE CONNSHARING ( - c_id integer constraint pk_key primary key, - c_phone char(25) -); +Drop table CONNSHARING; + +CREATE TABLE CONNSHARING ( + c_id integer constraint pk_key primary key, + c_phone char(25) +);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/sql/drop_pointbase.sql index c2817f6..77d1d5a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/dmmcf/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table CONNSHARING; +Drop table CONNSHARING;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/build.properties index 5bba1ec..e87ef09 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-fetchoutofseq"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/build.xml index 67b2b4e..aa99c2d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/build.xml
@@ -40,7 +40,7 @@ <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"/> @@ -52,13 +52,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -66,14 +66,14 @@ <antcall target="deploy-jdbc-oracle-common"/> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -81,7 +81,7 @@ <antcall target="undeploy-jdbc-oracle-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/client/SimpleBMPClient.java index 28a7c40..f785efb 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/client/SimpleBMPClient.java
@@ -29,31 +29,31 @@ public static void main(String[] args) throws Exception { - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "jdbcfetchoutofseq "; + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "jdbcfetchoutofseq "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); if ( simpleBMP.test1() ) { - stat.addStatus(testSuite+"test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test1 : ", stat.FAIL); - } + stat.addStatus(testSuite+"test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test1 : ", stat.FAIL); + } - if ( simpleBMP.test2() ) { - stat.addStatus(testSuite+"test2 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test2 : ", stat.FAIL); - } + if ( simpleBMP.test2() ) { + stat.addStatus(testSuite+"test2 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test2 : ", stat.FAIL); + } - System.out.println("jdbc fetchoutofseq status: "); - stat.printSummary(); - - + System.out.println("jdbc fetchoutofseq status: "); + stat.printSummary(); + + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/descriptor/ejb-jar.xml index 85b0795..cd23d2d 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/descriptor/ejb-jar.xml
@@ -57,6 +57,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/ejb/SimpleBMPBean.java index c7f97de..640883d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/ejb/SimpleBMPBean.java
@@ -30,17 +30,17 @@ protected DataSource ds; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } public boolean test1() { @@ -60,40 +60,40 @@ * update" query. Since a connection obtained using getNonTxConnection * is not managed (transaction-wise), its autocommit is set to true by * default. So this fails. - * 2. gets a connection as above but sets its autocommit to true. The + * 2. gets a connection as above but sets its autocommit to true. The * query will then pass. */ public boolean issueQuery(boolean autoCommit) { Connection conn = null; - PreparedStatement stmt = null; + PreparedStatement stmt = null; boolean passed = (autoCommit ? false : true); - try { - //conn = ds.getConnection(); - conn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection(); - if ( !autoCommit ) { - conn.setAutoCommit( false ); - } - stmt = conn.prepareStatement("SELECT c_id, c_phone FROM O_CUSTOMER FOR UPDATE OF c_id"); - stmt.executeQuery(); - } catch (Exception e) { - if (autoCommit) { - passed = true; - } else { - passed = false; - } - e.printStackTrace(); - } finally { - if (stmt != null ) { - try {stmt.close();} catch(Exception e1) {} - } - if ( conn != null ) { - try { conn.close(); } catch( Exception e1) {} - } - } - - return passed; + try { + //conn = ds.getConnection(); + conn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection(); + if ( !autoCommit ) { + conn.setAutoCommit( false ); + } + stmt = conn.prepareStatement("SELECT c_id, c_phone FROM O_CUSTOMER FOR UPDATE OF c_id"); + stmt.executeQuery(); + } catch (Exception e) { + if (autoCommit) { + passed = true; + } else { + passed = false; + } + e.printStackTrace(); + } finally { + if (stmt != null ) { + try {stmt.close();} catch(Exception e1) {} + } + if ( conn != null ) { + try { conn.close(); } catch( Exception e1) {} + } + } + + return passed; } - + public void ejbLoad() {} public void ejbStore() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/create_mysql.sql b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/create_mysql.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/create_mysql.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/create_mysql.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/create_pointbase.sql index 637a7c5..c3b0d5c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/create_pointbase.sql
@@ -1,9 +1,9 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO O_CUSTOMER VALUES (0, 'abcd'); -INSERT INTO O_CUSTOMER VALUES (1, 'pqrs'); +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO O_CUSTOMER VALUES (0, 'abcd'); +INSERT INTO O_CUSTOMER VALUES (1, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/fetchoutofseq/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/build.properties index 751b348..5c4a00a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-flushconnectionpool"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/build.xml index 4b494c8..fe2be3b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/build.xml
@@ -75,7 +75,7 @@ <param name="operand.props" value="jdbc-flushconnectionpool-pool"/> </antcall> - <antcall target="runclient-common"/> + <antcall target="runclient-common"/> </target> <target name="undeploy" depends="init-common"> @@ -108,14 +108,14 @@ value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-flushconnectionpool-pool.steady_pool_size=1"/> </antcall> - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-flushconnectionpool-pool.max_pool_size=1"/> </antcall> - <!-- <antcall target="asadmin-common"> + <!-- <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-flushconnectionpool-pool.max_connection_usage_count=5"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/ejb/SimpleBMPBean.java index 00b6470..0c0c4f5 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/ejb/SimpleBMPBean.java
@@ -52,8 +52,8 @@ /** * Acquire 4 connections, closing them at the end of the loop. - * Cache the first connection, and before acquiring the last connection, - * do a flush connection pool. The 5th connection got after the + * Cache the first connection, and before acquiring the last connection, + * do a flush connection pool. The 5th connection got after the * flush should be different from the first connection got. * * @return boolean @@ -69,12 +69,12 @@ for (int i = 0; i < 5; i++) { Connection conn = null; try { - //Do a flush and then get a connection for the last iteration - if(i ==4) { - if(!flushConnectionPool()) { - break; - } - } + //Do a flush and then get a connection for the last iteration + if(i ==4) { + if(!flushConnectionPool()) { + break; + } + } conn = ds.getConnection(); System.out.println("********i=" + i + "conn=" + ds.getConnection(conn)); @@ -112,44 +112,44 @@ ds = this.ds; boolean passed = true; - Connection con = null; - try { + Connection con = null; + try { con = ds.getConnection(); - } catch(Exception ex) { - passed = false; - } + } catch(Exception ex) { + passed = false; + } return passed; } private boolean flushConnectionPool() throws Exception { ServiceLocator habitat = Globals.getDefaultHabitat(); - GlassFish gf = habitat.getService(GlassFish.class); - CommandRunner runner = gf.getCommandRunner(); - CommandResult res = runner.run("flush-connection-pool", poolName); - System.out.println("res= " + res.getOutput()); - if(res.getExitStatus() == CommandResult.ExitStatus.SUCCESS) { + GlassFish gf = habitat.getService(GlassFish.class); + CommandRunner runner = gf.getCommandRunner(); + CommandResult res = runner.run("flush-connection-pool", poolName); + System.out.println("res= " + res.getOutput()); + if(res.getExitStatus() == CommandResult.ExitStatus.SUCCESS) { return true; - } - return false; + } + return false; } private boolean amxFlushConnectionPool() throws Exception { final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; final JMXServiceURL url = new JMXServiceURL(urlStr); - boolean result = false; + boolean result = false; final JMXConnector jmxConn = JMXConnectorFactory.connect(url); final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); ObjectName objectName = - new ObjectName("amx:pp=/ext,type=connector-runtime-api-provider"); + new ObjectName("amx:pp=/ext,type=connector-runtime-api-provider"); - String[] params = {poolName}; - String[] signature = {String.class.getName()}; + String[] params = {poolName}; + String[] signature = {String.class.getName()}; Map<String,Object> flushStatus = (Map<String,Object>) connection.invoke(objectName, "flushConnectionPool", params, signature); - if(flushStatus != null) { - result = (Boolean) flushStatus.get("FlushConnectionPoolKey"); - } + if(flushStatus != null) { + result = (Boolean) flushStatus.get("FlushConnectionPoolKey"); + } return result; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/sql/create_pointbase.sql index 84654a1..fa5086c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table flush_connection_pool; - -CREATE TABLE flush_connection_pool ( - id integer not null, - value char(16) -); - +Drop table flush_connection_pool; + +CREATE TABLE flush_connection_pool ( + id integer not null, + value char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/sql/drop_pointbase.sql index 9d50687..c2649b4 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/flushconnectionpool/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table flush_connection_pool; +Drop table flush_connection_pool;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/build.properties index 0338c97..cbf09c6 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-initsql"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/build.xml index 22fa0e4..a4ca9af 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/build.xml
@@ -32,14 +32,14 @@ &testproperties; &jdbcCommon; &jdbcCommonProps; - + <target name="all" depends="clean,build,deploy,run,undeploy"/> - + <target name="clean" depends="init-common"> <delete dir="${build.classes.dir}"/> <delete dir="${assemble.dir}"/> </target> - + <target name="compile" depends="clean"> <antcall target="compile-common"> <param name="src" value="ejb"/> @@ -61,31 +61,31 @@ <target name="deploy" depends="init-common"> <antcall target="deploy-jdbc-oracle-common"> - <param name="oracle.pool.name" value="jdbc-oracle-pool-initsql"/> - <param name="oracle.resource.name" value="jdbc/oracleres-initsql"/> + <param name="oracle.pool.name" value="jdbc-oracle-pool-initsql"/> + <param name="oracle.resource.name" value="jdbc/oracleres-initsql"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-oracle-pool-initsql.init-sql='ALTER SESSION SET NLS_COMP=LINGUISTIC NLS_SORT=BINARY_CI'"/> + value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-oracle-pool-initsql.init-sql='ALTER SESSION SET NLS_COMP=LINGUISTIC NLS_SORT=BINARY_CI'"/> </antcall> <antcall target="deploy-common"/> <antcall target="execute-sql-oracle-common"> - <param name="sql.file" value="sql/create.sql"/> + <param name="sql.file" value="sql/create.sql"/> </antcall> </target> <target name="undeploy" depends="init-common"> <antcall target="undeploy-jdbc-oracle-common"> - <param name="oracle.pool.name" value="jdbc-oracle-pool-initsql"/> - <param name="oracle.resource.name" value="jdbc/oracleres-initsql"/> + <param name="oracle.pool.name" value="jdbc-oracle-pool-initsql"/> + <param name="oracle.resource.name" value="jdbc/oracleres-initsql"/> </antcall> <antcall target="undeploy-common"/> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/drop.sql"/> </antcall> </target> - + <target name="run"> <antcall target="runclient-common"> <param name="appclient.application.args" value="1"/> @@ -100,9 +100,9 @@ <param name="appclient.application.args" value="2"/> </antcall> </target> - + <target name="usage"> <antcall target="usage-common"/> </target> - + </project>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/client/Client.java index 23b7afe..9f6d9e1 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/client/Client.java
@@ -25,24 +25,24 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + private static SimpleReporterAdapter stat = new SimpleReporterAdapter(); private static String testSuite = "initsql-test"; private static InitialContext ic; public static void main(String[] args) throws Exception { - + try { - ic = new InitialContext(); - } catch(NamingException ex) { - ex.printStackTrace(); - } + ic = new InitialContext(); + } catch(NamingException ex) { + ex.printStackTrace(); + } Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); - stat.addDescription("Running initsql testSuite "); + stat.addDescription("Running initsql testSuite "); SimpleSession simpleSession = simpleSessionHome.create(); if (args != null && args.length > 0) { @@ -65,9 +65,9 @@ } break; } - } - } - + } + } + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/descriptor/ejb-jar.xml index fc6e9fb..807356b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/descriptor/ejb-jar.xml
@@ -51,6 +51,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/descriptor/sun-ejb-jar.xml index fd04412..a19aba3 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/descriptor/sun-ejb-jar.xml
@@ -27,7 +27,7 @@ <jndi-name>com.sun.s1asdev.jdbc.initsql.ejb.SimpleSessionHome</jndi-name> <resource-ref> <res-ref-name>DataSource1</res-ref-name> - <jndi-name>jdbc/oracleres-initsql</jndi-name> + <jndi-name>jdbc/oracleres-initsql</jndi-name> </resource-ref> </ejb> </enterprise-beans>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/ejb/SimpleSessionBean.java index 1e0db90..17c02bd 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/ejb/SimpleSessionBean.java
@@ -30,71 +30,71 @@ private SessionContext context; private InitialContext ic; - private DataSource ds1; + private DataSource ds1; public void setSessionContext(SessionContext ctxt) { this.context = ctxt; - try { - ic = new InitialContext(); - ds1 = (com.sun.appserv.jdbc.DataSource)ic.lookup("java:comp/env/DataSource1"); - } catch( Exception ne ) { - ne.printStackTrace(); - } + try { + ic = new InitialContext(); + ds1 = (com.sun.appserv.jdbc.DataSource)ic.lookup("java:comp/env/DataSource1"); + } catch( Exception ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { } /** - * Test to select the names from a table. + * Test to select the names from a table. * - * The result set would contain different number of rows based on - * a session property set during the initialization sql phase. - * Based on the property set, the number of rows are compared to + * The result set would contain different number of rows based on + * a session property set during the initialization sql phase. + * Based on the property set, the number of rows are compared to * test the feature. */ public boolean test1(boolean caseSensitive) { Connection con = null; - Statement stmt = null; - ResultSet rs = null; - String query = "Select name from WORKERS where name='Joy Joy'"; - boolean result = false; - int size = 0; - try { - con = ds1.getConnection(); - stmt = con.createStatement(); - rs = stmt.executeQuery(query); - if(rs != null) { - while(rs.next()) { - size++; - } - } - if(caseSensitive) { - result = size == 1; - } else { - result = size == 3; - } - } catch (SQLException ex) { - result = false; - ex.printStackTrace(); - } finally { + Statement stmt = null; + ResultSet rs = null; + String query = "Select name from WORKERS where name='Joy Joy'"; + boolean result = false; + int size = 0; + try { + con = ds1.getConnection(); + stmt = con.createStatement(); + rs = stmt.executeQuery(query); + if(rs != null) { + while(rs.next()) { + size++; + } + } + if(caseSensitive) { + result = size == 1; + } else { + result = size == 3; + } + } catch (SQLException ex) { + result = false; + ex.printStackTrace(); + } finally { if(rs != null) { - try { - rs.close(); - } catch(Exception ex) {} - } - if(stmt != null) { - try { - stmt.close(); - } catch(Exception ex) {} - } - if(con != null) { - try { - stmt.close(); - } catch(Exception ex) {} - } - } - return result; + try { + rs.close(); + } catch(Exception ex) {} + } + if(stmt != null) { + try { + stmt.close(); + } catch(Exception ex) {} + } + if(con != null) { + try { + stmt.close(); + } catch(Exception ex) {} + } + } + return result; } public void ejbStore() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/sql/create.sql b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/sql/create.sql index 34c8dc1..f1aa0d9 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/init-sql/sql/create.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/init-sql/sql/create.sql
@@ -1,6 +1,6 @@ DROP TABLE WORKERS; CREATE TABLE WORKERS( - name char(20) + name char(20) ); INSERT INTO WORKERS VALUES('Joy Joy'); INSERT INTO WORKERS VALUES('joy joy');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/build.properties index 6aee91f..c6bd41b 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc41-devtests"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/build.xml index 74bcdf2..34cbace 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/build.xml
@@ -50,23 +50,23 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-41-pool"/> - <param name="jdbc.resource.type" value="javax.sql.XADataSource"/> - <param name="db.class" value="org.apache.derby.jdbc.ClientXADataSource"/> + <param name="jdbc.resource.type" value="javax.sql.XADataSource"/> + <param name="db.class" value="org.apache.derby.jdbc.ClientXADataSource"/> </antcall> <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="jdbc-41-pool"/> - <param name="jdbc.resource.name" value="jdbc/41resource"/> + <param name="jdbc.resource.name" value="jdbc/41resource"/> </antcall> <antcall target="deploy-common"/> @@ -74,11 +74,11 @@ <param name="sql.file" value="sql/create.sql"/> </antcall> </target> - + <target name="run" depends="init-common"> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> @@ -88,13 +88,13 @@ <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/41resource"/> </antcall> - + <antcall target="delete-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-41-pool"/> </antcall> - + <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/client/Client.java index 90ca373..17435be 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/client/Client.java
@@ -25,43 +25,43 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = " JDBC41 tests on JDK7 "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = " JDBC41 tests on JDK7 "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); - - stat.addDescription("Running JDBC41 testSuite "); + + stat.addDescription("Running JDBC41 testSuite "); SimpleSession simpleSession = simpleSessionHome.create(); if (simpleSession.test1() ) { - stat.addStatus( testSuite + " test1 : Connection API/abort Test : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test1 : Connection API/abort Test : " , stat.FAIL ); - } - + stat.addStatus( testSuite + " test1 : Connection API/abort Test : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test1 : Connection API/abort Test : " , stat.FAIL ); + } + if (simpleSession.test2() ) { - stat.addStatus( testSuite + " test2 : Connection API/abort usertx Test : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test2 : Connection API/abort usertx Test : " , stat.FAIL ); - } - + stat.addStatus( testSuite + " test2 : Connection API/abort usertx Test : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test2 : Connection API/abort usertx Test : " , stat.FAIL ); + } + if (simpleSession.test3() ) { - stat.addStatus( testSuite + " test3 : DatabaseMetaData Test : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test3 : DatabaseMetaData Test : " , stat.FAIL ); - } - + stat.addStatus( testSuite + " test3 : DatabaseMetaData Test : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test3 : DatabaseMetaData Test : " , stat.FAIL ); + } + if (simpleSession.test4() ) { - stat.addStatus( testSuite + " test4 : Statement API/Connection abort usertx Test : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test4 : Statement API/Connection abort usertx Test : " , stat.FAIL ); - } - stat.printSummary(); + stat.addStatus( testSuite + " test4 : Statement API/Connection abort usertx Test : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test4 : Statement API/Connection abort usertx Test : " , stat.FAIL ); + } + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/descriptor/ejb-jar.xml index db89d3e..c444aad 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/descriptor/ejb-jar.xml
@@ -44,8 +44,8 @@ </enterprise-beans> <assembly-descriptor> - + </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/ejb/SimpleSessionBean.java index 2e0f3f2..614d6fd 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/basic/ejb/SimpleSessionBean.java
@@ -30,16 +30,16 @@ { private SessionContext ctxt_; - private InitialContext ic_; + private InitialContext ic_; private DataSource ds; PrintTask task1 = new PrintTask("thread1"); PrintTask task2 = new PrintTask("thread2"); ExecutorService threadExecutor = Executors.newCachedThreadPool(new ThreadFactory() { - public Thread newThread(Runnable r) { - Thread th = new Thread(r); - th.setDaemon(true); - return th; - } + public Thread newThread(Runnable r) { + Thread th = new Thread(r); + th.setDaemon(true); + return th; + } }); class PrintTask implements Runnable { @@ -56,247 +56,247 @@ public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); - ds = (DataSource) ic_.lookup("java:comp/env/DataSource"); - } catch( Exception ne ) { - ne.printStackTrace(); - } + try { + ic_ = new InitialContext(); + ds = (DataSource) ic_.lookup("java:comp/env/DataSource"); + } catch( Exception ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { } /** - * Testing connection object + * Testing connection object */ public boolean test1() throws Exception { - Connection con = null; - Connection[] conns = new Connection[32]; - Statement stmt = null; - boolean passed = true; - try { - con = ds.getConnection("scott", "tiger"); - stmt = con.createStatement(); + Connection con = null; + Connection[] conns = new Connection[32]; + Statement stmt = null; + boolean passed = true; + try { + con = ds.getConnection("scott", "tiger"); + stmt = con.createStatement(); - //Try getting schema from con object - System.out.println(">>> con.getSchema()=" + con.getSchema()); + //Try getting schema from con object + System.out.println(">>> con.getSchema()=" + con.getSchema()); - //try getting network timeout from con object - try { - System.out.println(">>> con.getNetworkTimeout=" + con.getNetworkTimeout()); - } catch(Exception ex) { - passed = true; - //Expected as this is not implemented in derby 10.8 jdbc41 driver - } + //try getting network timeout from con object + try { + System.out.println(">>> con.getNetworkTimeout=" + con.getNetworkTimeout()); + } catch(Exception ex) { + passed = true; + //Expected as this is not implemented in derby 10.8 jdbc41 driver + } - //Invoke abort on con object - threadExecutor.submit(task1); - threadExecutor.submit(task2); - con.abort(threadExecutor); - System.out.println("Marked connection for aborting..."); - - //Try to use the aborted connection to create a statement. should fail - try { - con.createStatement(); - } catch(SQLException ex) { - passed = true; - System.out.println("Creating statement from con after tx abort : Failed : Expected"); - } - } catch(Exception ex) { - passed = false; - } finally { - if ( stmt != null ) { - try { stmt.close(); } catch( Exception e1) {} - } - if ( con != null ) { - try { con.close(); } catch( Exception e1) {} - } - for(int i=0; i<32; i++) { - if(conns[i] != null) { - try { conns[i].close(); } catch(Exception ex) {} - } - } - } - return passed; + //Invoke abort on con object + threadExecutor.submit(task1); + threadExecutor.submit(task2); + con.abort(threadExecutor); + System.out.println("Marked connection for aborting..."); + + //Try to use the aborted connection to create a statement. should fail + try { + con.createStatement(); + } catch(SQLException ex) { + passed = true; + System.out.println("Creating statement from con after tx abort : Failed : Expected"); + } + } catch(Exception ex) { + passed = false; + } finally { + if ( stmt != null ) { + try { stmt.close(); } catch( Exception e1) {} + } + if ( con != null ) { + try { con.close(); } catch( Exception e1) {} + } + for(int i=0; i<32; i++) { + if(conns[i] != null) { + try { conns[i].close(); } catch(Exception ex) {} + } + } + } + return passed; } /** - * Testing connection object in a User transaction + * Testing connection object in a User transaction */ public boolean test2() throws Exception { - Connection con = null; - Connection[] conns = new Connection[32]; - Connection[] conns1 = new Connection[32]; - Statement[] stmts1 = new Statement[32]; - Statement stmt = null; - boolean passed = true; - try { - UserTransaction usertx = (UserTransaction) ctxt_.getUserTransaction(); + Connection con = null; + Connection[] conns = new Connection[32]; + Connection[] conns1 = new Connection[32]; + Statement[] stmts1 = new Statement[32]; + Statement stmt = null; + boolean passed = true; + try { + UserTransaction usertx = (UserTransaction) ctxt_.getUserTransaction(); usertx.begin(); - con = ds.getConnection("scott", "tiger"); - //System.out.println("!!!! TEST2 ConHashcode=" + (((com.sun.appserv.jdbc.DataSource)ds).getConnection(con)).hashCode()); - stmt = con.createStatement(); + con = ds.getConnection("scott", "tiger"); + //System.out.println("!!!! TEST2 ConHashcode=" + (((com.sun.appserv.jdbc.DataSource)ds).getConnection(con)).hashCode()); + stmt = con.createStatement(); - //Invoke abort on con object - threadExecutor.submit(task1); - threadExecutor.submit(task2); - con.abort(threadExecutor); - System.out.println("Marked connection for aborting..."); - - //Operations on con object after marking for abort in a tx - //before tx commit, all operations on con pass + //Invoke abort on con object + threadExecutor.submit(task1); + threadExecutor.submit(task2); + con.abort(threadExecutor); + System.out.println("Marked connection for aborting..."); + + //Operations on con object after marking for abort in a tx + //before tx commit, all operations on con pass //Try getting schema from con object - System.out.println(">>> con.getSchema()=" + con.getSchema()); + System.out.println(">>> con.getSchema()=" + con.getSchema()); - //try getting network timeout from con object - try { - System.out.println(">>> con.getNetworkTimeout=" + con.getNetworkTimeout()); - } catch(Exception ex) { - passed = true; - //Expected as this is not implemented in derby 10.8 jdbc41 driver - } + //try getting network timeout from con object + try { + System.out.println(">>> con.getNetworkTimeout=" + con.getNetworkTimeout()); + } catch(Exception ex) { + passed = true; + //Expected as this is not implemented in derby 10.8 jdbc41 driver + } - usertx.commit(); + usertx.commit(); - //Try to use the aborted connection to create a statement. should fail - try { - con.createStatement(); - } catch(SQLException ex) { - passed = true; - System.out.println("Creating statement from con after tx abort : Failed : Expected"); - } - } catch(Exception ex) { - passed = false; - } finally { - if ( stmt != null ) { - try { stmt.close(); } catch( Exception e1) {} - } - if ( con != null ) { - try { con.close(); } catch( Exception e1) {} - } - //Test to get (max pool size-1) no. of connections after a previous abort. - //should pass as the aborted connection is destroyed - for(int i=0; i<32; i++) { - if(i == 31) { - //Last connection should not be got - try { - conns1[i] = ds.getConnection("scott", "tiger"); - } catch(Exception ex) { - passed = true; - } - } else { + //Try to use the aborted connection to create a statement. should fail + try { + con.createStatement(); + } catch(SQLException ex) { + passed = true; + System.out.println("Creating statement from con after tx abort : Failed : Expected"); + } + } catch(Exception ex) { + passed = false; + } finally { + if ( stmt != null ) { + try { stmt.close(); } catch( Exception e1) {} + } + if ( con != null ) { + try { con.close(); } catch( Exception e1) {} + } + //Test to get (max pool size-1) no. of connections after a previous abort. + //should pass as the aborted connection is destroyed + for(int i=0; i<32; i++) { + if(i == 31) { + //Last connection should not be got + try { + conns1[i] = ds.getConnection("scott", "tiger"); + } catch(Exception ex) { + passed = true; + } + } else { conns1[i] = ds.getConnection("scott", "tiger"); - stmts1[i] = conns1[i].createStatement(); - } - } - for(int i=0; i<32; i++) { - if(stmts1[i] != null) { - try { stmts1[i].close(); } catch(Exception ex) {} - } - } - for(int i=0; i<32; i++) { - if(conns1[i] != null) { - try { conns1[i].close(); } catch(Exception ex) {} - } - } - } - return passed; + stmts1[i] = conns1[i].createStatement(); + } + } + for(int i=0; i<32; i++) { + if(stmts1[i] != null) { + try { stmts1[i].close(); } catch(Exception ex) {} + } + } + for(int i=0; i<32; i++) { + if(conns1[i] != null) { + try { conns1[i].close(); } catch(Exception ex) {} + } + } + } + return passed; } //Tests DatabaseMetaData public boolean test3() throws Exception { - Connection con = null; - DatabaseMetaData dmd = null; - boolean passed = true; - try { - con = ds.getConnection("scott", "tiger"); - dmd = con.getMetaData(); - //Testing DatabaseMetaData - System.out.println(">>> dmd.generatedKeyAlwaysReturned()=" + dmd.generatedKeyAlwaysReturned()); - } catch(Exception ex) { - passed = false; - } finally { - if(con!= null) { - try { con.close(); } catch(Exception ex) {} - } - } - return passed; + Connection con = null; + DatabaseMetaData dmd = null; + boolean passed = true; + try { + con = ds.getConnection("scott", "tiger"); + dmd = con.getMetaData(); + //Testing DatabaseMetaData + System.out.println(">>> dmd.generatedKeyAlwaysReturned()=" + dmd.generatedKeyAlwaysReturned()); + } catch(Exception ex) { + passed = false; + } finally { + if(con!= null) { + try { con.close(); } catch(Exception ex) {} + } + } + return passed; } /** * Testing Statement object within a transaction */ public boolean test4() throws Exception { - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - boolean passed = true; + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + boolean passed = true; - //Now try getting a connection again, but within a transaction - int size = 0; - try { - createTable(); - UserTransaction tx = (UserTransaction) ctxt_.getUserTransaction(); - tx.begin(); - conn1 = ds.getConnection("scott", "tiger"); - System.out.println("!!!! TEST4 ConHashcode=" + (((com.sun.appserv.jdbc.DataSource)ds).getConnection(conn1)).hashCode()); - stmt1 = conn1.createStatement(); - insertRow(stmt1); - - threadExecutor.submit(task1); + //Now try getting a connection again, but within a transaction + int size = 0; + try { + createTable(); + UserTransaction tx = (UserTransaction) ctxt_.getUserTransaction(); + tx.begin(); + conn1 = ds.getConnection("scott", "tiger"); + System.out.println("!!!! TEST4 ConHashcode=" + (((com.sun.appserv.jdbc.DataSource)ds).getConnection(conn1)).hashCode()); + stmt1 = conn1.createStatement(); + insertRow(stmt1); + + threadExecutor.submit(task1); threadExecutor.submit(task2); - //Testing Statement object - stmt1.closeOnCompletion(); - System.out.println(">>> stmt1.isCloseOnCompletion()=" + stmt1.isCloseOnCompletion()); - + //Testing Statement object + stmt1.closeOnCompletion(); + System.out.println(">>> stmt1.isCloseOnCompletion()=" + stmt1.isCloseOnCompletion()); + conn1.abort(threadExecutor); - System.out.println("Marked connection for aborting..."); - insertRow(stmt1); + System.out.println("Marked connection for aborting..."); + insertRow(stmt1); - //After con abort (within the tx) - size = getCount(stmt1); + //After con abort (within the tx) + size = getCount(stmt1); - if(size != 2) { - passed = false; - System.out.println("FAILED as size!= 2"); - } + if(size != 2) { + passed = false; + System.out.println("FAILED as size!= 2"); + } - tx.commit(); + tx.commit(); - try { - //After tx commit, insert data. Should fail because of no current connection - insertRow(stmt1); - } catch(SQLException ex) { - passed = true; - System.out.println("Trying to insert data after a tx commit (prev. conn abort): Failed with : " + ex + " Expected."); - } - } catch (Exception e) { - passed = false; - } finally { - if (rs1 != null ) { - try { rs1.close(); } catch( Exception e1 ) {} - } - if ( stmt1 != null ) { - try { stmt1.close(); } catch( Exception e1) {} - } - if ( conn1 != null ) { - try { conn1.close(); } catch( Exception e1) {} - } - } - return passed; + try { + //After tx commit, insert data. Should fail because of no current connection + insertRow(stmt1); + } catch(SQLException ex) { + passed = true; + System.out.println("Trying to insert data after a tx commit (prev. conn abort): Failed with : " + ex + " Expected."); + } + } catch (Exception e) { + passed = false; + } finally { + if (rs1 != null ) { + try { rs1.close(); } catch( Exception e1 ) {} + } + if ( stmt1 != null ) { + try { stmt1.close(); } catch( Exception e1) {} + } + if ( conn1 != null ) { + try { conn1.close(); } catch( Exception e1) {} + } + } + return passed; } private void createTable() throws SQLException { String tableName = "JDBC41"; - + Connection con = null; Statement stmt = null; con = ds.getConnection("scott", "tiger"); stmt = con.createStatement(); - + try{ stmt.executeUpdate("drop table " + tableName); }catch(Exception ex){ @@ -305,12 +305,12 @@ stmt.close(); con.close(); } - + private void insertRow(Statement stmt) throws SQLException { String tableName = "JDBC41"; stmt.executeUpdate("INSERT INTO " + tableName + " values (100, 'COFFEE')"); } - + private int getCount(Statement stmt) throws SQLException { String tableName = "JDBC41"; ResultSet rs = null; @@ -320,7 +320,7 @@ rs.close(); return count; } - + public void ejbLoad() {} public void ejbStore() {} public void ejbRemove() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/build.xml index 02580a2..a6b1374 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/build.xml
@@ -34,15 +34,15 @@ <fileset dir="${env.APS_HOME}" includes="test_results*"/> </delete> <delete> - <fileset dir="${env.APS_HOME}" includes="JDBC41test_results.html"/> + <fileset dir="${env.APS_HOME}" includes="JDBC41test_results.html"/> </delete> <antcall target="run-tests"/> - <antcall target="report-41"/> + <antcall target="report-41"/> </target> <target name="run-tests"> <ant dir="basic" target="all"/> - <ant dir="closeoncompletion.stmtcaching" target="all"/> + <ant dir="closeoncompletion.stmtcaching" target="all"/> </target> <target name="report-41">
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/build.properties index 2213521..3dfeebd 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc41-close-on-completion"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/build.xml index 17ab836..8e21bee 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/build.xml
@@ -19,9 +19,9 @@ --> <!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml"> - <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> + <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> <!ENTITY testproperties SYSTEM "./build.properties"> - <!ENTITY run SYSTEM "./../../../../config/run.xml"> + <!ENTITY run SYSTEM "./../../../../config/run.xml"> ]> <project name="jdbc41-close-on-completion" default="usage" basedir="."> @@ -69,7 +69,7 @@ </target> <target name="undeploy" depends="init-common"> - <antcall target="execute-sql-common"> + <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> @@ -92,13 +92,13 @@ - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching-pool.statement_cache_size=5"/> - </antcall> + </antcall> - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching-pool.wrap_jdbc_objects=true"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/descriptor/application.xml index a30de7f..a61df17 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/descriptor/application.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/descriptor/application.xml
@@ -28,7 +28,7 @@ <ejb>jdbc41-close-on-completion-ejb.jar</ejb> </module> <module> - <java>jdbc41-close-on-completion-client.jar</java> + <java>jdbc41-close-on-completion-client.jar</java> </module> </application>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/descriptor/sun-ejb-jar.xml index 80cc26c..32a7540 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/descriptor/sun-ejb-jar.xml
@@ -27,7 +27,7 @@ <jndi-name>com.sun.s1asdev.jdbc.stmtcaching.ejb.SimpleBMPHome</jndi-name> <resource-ref> <res-ref-name>DataSource</res-ref-name> - <jndi-name>jdbc/jdbc-stmtcaching-res</jndi-name> + <jndi-name>jdbc/jdbc-stmtcaching-res</jndi-name> <default-resource-principal> <name>DBUSER</name> <password>DBPASSWORD</password>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/ejb/SimpleBMPBean.java index 7445272..746e41c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/ejb/SimpleBMPBean.java
@@ -39,43 +39,43 @@ } public boolean testCloseOnCompletion() { - System.out.println("closeOnCompletion JDBC 41 test Start"); + System.out.println("closeOnCompletion JDBC 41 test Start"); Connection conn = null; PreparedStatement stmt = null; String tableName = "customer_stmt_wrapper"; - ResultSet rs = null; - ResultSet rs1 = null; + ResultSet rs = null; + ResultSet rs1 = null; boolean passed = true; - try { + try { conn = ds.getConnection(); stmt = conn.prepareStatement("select * from "+ tableName +" where c_phone= ?"); - stmt.setString(1, "shal"); - stmt.closeOnCompletion(); - if(!stmt.isCloseOnCompletion()) { - passed = false; - } - System.out.println(">>> stmt.isCloseOnCompletion()=" + stmt.isCloseOnCompletion()); - rs = stmt.executeQuery(); - rs1 = stmt.executeQuery(); //Got a second rs but not closing it. - rs.close(); - //After this the isClosed should not be true as another resultSet is still open. - if(stmt.isClosed()){ - passed = false; - } - System.out.println("Statement closed=" + stmt.isClosed()); - rs1.close(); - //Both the resultSets are closed. At this stage isClosed should be true. - if(!stmt.isClosed()){ - passed = false; - } - System.out.println("Statement closed=" + stmt.isClosed()); - try { - ResultSet rs2 = stmt.executeQuery(); - rs2.close(); - } catch(SQLException ex) { - System.out.println("Statement object used after closeoncompletion : exception: expected"); - passed = true; - } + stmt.setString(1, "shal"); + stmt.closeOnCompletion(); + if(!stmt.isCloseOnCompletion()) { + passed = false; + } + System.out.println(">>> stmt.isCloseOnCompletion()=" + stmt.isCloseOnCompletion()); + rs = stmt.executeQuery(); + rs1 = stmt.executeQuery(); //Got a second rs but not closing it. + rs.close(); + //After this the isClosed should not be true as another resultSet is still open. + if(stmt.isClosed()){ + passed = false; + } + System.out.println("Statement closed=" + stmt.isClosed()); + rs1.close(); + //Both the resultSets are closed. At this stage isClosed should be true. + if(!stmt.isClosed()){ + passed = false; + } + System.out.println("Statement closed=" + stmt.isClosed()); + try { + ResultSet rs2 = stmt.executeQuery(); + rs2.close(); + } catch(SQLException ex) { + System.out.println("Statement object used after closeoncompletion : exception: expected"); + passed = true; + } } catch (Exception e) { e.printStackTrace(); passed = false; @@ -84,12 +84,12 @@ try { conn.close(); } catch (Exception e1) {} - } - } - System.out.println("closeOnCompletion JDBC 41 test End"); - return passed; + } } - + System.out.println("closeOnCompletion JDBC 41 test End"); + return passed; + } + public void ejbLoad() { }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/sql/create_pointbase.sql index 49db4c1..1d4ccfd 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -drop table customer_stmt_wrapper; -CREATE TABLE customer_stmt_wrapper ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper VALUES(2, 'shal'); +drop table customer_stmt_wrapper; +CREATE TABLE customer_stmt_wrapper ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper VALUES(2, 'shal');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/sql/drop_pointbase.sql index f2ce6e9..abfe149 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/closeoncompletion.stmtcaching/sql/drop_pointbase.sql
@@ -1 +1 @@ -drop table customer_stmt_wrapper; +drop table customer_stmt_wrapper;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/report.xml b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/report.xml index d962c50..b183174 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/report.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbc41-devtests/report.xml
@@ -22,7 +22,7 @@ <target name="report"> <echo message="Comparing results with expected results"/> - + <xslt style="${stylesheet}" in="${xmlfile}" out="${htmlfile}" basedir="." destdir="." />
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/build.properties index 84f69f3..42211e9 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-jdbcjmsauth"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/build.xml index 6853569..dfd7183 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/build.xml
@@ -40,7 +40,7 @@ <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"/> @@ -52,13 +52,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" - value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class,**/JmsAuthHome.class,**/JmsAuth.class" /> + <param name="appclientjar.classes" + value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class,**/JmsAuthHome.class,**/JmsAuth.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -66,7 +66,7 @@ <antcall target="deploy-jdbc-common"/> <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="ql-jdbc-pool"/> - <param name="jdbc.resource.name" value="jdbc/s1qeDB_CM"/> + <param name="jdbc.resource.name" value="jdbc/s1qeDB_CM"/> </antcall> <antcall target="deploy-jms-stuff"/> <antcall target="deploy-common"/> @@ -80,7 +80,7 @@ <antcall target="runclient-common"/> <antcall target="reset-derby-for-no-authentication"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -92,7 +92,7 @@ <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-jms-stuff"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/> @@ -106,12 +106,12 @@ --> <antcall target="create-jms-connection-common"> <param name="jms.factory.type" value="jakarta.jms.QueueConnectionFactory"/> - <param name="jms.factory.name" value="jms/jdbcjmsauth_QCF1"/> + <param name="jms.factory.name" value="jms/jdbcjmsauth_QCF1"/> </antcall> - + <antcall target="create-jms-connection-common"> <param name="jms.factory.type" value="jakarta.jms.QueueConnectionFactory"/> - <param name="jms.factory.name" value="jms/jdbcjmsauth_QCF2"/> + <param name="jms.factory.name" value="jms/jdbcjmsauth_QCF2"/> </antcall> </target> @@ -122,10 +122,10 @@ </antcall> --> <antcall target="delete-jms-connection-common"> - <param name="jms.factory.name" value="jms/jdbcjmsauth_QCF1"/> + <param name="jms.factory.name" value="jms/jdbcjmsauth_QCF1"/> </antcall> <antcall target="delete-jms-connection-common"> - <param name="jms.factory.name" value="jms/jdbcjmsauth_QCF2"/> + <param name="jms.factory.name" value="jms/jdbcjmsauth_QCF2"/> </antcall> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/client/Client.java index d7453a3..10a85a3 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/client/Client.java
@@ -25,199 +25,199 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - static SimpleReporterAdapter stat = + static SimpleReporterAdapter stat = new SimpleReporterAdapter(); public static void main(String[] args) throws Exception { - + stat.addDescription("JDBC JMS Authentication tests"); Client c = new Client(); - c.doJdbcTests(); - c.doJmsTests(); + c.doJdbcTests(); + c.doJmsTests(); - stat.printSummary(); + stat.printSummary(); } private void doJdbcTests() throws Exception { InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); - + SimpleBMP simpleBMP = simpleBMPHome.create(); - String testSuite = "JDBCJmsAuth-JDBC "; - System.out.println(" jdbc tests 3 & 7 will fail with Derby"); - System.out.println("-----------------------------------------------"); - System.out.println(" JDBC Tests "); - System.out.println("-----------------------------------------------"); - System.out.println("app auth : getting connection w/o user/pass"); - System.out.print("Should NOT get a connection : " ); + String testSuite = "JDBCJmsAuth-JDBC "; + System.out.println(" jdbc tests 3 & 7 will fail with Derby"); + System.out.println("-----------------------------------------------"); + System.out.println(" JDBC Tests "); + System.out.println("-----------------------------------------------"); + System.out.println("app auth : getting connection w/o user/pass"); + System.out.print("Should NOT get a connection : " ); if ( simpleBMP.test1() ) { - stat.addStatus(testSuite+" test1 ", stat.PASS); - //System.out.println("PASS"); - } else { - stat.addStatus(testSuite+" test1 ", stat.FAIL); - //System.out.println("FAIL"); - } + stat.addStatus(testSuite+" test1 ", stat.PASS); + //System.out.println("PASS"); + } else { + stat.addStatus(testSuite+" test1 ", stat.FAIL); + //System.out.println("FAIL"); + } - System.out.println("-----------------------------------------------"); - System.out.println("app auth : getting connection w/ user/pass"); - System.out.print("Should get a connection : " ); - if ( simpleBMP.test2() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite+" test2 ", stat.PASS); - } else { - stat.addStatus(testSuite+" test2 ", stat.FAIL); - //System.out.println("FAIL"); - } + System.out.println("-----------------------------------------------"); + System.out.println("app auth : getting connection w/ user/pass"); + System.out.print("Should get a connection : " ); + if ( simpleBMP.test2() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite+" test2 ", stat.PASS); + } else { + stat.addStatus(testSuite+" test2 ", stat.FAIL); + //System.out.println("FAIL"); + } - System.out.println("-----------------------------------------------"); - System.out.println("app auth : getting connection w/ wrong user/pass"); - System.out.print("Should NOT get a connection : " ); - if ( simpleBMP.test3() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite + " test3 ", stat.PASS); - } else { - stat.addStatus(testSuite + " test3 ", stat.FAIL); - //System.out.println("FAIL"); - } + System.out.println("-----------------------------------------------"); + System.out.println("app auth : getting connection w/ wrong user/pass"); + System.out.print("Should NOT get a connection : " ); + if ( simpleBMP.test3() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite + " test3 ", stat.PASS); + } else { + stat.addStatus(testSuite + " test3 ", stat.FAIL); + //System.out.println("FAIL"); + } - System.out.println("-----------------------------------------------"); - System.out.println("app auth : getting connection w/ correct then wrong user/pass"); - System.out.print("Should get a connection then NOT get a connection : " ); - if ( simpleBMP.test4() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite + " test4 ", stat.PASS); - } else { - stat.addStatus(testSuite + " test4 ", stat.FAIL); - //System.out.println("FAIL"); - } + System.out.println("-----------------------------------------------"); + System.out.println("app auth : getting connection w/ correct then wrong user/pass"); + System.out.print("Should get a connection then NOT get a connection : " ); + if ( simpleBMP.test4() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite + " test4 ", stat.PASS); + } else { + stat.addStatus(testSuite + " test4 ", stat.FAIL); + //System.out.println("FAIL"); + } - System.out.println("-----------------------------------------------"); - System.out.println("container auth : getting connection w/o user/pass"); - System.out.print("Should get a connection : " ); + System.out.println("-----------------------------------------------"); + System.out.println("container auth : getting connection w/o user/pass"); + System.out.print("Should get a connection : " ); if ( simpleBMP.test5() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite+" test5 ", stat.PASS); - } else { - stat.addStatus(testSuite+" test5 ", stat.FAIL); - //System.out.println("FAIL"); - } + //System.out.println("PASS"); + stat.addStatus(testSuite+" test5 ", stat.PASS); + } else { + stat.addStatus(testSuite+" test5 ", stat.FAIL); + //System.out.println("FAIL"); + } - System.out.println("-----------------------------------------------"); - System.out.println("container auth : getting connection w/ user/pass"); - System.out.print("Should get a connection : " ); - if ( simpleBMP.test6() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite+" test6 ", stat.PASS); - } else { - stat.addStatus(testSuite+" test6 ", stat.FAIL); - //System.out.println("FAIL"); - } + System.out.println("-----------------------------------------------"); + System.out.println("container auth : getting connection w/ user/pass"); + System.out.print("Should get a connection : " ); + if ( simpleBMP.test6() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite+" test6 ", stat.PASS); + } else { + stat.addStatus(testSuite+" test6 ", stat.FAIL); + //System.out.println("FAIL"); + } - System.out.println("-----------------------------------------------"); - System.out.println("container auth : getting connection w/ wrong user/pass"); - System.out.print("Should NOT get a connection : " ); - if ( simpleBMP.test7() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite + " test7 ", stat.PASS); - } else { - stat.addStatus(testSuite + " test7 ", stat.FAIL); - //System.out.println("FAIL"); - } + System.out.println("-----------------------------------------------"); + System.out.println("container auth : getting connection w/ wrong user/pass"); + System.out.print("Should NOT get a connection : " ); + if ( simpleBMP.test7() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite + " test7 ", stat.PASS); + } else { + stat.addStatus(testSuite + " test7 ", stat.FAIL); + //System.out.println("FAIL"); + } } private void doJmsTests() throws Exception { InitialContext ic = new InitialContext(); - Object obj = ic.lookup("java:comp/env/ejb/JmsAuthHome"); - JmsAuthHome jmsAuthHome = (JmsAuthHome) - PortableRemoteObject.narrow( obj, JmsAuthHome.class ); - JmsAuth jmsAuth = jmsAuthHome.create(); + Object obj = ic.lookup("java:comp/env/ejb/JmsAuthHome"); + JmsAuthHome jmsAuthHome = (JmsAuthHome) + PortableRemoteObject.narrow( obj, JmsAuthHome.class ); + JmsAuth jmsAuth = jmsAuthHome.create(); - String testSuite = "JDBCJmsAuth-JMS"; - - System.out.println("-----------------------------------------------"); - System.out.println(" JMS tests "); - System.out.println("-----------------------------------------------"); - System.out.println("app auth : getting connection w/ user/pass"); - System.out.print("Should get a connection : " ); - if ( jmsAuth.test1() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite + " test1 ", stat.PASS ); - } else { - stat.addStatus(testSuite + " test1 ", stat.FAIL ); - //System.out.println("FAIL"); - } + String testSuite = "JDBCJmsAuth-JMS"; - System.out.println("-----------------------------------------------"); - System.out.println("app auth : getting connection w/o user/pass"); - System.out.print("Should get a connection : " ); - if ( jmsAuth.test2() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite + " test2 ", stat.PASS ); - } else { - stat.addStatus(testSuite + " test2 ", stat.FAIL ); - //System.out.println("FAIL"); - } + System.out.println("-----------------------------------------------"); + System.out.println(" JMS tests "); + System.out.println("-----------------------------------------------"); + System.out.println("app auth : getting connection w/ user/pass"); + System.out.print("Should get a connection : " ); + if ( jmsAuth.test1() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite + " test1 ", stat.PASS ); + } else { + stat.addStatus(testSuite + " test1 ", stat.FAIL ); + //System.out.println("FAIL"); + } - System.out.println("-----------------------------------------------"); - System.out.println("app auth : getting connection w/ wrong user/pass"); - System.out.print("Should NOT get a connection : " ); - if ( jmsAuth.test3() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite + " test3 ", stat.PASS ); - } else { - stat.addStatus(testSuite + " test3 ", stat.FAIL ); - //System.out.println("FAIL"); - } + System.out.println("-----------------------------------------------"); + System.out.println("app auth : getting connection w/o user/pass"); + System.out.print("Should get a connection : " ); + if ( jmsAuth.test2() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite + " test2 ", stat.PASS ); + } else { + stat.addStatus(testSuite + " test2 ", stat.FAIL ); + //System.out.println("FAIL"); + } - System.out.println("-----------------------------------------------"); - System.out.println("app auth : getting connection w/ correct then wrong user/pass"); - System.out.print("Should get a connection then NOT get a connection : " ); - if ( jmsAuth.test4() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite + " test4 ", stat.PASS ); - } else { - stat.addStatus(testSuite + " test4 ", stat.FAIL ); - //System.out.println("FAIL"); - } + System.out.println("-----------------------------------------------"); + System.out.println("app auth : getting connection w/ wrong user/pass"); + System.out.print("Should NOT get a connection : " ); + if ( jmsAuth.test3() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite + " test3 ", stat.PASS ); + } else { + stat.addStatus(testSuite + " test3 ", stat.FAIL ); + //System.out.println("FAIL"); + } - System.out.println("-----------------------------------------------"); - System.out.println("container auth : getting connection w/o user/pass"); - System.out.print("Should get a connection : " ); - if ( jmsAuth.test5() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite + " test5 ", stat.PASS ); - } else { - stat.addStatus(testSuite + " test5 ", stat.FAIL ); - //System.out.println("FAIL"); - } - - System.out.println("-----------------------------------------------"); - System.out.println("container auth : getting connection w/ user/pass"); - System.out.print("Should get a connection : " ); - if ( jmsAuth.test6() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite + " test6 ", stat.PASS ); - } else { - stat.addStatus(testSuite + " test6 ", stat.FAIL ); - //System.out.println("FAIL"); - } -/* - System.out.println("-----------------------------------------------"); - System.out.println("container auth : getting connection w/ wrong user/pass"); - System.out.print("Should NOT get a connection : " ); - if ( jmsAuth.test7() ) { - //System.out.println("PASS"); - stat.addStatus(testSuite + " jms-test7 ", stat.PASS ); - } else { - stat.addStatus(testSuite + " jms-test7 ", stat.FAIL ); - //System.out.println("FAIL"); - } -*/ - System.out.println("-----------------------------------------------"); + System.out.println("-----------------------------------------------"); + System.out.println("app auth : getting connection w/ correct then wrong user/pass"); + System.out.print("Should get a connection then NOT get a connection : " ); + if ( jmsAuth.test4() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite + " test4 ", stat.PASS ); + } else { + stat.addStatus(testSuite + " test4 ", stat.FAIL ); + //System.out.println("FAIL"); + } + + System.out.println("-----------------------------------------------"); + System.out.println("container auth : getting connection w/o user/pass"); + System.out.print("Should get a connection : " ); + if ( jmsAuth.test5() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite + " test5 ", stat.PASS ); + } else { + stat.addStatus(testSuite + " test5 ", stat.FAIL ); + //System.out.println("FAIL"); + } + + System.out.println("-----------------------------------------------"); + System.out.println("container auth : getting connection w/ user/pass"); + System.out.print("Should get a connection : " ); + if ( jmsAuth.test6() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite + " test6 ", stat.PASS ); + } else { + stat.addStatus(testSuite + " test6 ", stat.FAIL ); + //System.out.println("FAIL"); + } +/* + System.out.println("-----------------------------------------------"); + System.out.println("container auth : getting connection w/ wrong user/pass"); + System.out.print("Should NOT get a connection : " ); + if ( jmsAuth.test7() ) { + //System.out.println("PASS"); + stat.addStatus(testSuite + " jms-test7 ", stat.PASS ); + } else { + stat.addStatus(testSuite + " jms-test7 ", stat.FAIL ); + //System.out.println("FAIL"); + } +*/ + System.out.println("-----------------------------------------------"); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/descriptor/ejb-jar.xml index 8d0dfbc..066b12b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/descriptor/ejb-jar.xml
@@ -35,16 +35,16 @@ <transaction-type>Container</transaction-type> <resource-ref> <res-ref-name>jms/MyQueueConnectionFactory</res-ref-name> - <res-type>jakarta.jms.QueueConnectionFactory</res-type> - <res-auth>Application</res-auth> - </resource-ref> + <res-type>jakarta.jms.QueueConnectionFactory</res-type> + <res-auth>Application</res-auth> + </resource-ref> <resource-ref> <res-ref-name>jms/MyQueueConnectionFactory_CM</res-ref-name> - <res-type>jakarta.jms.QueueConnectionFactory</res-type> - <res-auth>Container</res-auth> - </resource-ref> + <res-type>jakarta.jms.QueueConnectionFactory</res-type> + <res-auth>Container</res-auth> + </resource-ref> </session> - + <entity> <display-name>SimpleBMPEJB</display-name> <ejb-name>SimpleBMPEJB</ejb-name> @@ -71,7 +71,7 @@ <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> </entity> - + </enterprise-beans> <assembly-descriptor> @@ -79,7 +79,7 @@ <container-transaction> <method> <ejb-name>JmsAuthEJB</ejb-name> - <method-name>*</method-name> + <method-name>*</method-name> </method> <trans-attribute>Required</trans-attribute> </container-transaction> @@ -91,6 +91,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/descriptor/sun-ejb-jar.xml index 063367e..c7b6eae 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/descriptor/sun-ejb-jar.xml
@@ -35,10 +35,10 @@ <resource-ref> <res-ref-name>jms/MyQueueConnectionFactory_CM</res-ref-name> <jndi-name>jms/jdbcjmsauth_QCF2</jndi-name> - <default-resource-principal> - <name>guest</name> - <password>guest</password> - </default-resource-principal> + <default-resource-principal> + <name>guest</name> + <password>guest</password> + </default-resource-principal> </resource-ref> </ejb>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/JmsAuth.java b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/JmsAuth.java index 5e1de7c..2b6e1d1 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/JmsAuth.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/JmsAuth.java
@@ -27,5 +27,5 @@ public boolean test5() throws RemoteException; public boolean test6() throws RemoteException; public boolean test7() throws RemoteException; - + }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/JmsAuthBean.java b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/JmsAuthBean.java index 03cd8f4..91b8d52 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/JmsAuthBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/JmsAuthBean.java
@@ -26,25 +26,25 @@ import javax.naming.InitialContext; public class JmsAuthBean implements SessionBean { - + private SessionContext ctxt_; private QueueConnectionFactory qcf_; private QueueConnectionFactory qcf1_; public void ejbCreate() throws CreateException { try { - InitialContext ic = new InitialContext(); - qcf_ = (QueueConnectionFactory) - ic.lookup("java:comp/env/jms/MyQueueConnectionFactory"); - qcf1_ = (QueueConnectionFactory) - ic.lookup("java:comp/env/jms/MyQueueConnectionFactory_CM"); - } catch( Exception e ) { - e.printStackTrace(); - CreateException ce = new CreateException( e.getMessage() ); - ce.initCause( e ); - throw ce; - } - + InitialContext ic = new InitialContext(); + qcf_ = (QueueConnectionFactory) + ic.lookup("java:comp/env/jms/MyQueueConnectionFactory"); + qcf1_ = (QueueConnectionFactory) + ic.lookup("java:comp/env/jms/MyQueueConnectionFactory_CM"); + } catch( Exception e ) { + e.printStackTrace(); + CreateException ce = new CreateException( e.getMessage() ); + ce.initCause( e ); + throw ce; + } + } public void ejbRemove() { @@ -62,189 +62,189 @@ public boolean test1() { //application auth - getConnection w/ user/pass - must pass - boolean passed = true; + boolean passed = true; QueueConnection con = null; - QueueSession session = null; + QueueSession session = null; - try { - con = qcf_.createQueueConnection("guest", "guest"); - session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); - } catch( Exception e ) { - System.out.println("------------jms test 1--------------"); - e.printStackTrace(); - System.out.println("------------------------------------"); - passed = false; - } finally { + try { + con = qcf_.createQueueConnection("guest", "guest"); + session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + } catch( Exception e ) { + System.out.println("------------jms test 1--------------"); + e.printStackTrace(); + System.out.println("------------------------------------"); + passed = false; + } finally { try { - session.close(); + session.close(); con.close(); - - } catch( Exception e ) {} - } - return passed; + } catch( Exception e ) {} + } + + return passed; } public boolean test2() { //application auth - getConnection w/o user/pass - must fail - boolean passed = true; + boolean passed = true; QueueConnection con = null; QueueSession session = null; - try { - con = qcf_.createQueueConnection(); - session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); - } catch( Exception e ) { - System.out.println("------------jms test 2--------------"); - e.printStackTrace(); - System.out.println("------------------------------------"); - passed = false; - } finally { + try { + con = qcf_.createQueueConnection(); + session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + } catch( Exception e ) { + System.out.println("------------jms test 2--------------"); + e.printStackTrace(); + System.out.println("------------------------------------"); + passed = false; + } finally { try { - session.close(); + session.close(); con.close(); } catch( Exception e ) {} - } - - return passed; } - + + return passed; + } + public boolean test3() { //application auth - getConnection w/ wrong user/pass - must fail - boolean passed = false; + boolean passed = false; QueueConnection con = null; QueueSession session = null; - try { - con = qcf_.createQueueConnection("xyz", "xyz"); - session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); - } catch( Exception e ) { - System.out.println("------------jms test 3--------------"); - e.printStackTrace(); - System.out.println("------------------------------------"); - passed = true; - } finally { + try { + con = qcf_.createQueueConnection("xyz", "xyz"); + session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + } catch( Exception e ) { + System.out.println("------------jms test 3--------------"); + e.printStackTrace(); + System.out.println("------------------------------------"); + passed = true; + } finally { try { - session.close(); + session.close(); con.close(); } catch( Exception e ) {} - } + } - return passed; + return passed; } public boolean test4() { - //application auth - getConnection w/ correct user/pass - //and then wrong - must pass - boolean passed = false; + //application auth - getConnection w/ correct user/pass + //and then wrong - must pass + boolean passed = false; QueueConnection con = null; QueueSession session = null; - try { - con = qcf_.createQueueConnection("guest", "guest"); - session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); - } catch( Exception e ) { - System.out.println("------------jms test 4--------------"); - e.printStackTrace(); - System.out.println("------------------------------------"); - return passed; - } finally { + try { + con = qcf_.createQueueConnection("guest", "guest"); + session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + } catch( Exception e ) { + System.out.println("------------jms test 4--------------"); + e.printStackTrace(); + System.out.println("------------------------------------"); + return passed; + } finally { try { - session.close(); + session.close(); con.close(); } catch( Exception e ) {} - } - - try { - con = qcf_.createQueueConnection("xyz", "xyz" ); - session = con.createQueueSession( true, Session.AUTO_ACKNOWLEDGE ); - } catch( Exception e ) { - System.out.println("------------jms test 4--------------"); - e.printStackTrace(); - System.out.println("------------------------------------"); - passed = true; - } finally { - try { - session.close(); - con.close(); - } catch( Exception e ) {} - } - - return passed; + } + + try { + con = qcf_.createQueueConnection("xyz", "xyz" ); + session = con.createQueueSession( true, Session.AUTO_ACKNOWLEDGE ); + } catch( Exception e ) { + System.out.println("------------jms test 4--------------"); + e.printStackTrace(); + System.out.println("------------------------------------"); + passed = true; + } finally { + try { + session.close(); + con.close(); + } catch( Exception e ) {} + } + + return passed; } public boolean test5() { //container auth - getConnection w/o user/pass - must pass - boolean passed = true; + boolean passed = true; QueueConnection con = null; - QueueSession session = null; + QueueSession session = null; - try { - con = qcf1_.createQueueConnection(); - session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); - } catch( Exception e ) { - System.out.println("------------jms test 5--------------"); - e.printStackTrace(); - System.out.println("------------------------------------"); - passed = false; - } finally { + try { + con = qcf1_.createQueueConnection(); + session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + } catch( Exception e ) { + System.out.println("------------jms test 5--------------"); + e.printStackTrace(); + System.out.println("------------------------------------"); + passed = false; + } finally { try { - session.close(); + session.close(); con.close(); - - } catch( Exception e ) {} - } - return passed; + } catch( Exception e ) {} } - + + return passed; + } + public boolean test6() { //container auth - getConnection w/ user/pass - must pass - boolean passed = true; + boolean passed = true; QueueConnection con = null; - QueueSession session = null; + QueueSession session = null; - try { - con = qcf1_.createQueueConnection("guest","guest"); - session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); - } catch( Exception e ) { - System.out.println("------------jms test 6--------------"); - e.printStackTrace(); - System.out.println("------------------------------------"); - passed = false; - } finally { + try { + con = qcf1_.createQueueConnection("guest","guest"); + session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + } catch( Exception e ) { + System.out.println("------------jms test 6--------------"); + e.printStackTrace(); + System.out.println("------------------------------------"); + passed = false; + } finally { try { - session.close(); + session.close(); con.close(); - - } catch( Exception e ) {} - } - return passed; + } catch( Exception e ) {} + } + + return passed; } public boolean test7() { //container auth - getConnection w/ wrong user/pass - must fail - boolean passed = false; + boolean passed = false; QueueConnection con = null; - QueueSession session = null; + QueueSession session = null; - try { - con = qcf1_.createQueueConnection("xyz", "xyz"); - session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); - } catch( Exception e ) { - System.out.println("------------jms test 7--------------"); - e.printStackTrace(); - System.out.println("------------------------------------"); - passed = true; - } finally { + try { + con = qcf1_.createQueueConnection("xyz", "xyz"); + session = con.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + } catch( Exception e ) { + System.out.println("------------jms test 7--------------"); + e.printStackTrace(); + System.out.println("------------------------------------"); + passed = true; + } finally { try { - session.close(); + session.close(); con.close(); - - } catch( Exception e ) {} - } - return passed; + } catch( Exception e ) {} + } + + return passed; } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/SimpleBMP.java b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/SimpleBMP.java index 82e4ac1..cb38cf8 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/SimpleBMP.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/SimpleBMP.java
@@ -29,5 +29,5 @@ public boolean test5() throws RemoteException; public boolean test6() throws RemoteException; public boolean test7() throws RemoteException; - + }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/SimpleBMPBean.java index d1cf55c..8fffa98 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/ejb/SimpleBMPBean.java
@@ -32,196 +32,196 @@ int id; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - ds1 = (DataSource) context.lookup("java:comp/env/DataSource_CM"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + ds1 = (DataSource) context.lookup("java:comp/env/DataSource_CM"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } public boolean test1() { //application auth + user/pwd not specified - should fail - Connection conn = null; - boolean passed = false; - try { - conn = ds.getConnection(); - } catch (Exception e) { - passed = true; + Connection conn = null; + boolean passed = false; + try { + conn = ds.getConnection(); + } catch (Exception e) { + passed = true; System.out.println("----------test1------------"); - e.printStackTrace(); - System.out.println("---------------------------"); - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) { - } - } - } - - return passed; + e.printStackTrace(); + System.out.println("---------------------------"); + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) { + } + } } - + + return passed; + } + public boolean test2() { //application auth + user/pwd specified - should pass - Connection conn = null; - boolean passed = true; - try { - conn = ds.getConnection("DBUSER", "DBPASSWORD"); - } catch (Exception e) { - passed = false; + Connection conn = null; + boolean passed = true; + try { + conn = ds.getConnection("DBUSER", "DBPASSWORD"); + } catch (Exception e) { + passed = false; System.out.println("----------test2------------"); - e.printStackTrace(); - System.out.println("---------------------------"); - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + e.printStackTrace(); + System.out.println("---------------------------"); + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - return passed; + return passed; } public boolean test3() { - //application auth + wrong user/pwd - Connection conn = null; - boolean passed = false; - try { - conn = ds.getConnection("xyz", "xyz" ); - } catch (Exception e) { - passed = true; + //application auth + wrong user/pwd + Connection conn = null; + boolean passed = false; + try { + conn = ds.getConnection("xyz", "xyz" ); + } catch (Exception e) { + passed = true; System.out.println("----------test3------------"); - e.printStackTrace(); - System.out.println("---------------------------"); - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + e.printStackTrace(); + System.out.println("---------------------------"); + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - return passed; + return passed; } public boolean test4() { //application auth + user/pwd specified - right initiall - //wrong the second time - Connection conn = null; - boolean passed = false; + //wrong the second time + Connection conn = null; + boolean passed = false; - try { - conn = ds.getConnection("DBUSER", "DBPASSWORD"); - } catch (Exception e) { + try { + conn = ds.getConnection("DBUSER", "DBPASSWORD"); + } catch (Exception e) { System.out.println("----------test4------------"); - e.printStackTrace(); - System.out.println("---------------------------"); - return false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + e.printStackTrace(); + System.out.println("---------------------------"); + return false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - try { - conn = ds.getConnection("xyz", "xyz" ); - } catch (Exception e) { + try { + conn = ds.getConnection("xyz", "xyz" ); + } catch (Exception e) { System.out.println("----------test4------------"); - e.printStackTrace(); - System.out.println("---------------------------"); - passed = true; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + e.printStackTrace(); + System.out.println("---------------------------"); + passed = true; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - return passed; + return passed; } public boolean test5() { //container auth + user/pwd not specified - should pass - Connection conn = null; - boolean passed = true; - try { - conn = ds1.getConnection(); - } catch (Exception e) { + Connection conn = null; + boolean passed = true; + try { + conn = ds1.getConnection(); + } catch (Exception e) { System.out.println("----------test5------------"); - e.printStackTrace(); - System.out.println("---------------------------"); - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - return passed; + e.printStackTrace(); + System.out.println("---------------------------"); + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } } - + + return passed; + } + public boolean test6() { //container auth + user/pwd specified - should still pass - Connection conn = null; - boolean passed = true; - try { - conn = ds.getConnection("DBUSER", "DBPASSWORD"); - } catch (Exception e) { + Connection conn = null; + boolean passed = true; + try { + conn = ds.getConnection("DBUSER", "DBPASSWORD"); + } catch (Exception e) { System.out.println("----------test6------------"); - e.printStackTrace(); - System.out.println("---------------------------"); - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + e.printStackTrace(); + System.out.println("---------------------------"); + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - return passed; + return passed; } public boolean test7() { //container auth + wrong user/pwd should fail - Connection conn = null; - boolean passed = false; - try { - conn = ds.getConnection("xyz", "xyz" ); - } catch (Exception e) { + Connection conn = null; + boolean passed = false; + try { + conn = ds.getConnection("xyz", "xyz" ); + } catch (Exception e) { System.out.println("----------test7------------"); - e.printStackTrace(); - System.out.println("---------------------------"); - passed = true; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + e.printStackTrace(); + System.out.println("---------------------------"); + passed = true; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - return passed; + return passed; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/jdbcjmsauth/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/build.properties index 5d78233..299559b 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/build.properties
@@ -15,10 +15,10 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-ejb30-persistence-tx_propagation"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="assemble" value="${build.classes.dir}/archive"/> <property name="simple.client" value="com.sun.s1asdev.ejb.ejb30.persistence.tx_propagation.client.Client"/> <property name="test.client" value="Client"/> @@ -26,10 +26,10 @@ <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/build.xml index 2f5304a..406c42b 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/build.xml
@@ -45,7 +45,7 @@ <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"/> @@ -62,7 +62,7 @@ <param name="jdbc.resource.type" value="javax.sql.XADataSource"/> <param name="jdbc.resource.name" value="jdbc/xa"/> </antcall> - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-xa-pool.property.connectionAttributes=;create=true"/> @@ -92,17 +92,17 @@ <target name="build" depends="compile"> <mkdir dir="${assemble.dir}/lib"/> - <jar destfile="${assemble.dir}/lib/${appname}-lib.jar" + <jar destfile="${assemble.dir}/lib/${appname}-lib.jar" basedir="${build.classes.dir}" includes="**/Person.class"> - </jar> + </jar> <jar destfile="${assemble.dir}/lib/${appname}-par1.jar"> <metainf file="descriptor/persistence.xml"/> </jar> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/Sful*.class"/> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/Client.class,**/Sful.class"/> </antcall> <jar destfile="${assemble.dir}/${appname}App.ear" update="yes" @@ -110,9 +110,9 @@ includes="lib/${appname}-lib.jar, lib/${appname}-par1.jar"> </jar> - </target> - - <target name="deploy" + </target> + + <target name="deploy" depends="init-common"> <antcall target="deploy-common"/> </target> @@ -121,10 +121,10 @@ <antcall target="runclient-common"/> <!-- <antcall target="runclient-standalone"/>--> </target> - + <target name="undeploy" depends="init-common"> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/client/Client.java index d494fdc..940b19b 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/client/Client.java
@@ -65,7 +65,7 @@ PreparedStatement s = null; try { System.err.println("I am in client"); - + UserTransaction utx = (UserTransaction)(new javax.naming.InitialContext()).lookup("java:comp/UserTransaction"); ds = (DataSource)(new javax.naming.InitialContext()).lookup("java:app/jdbc/xa"); @@ -79,7 +79,7 @@ utx.begin(); System.err.println("utx.begin called "); - + connection = ds.getConnection(); s = connection.prepareStatement("insert into EJB30_PERSISTENCE_EEM_INJECTION_PERSON values('1', '1')"); s.execute(); @@ -95,7 +95,7 @@ utx.rollback(); System.err.println("utx.rollback called "); } - + Iterator<String> iter = map.keySet().iterator(); while (iter.hasNext()) { String testName = iter.next(); @@ -126,7 +126,7 @@ } - return; + return; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/Person.java b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/Person.java index 14358ff..952cbec 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/Person.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/Person.java
@@ -45,7 +45,7 @@ this.data = data; } - @Override + @Override public String toString() { return "Person: (name=" + name + "; data= " + data + ")"; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulBean.java b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulBean.java index a8b68a3..b415c3f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulBean.java
@@ -45,25 +45,25 @@ ) @Stateful -@EJB(name="ejb/SfulBean", +@EJB(name="ejb/SfulBean", beanInterface=com.sun.s1asdev.ejb.ejb30.persistence.tx_propagation.SfulDelegate.class) public class SfulBean implements Sful { private String name; - + private @EJB SfulDelegate delegate; - + private @PersistenceContext(unitName="lib/ejb-ejb30-persistence-tx_propagation-par1.jar#em", - type=PersistenceContextType.EXTENDED) + type=PersistenceContextType.EXTENDED) EntityManager extendedEM; - + public void setName(String name) { this.name = name; try { String lookupName = "java:comp/env/ejb/SfulBean"; - + InitialContext initCtx = new InitialContext(); delegate = (SfulDelegate) initCtx.lookup(lookupName); } catch (Exception ex) { @@ -73,7 +73,7 @@ public Map<String, Boolean> doTests() { Person person = new Person(name); - + String delegateName = "delgname_" + name; String delegateData= "delgdata: " + name; delegate.create(delegateName, delegateData); @@ -82,8 +82,8 @@ extendedEM.persist(person); Person foundPerson = delegate.find(name); - - + + Map<String, Boolean> map = new HashMap<String, Boolean>(); map.put("findDelegateCreatedPerson", (dPerson != null)); map.put("delegateFoundMe", (foundPerson != null)); @@ -111,5 +111,5 @@ } return removed; } - + }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulDelegate.java b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulDelegate.java index 62d2097..337a43f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulDelegate.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulDelegate.java
@@ -28,7 +28,7 @@ Person find(String name); boolean remove(String name); - + EntityManager getEM(); }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulDelegateBean.java b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulDelegateBean.java index 8a96e20..f7a7aad 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulDelegateBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/ejb/SfulDelegateBean.java
@@ -37,12 +37,12 @@ public EntityManager getEM() { return extendedEM; } - + public Person create(String name, String data) { Person p = new Person(name); p.setData(data); - + extendedEM.persist(p); return p; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/sql/create.sql b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/sql/create.sql index fa60742..c0ab43f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/sql/create.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/sql/create.sql
@@ -1,4 +1,4 @@ -CREATE TABLE EJB30_PERSISTENCE_EEM_INJECTION_PERSON ( - NAME VARCHAR(256) NOT NULL PRIMARY KEY, - DATA VARCHAR(256) -); +CREATE TABLE EJB30_PERSISTENCE_EEM_INJECTION_PERSON ( + NAME VARCHAR(256) NOT NULL PRIMARY KEY, + DATA VARCHAR(256) +);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/sql/drop.sql b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/sql/drop.sql index 5eb136f..d012c69 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/sql/drop.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/jpa-dsd/sql/drop.sql
@@ -1 +1 @@ -DROP TABLE EJB30_PERSISTENCE_EEM_INJECTION_PERSON; +DROP TABLE EJB30_PERSISTENCE_EEM_INJECTION_PERSON;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/build.properties index f4ebfb9..f5b4c0b 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-lazyassoc"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/build.xml index 16c3abc..b311459 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/build.xml
@@ -36,7 +36,7 @@ <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"/> @@ -48,20 +48,20 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> - + <antcall target="deploy-jdbc-common"/> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.lazy-connection-enlistment=true"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.lazy-connection-enlistment=true"/> </antcall> <antcall target="asadmin-common"> @@ -71,24 +71,24 @@ <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> - + <antcall target="undeploy-common"/> <antcall target="undeploy-jdbc-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/client/Client.java index 6c737a4..03bd7f1 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/client/Client.java
@@ -25,27 +25,27 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "LazyAssoc "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "LazyAssoc "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); - stat.addDescription("Running lazyassoc testSuite1 "); + stat.addDescription("Running lazyassoc testSuite1 "); SimpleSession simpleSession = simpleSessionHome.create(); - + boolean passed = true; for( int i = 0; i < 50;i++ ) { try { if ( simpleSession.test1() == false ) { passed = false; break; - } + } } catch( Exception e ) { passed = false; break; @@ -63,7 +63,7 @@ if ( simpleSession.test2() == false ) { passed = false; break; - } + } } catch( Exception e ) { passed = false; break; @@ -74,6 +74,6 @@ } else { stat.addStatus( testSuite + " test2 : ", stat.FAIL ); } - stat.printSummary(); + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/descriptor/ejb-jar.xml index a0fb740..808d3a9 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/descriptor/ejb-jar.xml
@@ -52,6 +52,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/ejb/SimpleSessionBean.java index 58ac355..cc054b1 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/ejb/SimpleSessionBean.java
@@ -27,54 +27,54 @@ { private SessionContext ctxt_; - private InitialContext ic_; + private InitialContext ic_; private DataSource ds; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); - ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + try { + ic_ = new InitialContext(); + ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { } public boolean test1() throws Exception { - Connection conn1 = null; - boolean passed = false; - //clean the database - try { - conn1 = ds.getConnection(); - } catch( Exception e) { - e.printStackTrace(); - return false; + Connection conn1 = null; + boolean passed = false; + //clean the database + try { + conn1 = ds.getConnection(); + } catch( Exception e) { + e.printStackTrace(); + return false; } - - return true; + + return true; } public boolean test2() throws Exception { - Connection conn1 = null; + Connection conn1 = null; Statement stmt = null; - boolean passed = false; - //clean the database - try { - conn1 = ds.getConnection(); + boolean passed = false; + //clean the database + try { + conn1 = ds.getConnection(); stmt = conn1.createStatement(); stmt.executeQuery( "SELECT * FROM TXLEVELSWITCH"); - } catch( Exception e) { - e.printStackTrace(); - return false; - } finally { + } catch( Exception e) { + e.printStackTrace(); + return false; + } finally { if (stmt != null ) { try { stmt.close(); }catch( Exception e ) {} } } - - return true; + + return true; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/sql/create_pointbase.sql index b227cac..42d5a16 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/sql/create_pointbase.sql
@@ -1,9 +1,9 @@ -Drop table TXLEVELSWITCH; - -CREATE TABLE TXLEVELSWITCH ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO TXLEVELSWITCH VALUES(1, 'wxyz'); -INSERT INTO TXLEVELSWITCH VALUES(2, 'pqrs'); +Drop table TXLEVELSWITCH; + +CREATE TABLE TXLEVELSWITCH ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO TXLEVELSWITCH VALUES(1, 'wxyz'); +INSERT INTO TXLEVELSWITCH VALUES(2, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/sql/drop_pointbase.sql index 0c1242f..d11a115 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/lazyassoc/sql/drop_pointbase.sql
@@ -1,2 +1,2 @@ -Drop table TXLEVELSWITCH; -Drop table TXLEVELSWITCH2; +Drop table TXLEVELSWITCH; +Drop table TXLEVELSWITCH2;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/build.properties index d26b1b4..8892c44 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-markconnectionasbad.local"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/ejb/SimpleBMP.java b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/ejb/SimpleBMP.java index 5f72871..274cf1f 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/ejb/SimpleBMP.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/ejb/SimpleBMP.java
@@ -29,6 +29,6 @@ public boolean test3() throws RemoteException; public boolean test4() throws RemoteException; - + public boolean test5(int count, boolean expectSuccess) throws RemoteException; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/ejb/SimpleBMPBean.java index 8619ce3..ceb7e45 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/ejb/SimpleBMPBean.java
@@ -207,7 +207,7 @@ Statement stmt = conns[i].createStatement(); stmt.executeUpdate("insert into o_customer values (" + i + ",'a')"); } - } catch (Exception e) { + } catch (Exception e) { if(expectSuccess){ passed = false; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.local/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/build.properties index af24daf..20bc85d 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-markconnectionasbad.xa"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/client/Client.java index 5ddf549..8be8a2e 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/client/Client.java
@@ -117,14 +117,14 @@ stat.addStatus(" Mark-Connection-As-Bad [Local-XA -Shareable-Shareable - Read-Write] : ", stat.FAIL); } - if (simpleBMP.test11() && getMonitorablePropertyOfConnectionPool("jdbc-shareable-pool") == 15 && + if (simpleBMP.test11() && getMonitorablePropertyOfConnectionPool("jdbc-shareable-pool") == 15 && getMonitorablePropertyOfConnectionPool("jdbc-local-pool") == 3) { stat.addStatus(" Mark-Connection-As-Bad [Local-XA -Shareable-Shareable - Read-Read] : ", stat.PASS); } else { stat.addStatus(" Mark-Connection-As-Bad [Local-XA -Shareable-Shareable - Read-Read] : ", stat.FAIL); } - if (simpleBMP.test12() && getMonitorablePropertyOfConnectionPool("jdbc-shareable-pool") == 16 && + if (simpleBMP.test12() && getMonitorablePropertyOfConnectionPool("jdbc-shareable-pool") == 16 && getMonitorablePropertyOfConnectionPool("jdbc-local-pool") == 4) { stat.addStatus(" Mark-Connection-As-Bad [Local-XA -Shareable-Shareable - Write-Read] : ", stat.PASS); } else { @@ -139,18 +139,18 @@ public int getMonitorablePropertyOfConnectionPool(String poolName) throws Exception { - final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; + final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; final JMXServiceURL url = new JMXServiceURL(urlStr); - final JMXConnector jmxConn = JMXConnectorFactory.connect(url); - final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); + final JMXConnector jmxConn = JMXConnectorFactory.connect(url); + final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); ObjectName objectName = new ObjectName("amx:pp=/mon/server-mon[server],type=jdbc-connection-pool-mon,name=resources/" + poolName); - javax.management.openmbean.CompositeDataSupport returnValue = - (javax.management.openmbean.CompositeDataSupport) - connection.getAttribute(objectName, NUM_CON_DESTROYED_COUNT); + javax.management.openmbean.CompositeDataSupport returnValue = + (javax.management.openmbean.CompositeDataSupport) + connection.getAttribute(objectName, NUM_CON_DESTROYED_COUNT); return new Integer(returnValue.get("count").toString()); }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/sql/create_pointbase.sql index 46be39f..6d9a7c4 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/sql/create_pointbase.sql
@@ -1,8 +1,8 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer (id integer , description char(50)); - -drop table owner; - -create table owner ( id integer, description char(50)); - +Drop table O_Customer; + +CREATE TABLE O_Customer (id integer , description char(50)); + +drop table owner; + +create table owner ( id integer, description char(50)); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/sql/drop_pointbase.sql index a5ea2f8..d87d5de 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/markconnectionasbad.xa/sql/drop_pointbase.sql
@@ -1,2 +1,2 @@ -Drop table O_Customer; -drop table owner; +Drop table O_Customer; +drop table owner;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/build.properties index b3df7fd..dda80dc 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-maxconnectionusage"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/client/Client.java index f85bb19..b626af4 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/client/Client.java
@@ -67,7 +67,7 @@ //Commented as this test is not valid. //physical connection (ds.getConnection(conn)) will be different each time. - + /*useXA = true; status = connectionSharingTest(simpleBMP, useXA, 12221);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/sql/create_pointbase.sql index 51b0735..396c566 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table max_connection_usage; - -CREATE TABLE max_connection_usage ( - id integer not null, - value char(16) -); - +Drop table max_connection_usage; + +CREATE TABLE max_connection_usage ( + id integer not null, + value char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/sql/drop_pointbase.sql index 4e577a3..b3c8b97 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/maxconnectionusage/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table max_connection_usage; +Drop table max_connection_usage;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/build.properties index 6bae31b..f0c28bd 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-multiplecloseconnection"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/sql/create_pointbase.sql index b227cac..42d5a16 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/sql/create_pointbase.sql
@@ -1,9 +1,9 @@ -Drop table TXLEVELSWITCH; - -CREATE TABLE TXLEVELSWITCH ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO TXLEVELSWITCH VALUES(1, 'wxyz'); -INSERT INTO TXLEVELSWITCH VALUES(2, 'pqrs'); +Drop table TXLEVELSWITCH; + +CREATE TABLE TXLEVELSWITCH ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO TXLEVELSWITCH VALUES(1, 'wxyz'); +INSERT INTO TXLEVELSWITCH VALUES(2, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/sql/drop_pointbase.sql index 0c1242f..d11a115 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/multiplecloseconnection/sql/drop_pointbase.sql
@@ -1,2 +1,2 @@ -Drop table TXLEVELSWITCH; -Drop table TXLEVELSWITCH2; +Drop table TXLEVELSWITCH; +Drop table TXLEVELSWITCH2;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/multipleusercredentials/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/multipleusercredentials/build.properties index fc48ac9..16136dc 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/multipleusercredentials/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/multipleusercredentials/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-multipleusercredentials"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/multipleusercredentials/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/multipleusercredentials/sql/create_pointbase.sql index 87073ca..a71dd8a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/multipleusercredentials/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/multipleusercredentials/sql/create_pointbase.sql
@@ -1,8 +1,8 @@ -CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY( - 'derby.user.derby', - 'derby') ; - -CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY( - 'derby.user.javadb', - 'javadb') ; - +CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY( + 'derby.user.derby', + 'derby') ; + +CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY( + 'derby.user.javadb', + 'javadb') ; +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/nonacc/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/nonacc/build.xml index 523477d..1a40e07 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/nonacc/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/nonacc/build.xml
@@ -24,7 +24,7 @@ ]> <project name="nonacc" basedir="." default="usage"> - + &commonSetup; &commonBuild; &testProperties; @@ -60,24 +60,24 @@ <antcall target="setup-sql"/> <java classname="com.sun.s1asdev.jdbc.nonacc.SimpleJdbcClient" fork="true"> <arg value="jdbc/nonacc"/> - + <sysproperty key="org.omg.CORBA.ORBInitialHost" value="localhost"/> <sysproperty key="org.omg.CORBA.ORBInitialPort" value="3700"/> - + <classpath> <pathelement location="${build.classes.dir}"/> <!-- <pathelement path="${s1astest.classpath}"/>--> -<!-- <pathelement location="${env.S1AS_HOME}/lib/install/applications/jmsra/imqjmsra.jar"/>--> - <pathelement location="${env.S1AS_HOME}/lib/gf-client.jar"/> +<!-- <pathelement location="${env.S1AS_HOME}/lib/install/applications/jmsra/imqjmsra.jar"/>--> + <pathelement location="${env.S1AS_HOME}/lib/gf-client.jar"/> <pathelement location="${assemble.dir}"/> <pathelement location="${env.APS_HOME}/lib/reporter.jar"/> </classpath> </java> </target> - + <target name="usage"> </target> - + <target name="setup-sql" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create.sql"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/nonacc/client/SimpleJdbcClient.java b/appserver/tests/appserv-tests/devtests/jdbc/nonacc/client/SimpleJdbcClient.java index 08f5be0..aaa8045 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/nonacc/client/SimpleJdbcClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/nonacc/client/SimpleJdbcClient.java
@@ -23,7 +23,7 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class SimpleJdbcClient { - + public static void main( String argv[] ) throws Exception { String testSuite = "NonACC "; SimpleReporterAdapter stat = new SimpleReporterAdapter(); @@ -39,7 +39,7 @@ stmt = con.createStatement(); stmt.executeQuery("SELECT * FROM NONACC"); - stat.addStatus(testSuite + "test1 ", stat.PASS ); + stat.addStatus(testSuite + "test1 ", stat.PASS ); } catch( Exception e) { e.printStackTrace(); stat.addStatus(testSuite + "test1 ", stat.FAIL );
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/nonacc/sql/create.sql b/appserver/tests/appserv-tests/devtests/jdbc/nonacc/sql/create.sql index 97d4721..5c33862 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/nonacc/sql/create.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/nonacc/sql/create.sql
@@ -1,5 +1,5 @@ DROP TABLE NONACC; CREATE TABLE NONACC( - name char(20), + name char(20), num integer );
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/build.properties index 1bb00f5..f489b97 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-nopasswdfordb"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/build.xml index 85fa2db..76f5add 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/build.xml
@@ -36,7 +36,7 @@ <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"/> @@ -48,47 +48,47 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> - + <!-- set up non xa pools --> <antcall target="deploy-jdbc-common"/> - + <antcall target="create-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/s1qeDB1"/> </antcall> - + <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-pool"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-nopasswdfordb-pool.property.Password="/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-nopasswdfordb-pool.property.Password="/> </antcall> <antcall target="create-jdbc-resource-common"> - <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-pool"/> + <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-pool"/> <param name="jdbc.resource.name" value="jdbc/s1qeDB2"/> </antcall> - + <!-- Set up XA pools --> <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-xa-pool-1"/> - <param name="jdbc.resource.type" value="javax.sql.XADataSource"/> - <param name="db.class" value="org.apache.derby.jdbc.ClientXADataSource"/> + <param name="jdbc.resource.type" value="javax.sql.XADataSource"/> + <param name="db.class" value="org.apache.derby.jdbc.ClientXADataSource"/> </antcall> - + <antcall target="create-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/s1qeDB-xa"/> <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-xa-pool-1"/> </antcall> - + <antcall target="create-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/s1qeDB1-xa"/> <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-xa-pool-1"/> @@ -96,30 +96,30 @@ <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-xa-pool-2"/> - <param name="jdbc.resource.type" value="javax.sql.XADataSource"/> - <param name="db.class" value="org.apache.derby.jdbc.ClientXADataSource"/> + <param name="jdbc.resource.type" value="javax.sql.XADataSource"/> + <param name="db.class" value="org.apache.derby.jdbc.ClientXADataSource"/> </antcall> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="set"/> - <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-nopasswdfordb-xa-pool-2.property.Password="/> + <param name="operand.props" + value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-nopasswdfordb-xa-pool-2.property.Password="/> </antcall> <antcall target="create-jdbc-resource-common"> - <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-xa-pool-2"/> + <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-xa-pool-2"/> <param name="jdbc.resource.name" value="jdbc/s1qeDB2-xa"/> </antcall> - + <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -128,27 +128,27 @@ <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/s1qeDB1"/> </antcall> - + <antcall target="undeploy-jdbc-common"> - <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-pool"/> + <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-pool"/> <param name="jdbc.resource.name" value="jdbc/s1qeDB2"/> </antcall> - + <antcall target="undeploy-jdbc-common"/> <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/s1qeDB1-xa"/> </antcall> <antcall target="undeploy-jdbc-common"> - <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-xa-pool-1"/> + <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-xa-pool-1"/> <param name="jdbc.resource.name" value="jdbc/s1qeDB-xa"/> </antcall> <antcall target="undeploy-jdbc-common"> - <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-xa-pool-2"/> + <param name="jdbc.conpool.name" value="jdbc-nopasswdfordb-xa-pool-2"/> <param name="jdbc.resource.name" value="jdbc/s1qeDB2-xa"/> </antcall> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/client/Client.java index 9a00929..43eb9ba 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/client/Client.java
@@ -25,58 +25,58 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "NoPasswordforDB "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "NoPasswordforDB "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); System.out.println(" Will fail till Derby gets a better XA driver"); - stat.addDescription("No Password for DB tests"); + stat.addDescription("No Password for DB tests"); SimpleSession simpleSession = simpleSessionHome.create(); - - if (simpleSession.test1() ) { - stat.addStatus( testSuite + " test1 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test1 : " , stat.FAIL ); - } + + if (simpleSession.test1() ) { + stat.addStatus( testSuite + " test1 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test1 : " , stat.FAIL ); + } if (simpleSession.test2() ) { - stat.addStatus( testSuite + " test2 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test2 : " , stat.FAIL ); - } - - if (simpleSession.test3() ) { - stat.addStatus( testSuite + " test3 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test3 : " , stat.FAIL ); - } + stat.addStatus( testSuite + " test2 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test2 : " , stat.FAIL ); + } - if (simpleSession.test4() ) { - stat.addStatus( testSuite + " test4 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test4 : " , stat.FAIL ); - } + if (simpleSession.test3() ) { + stat.addStatus( testSuite + " test3 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test3 : " , stat.FAIL ); + } + + if (simpleSession.test4() ) { + stat.addStatus( testSuite + " test4 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test4 : " , stat.FAIL ); + } if (simpleSession.test5() ) { - stat.addStatus( testSuite + " test5 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test5 : " , stat.FAIL ); - } - - if (simpleSession.test6() ) { - stat.addStatus( testSuite + " test6 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test6 : " , stat.FAIL ); - } + stat.addStatus( testSuite + " test5 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test5 : " , stat.FAIL ); + } - - stat.printSummary(); + if (simpleSession.test6() ) { + stat.addStatus( testSuite + " test6 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test6 : " , stat.FAIL ); + } + + + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/descriptor/ejb-jar.xml index 476881e..9ef4ded 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/descriptor/ejb-jar.xml
@@ -82,6 +82,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/descriptor/sun-ejb-jar.xml index 50cf396..1a8eea4 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/descriptor/sun-ejb-jar.xml
@@ -28,48 +28,48 @@ <resource-ref> <res-ref-name>DataSource</res-ref-name> <jndi-name>jdbc/s1qeDB</jndi-name> - <default-resource-principal> - <name>DBUSER</name> - <password></password> - </default-resource-principal> + <default-resource-principal> + <name>DBUSER</name> + <password></password> + </default-resource-principal> </resource-ref> <resource-ref> <res-ref-name>DataSource1</res-ref-name> <jndi-name>jdbc/s1qeDB1</jndi-name> - <default-resource-principal> - <name>DBUSER</name> - </default-resource-principal> + <default-resource-principal> + <name>DBUSER</name> + </default-resource-principal> </resource-ref> <resource-ref> <res-ref-name>DataSource2</res-ref-name> <jndi-name>jdbc/s1qeDB2</jndi-name> - <default-resource-principal> - <name>DBUSER</name> - <password>DBPASSWORD</password> - </default-resource-principal> + <default-resource-principal> + <name>DBUSER</name> + <password>DBPASSWORD</password> + </default-resource-principal> </resource-ref> <resource-ref> <res-ref-name>XADataSource</res-ref-name> <jndi-name>jdbc/s1qeDB-xa</jndi-name> - <default-resource-principal> - <name>DBUSER</name> - <password></password> - </default-resource-principal> + <default-resource-principal> + <name>DBUSER</name> + <password></password> + </default-resource-principal> </resource-ref> <resource-ref> <res-ref-name>XADataSource1</res-ref-name> <jndi-name>jdbc/s1qeDB1-xa</jndi-name> - <default-resource-principal> - <name>DBUSER</name> - </default-resource-principal> + <default-resource-principal> + <name>DBUSER</name> + </default-resource-principal> </resource-ref> <resource-ref> <res-ref-name>XADataSource2</res-ref-name> <jndi-name>jdbc/s1qeDB2-xa</jndi-name> - <default-resource-principal> - <name>DBUSER</name> - <password>DBPASSWORD</password> - </default-resource-principal> + <default-resource-principal> + <name>DBUSER</name> + <password>DBPASSWORD</password> + </default-resource-principal> </resource-ref> </ejb> </enterprise-beans>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/ejb/SimpleSessionBean.java index c73367e..57bcdf5 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/ejb/SimpleSessionBean.java
@@ -27,14 +27,14 @@ { private SessionContext ctxt_; - private InitialContext ic_; + private InitialContext ic_; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + try { + ic_ = new InitialContext(); + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { @@ -49,61 +49,61 @@ * <password></password> * </default-resource-principal> * </resource-ref> - * + * * Note that the pool still has a valid password set in it */ public boolean test1() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - boolean passed = false; - //clean the database - try { - conn1 = ds.getConnection(); - } catch( Exception e) { - e.printStackTrace(); - return true; - } finally { - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - - return false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + boolean passed = false; + //clean the database + try { + conn1 = ds.getConnection(); + } catch( Exception e) { + e.printStackTrace(); + return true; + } finally { + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } + + return false; } /** - * Lookup a datasource without resource-ref specifying + * Lookup a datasource without resource-ref specifying * password in default-resource-principal * <resource-ref> * <default-resource-principal> * <name>DBUSER</name> * </default-resource-principal> * </resource-ref> - * + * * Note that the pool still has a valid password set in it */ public boolean test2() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource1"); - Connection conn1 = null; - boolean passed = false; - //clean the database - try { - conn1 = ds.getConnection(); - } catch( Exception e) { - e.printStackTrace(); - return true; - } finally { - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - - return false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource1"); + Connection conn1 = null; + boolean passed = false; + //clean the database + try { + conn1 = ds.getConnection(); + } catch( Exception e) { + e.printStackTrace(); + return true; + } finally { + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } + + return false; } /** - * Lookup a datasource with resource-ref specifying + * Lookup a datasource with resource-ref specifying * password in default-resource-principal but no password * in the pool * <resource-ref> @@ -112,27 +112,27 @@ * <password>DBPASSWORD</password> * </default-resource-principal> * </resource-ref> - * + * * Note that the pool has no password set in it */ public boolean test3() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); - Connection conn1 = null; - boolean passed = false; - //clean the database - try { - conn1 = ds.getConnection(); - } catch( Exception e) { - e.printStackTrace(); - return false; - } finally { - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - - return true; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource2"); + Connection conn1 = null; + boolean passed = false; + //clean the database + try { + conn1 = ds.getConnection(); + } catch( Exception e) { + e.printStackTrace(); + return false; + } finally { + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } + + return true; } /** @@ -144,61 +144,61 @@ * <password></password> * </default-resource-principal> * </resource-ref> - * + * * Note that the pool still has a valid password set in it */ public boolean test4() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/XADataSource"); - Connection conn1 = null; - boolean passed = false; - //clean the database - try { - conn1 = ds.getConnection(); - } catch( Exception e) { - e.printStackTrace(); - return true; - } finally { - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - - return false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/XADataSource"); + Connection conn1 = null; + boolean passed = false; + //clean the database + try { + conn1 = ds.getConnection(); + } catch( Exception e) { + e.printStackTrace(); + return true; + } finally { + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } + + return false; } /** - * Lookup a datasource without resource-ref specifying + * Lookup a datasource without resource-ref specifying * password in default-resource-principal * <resource-ref> * <default-resource-principal> * <name>DBUSER</name> * </default-resource-principal> * </resource-ref> - * + * * Note that the pool still has a valid password set in it */ public boolean test5() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/XADataSource1"); - Connection conn1 = null; - boolean passed = false; - //clean the database - try { - conn1 = ds.getConnection(); - } catch( Exception e) { - e.printStackTrace(); - return true; - } finally { - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - - return false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/XADataSource1"); + Connection conn1 = null; + boolean passed = false; + //clean the database + try { + conn1 = ds.getConnection(); + } catch( Exception e) { + e.printStackTrace(); + return true; + } finally { + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } + + return false; } /** - * Lookup a datasource with resource-ref specifying + * Lookup a datasource with resource-ref specifying * password in default-resource-principal but no password * in the pool * <resource-ref> @@ -207,27 +207,27 @@ * <password>DBPASSWORD</password> * </default-resource-principal> * </resource-ref> - * + * * Note that the pool has no password set in it */ public boolean test6() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/XADataSource2"); - Connection conn1 = null; - boolean passed = false; - //clean the database - try { - conn1 = ds.getConnection(); - } catch( Exception e) { - e.printStackTrace(); - return false; - } finally { - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - - return true; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/XADataSource2"); + Connection conn1 = null; + boolean passed = false; + //clean the database + try { + conn1 = ds.getConnection(); + } catch( Exception e) { + e.printStackTrace(); + return false; + } finally { + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } + + return true; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/sql/create_pointbase.sql index b227cac..42d5a16 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/sql/create_pointbase.sql
@@ -1,9 +1,9 @@ -Drop table TXLEVELSWITCH; - -CREATE TABLE TXLEVELSWITCH ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO TXLEVELSWITCH VALUES(1, 'wxyz'); -INSERT INTO TXLEVELSWITCH VALUES(2, 'pqrs'); +Drop table TXLEVELSWITCH; + +CREATE TABLE TXLEVELSWITCH ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO TXLEVELSWITCH VALUES(1, 'wxyz'); +INSERT INTO TXLEVELSWITCH VALUES(2, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/sql/drop_pointbase.sql index 0c1242f..d11a115 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/nopasswdfordb/sql/drop_pointbase.sql
@@ -1,2 +1,2 @@ -Drop table TXLEVELSWITCH; -Drop table TXLEVELSWITCH2; +Drop table TXLEVELSWITCH; +Drop table TXLEVELSWITCH2;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/build.xml index cef436d..c12fa40 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/build.xml
@@ -32,8 +32,8 @@ <fileset dir="." includes="*.output"/> </delete> <record name="notxconn.output" action="start" /> - <ant dir="test1" target="all"/> - <ant dir="test2" target="all"/> + <ant dir="test1" target="all"/> + <ant dir="test2" target="all"/> <record name="notxconn.output" action="stop" /> </target> @@ -49,9 +49,9 @@ </target> <target name="usage"> - <echo> - Usage: - ant all (Executes all the reconfig tests) - </echo> + <echo> + Usage: + ant all (Executes all the reconfig tests) + </echo> </target> </project>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/build.properties index 9aa1445..24d0793 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-notxconn"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/build.xml index c46e388..6efee12 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/build.xml
@@ -32,14 +32,14 @@ &testproperties; &jdbcCommon; &jdbcCommonProps; - - + + <target name="all" depends="clean,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"/> @@ -51,26 +51,26 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="deploy-jdbc-oracle-common"/> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -78,7 +78,7 @@ <antcall target="undeploy-jdbc-oracle-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/descriptor/ejb-jar.xml index b891642..c99937b 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/descriptor/ejb-jar.xml
@@ -49,6 +49,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/descriptor/sun-ejb-jar.xml index 54c6784..0621cfb 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/descriptor/sun-ejb-jar.xml
@@ -28,10 +28,10 @@ <resource-ref> <res-ref-name>DataSource</res-ref-name> <jndi-name>jdbc/oracleres</jndi-name> - <default-resource-principal> - <name>scott</name> - <password>tiger</password> - </default-resource-principal> + <default-resource-principal> + <name>scott</name> + <password>tiger</password> + </default-resource-principal> </resource-ref> </ejb> </enterprise-beans>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/ejb/SimpleSessionBean.java index 6d6a7d1..accbdc1 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/ejb/SimpleSessionBean.java
@@ -56,27 +56,27 @@ ds = (com.sun.appserv.jdbc.DataSource) ic_.lookup("java:comp/env/DataSource"); UserTransaction tx =(UserTransaction)ctxt_.getUserTransaction(); - tx.begin(); + tx.begin(); conn = ds.getConnection(); - noTxConn = ds.getNonTxConnection(); + noTxConn = ds.getNonTxConnection(); stmt = conn.createStatement(); - stmt.executeUpdate("INSERT INTO NOTXCONNTABLE VALUES('method1',3)"); + stmt.executeUpdate("INSERT INTO NOTXCONNTABLE VALUES('method1',3)"); String query1 = "SELECT * FROM NOTXCONNTABLE"; rs = stmt.executeQuery(query1); - stmt2 = noTxConn.createStatement(); + stmt2 = noTxConn.createStatement(); rs2 = stmt2.executeQuery("SELECT * FROM NOTXCONNTABLE"); - + if ( rs2.next() ) { - return false; - } - - tx.commit(); - return true; - + return false; + } + + tx.commit(); + return true; + } catch (Exception e) { - System.out.println("Caught Exception---"); - e.printStackTrace(); - return false; + System.out.println("Caught Exception---"); + e.printStackTrace(); + return false; } finally { if (rs != null ) { try { rs.close(); } catch( Exception e1) {} @@ -87,72 +87,72 @@ if (conn != null ) { try {conn.close();} catch( Exception e1) {} } - + if (rs2 != null ) { try {rs2.close();} catch( Exception e1 ) {} } if (stmt2 != null ) { try {stmt2.close(); } catch( Exception e1) {} } - + if (noTxConn != null ) { try { noTxConn.close(); }catch( Exception e1) {} } - } + } - + } public boolean test2() throws Exception { - Connection conn = null; - Connection noTxConn = null; + Connection conn = null; + Connection noTxConn = null; try { ds = (com.sun.appserv.jdbc.DataSource)ic_.lookup("java:comp/env/DataSource"); UserTransaction tx =(UserTransaction)ctxt_.getUserTransaction(); - tx.begin(); + tx.begin(); System.out.println("Getting TRANSACTIONAL connection"); conn = ds.getConnection(); System.out.println("Autocommit => " + conn.getAutoCommit()); - if (conn.getAutoCommit() == true ) { - return false; - } + if (conn.getAutoCommit() == true ) { + return false; + } - conn.close(); - for (int i = 0; i < 20; i++ ) { - System.out.println("Getting NonTx connection"); - noTxConn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection(); - System.out.println("Autocommit => " + noTxConn.getAutoCommit()); - if (noTxConn.getAutoCommit() == false ) { - return false; - } - noTxConn.close(); - } + conn.close(); + for (int i = 0; i < 20; i++ ) { + System.out.println("Getting NonTx connection"); + noTxConn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection(); + System.out.println("Autocommit => " + noTxConn.getAutoCommit()); + if (noTxConn.getAutoCommit() == false ) { + return false; + } + noTxConn.close(); + } System.out.println("Getting TRANSACTIONAL connection"); conn = ds.getConnection(); System.out.println("Autocommit => " + conn.getAutoCommit()); - if (conn.getAutoCommit() == true ) { - return false; - } - conn.close(); - tx.commit(); + if (conn.getAutoCommit() == true ) { + return false; + } + conn.close(); + tx.commit(); - return true; - + return true; + } catch (Exception e) { - System.out.println("Caught Exception---"); - e.printStackTrace(); - return false; + System.out.println("Caught Exception---"); + e.printStackTrace(); + return false; } finally { - try { - if (noTxConn != null ) { - noTxConn.close(); - } - } catch( Exception e1 ) {} - } + try { + if (noTxConn != null ) { + noTxConn.close(); + } + } catch( Exception e1 ) {} + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/sql/create_pointbase.sql index 00eb96c..2d3d1a2 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/sql/create_pointbase.sql
@@ -1,5 +1,5 @@ -DROP TABLE NOTXCONNTABLE; -CREATE TABLE NOTXCONNTABLE( - name char(20), - num integer -); +DROP TABLE NOTXCONNTABLE; +CREATE TABLE NOTXCONNTABLE( + name char(20), + num integer +);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/sql/drop_pointbase.sql index 03490d0..762a0f6 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test1/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table NOTXCONNTABLE; +Drop table NOTXCONNTABLE;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/build.properties index 9aa1445..24d0793 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-notxconn"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/build.xml index c46e388..6efee12 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/build.xml
@@ -32,14 +32,14 @@ &testproperties; &jdbcCommon; &jdbcCommonProps; - - + + <target name="all" depends="clean,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"/> @@ -51,26 +51,26 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="deploy-jdbc-oracle-common"/> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -78,7 +78,7 @@ <antcall target="undeploy-jdbc-oracle-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/descriptor/ejb-jar.xml index 7d709cd..372a4ca 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/descriptor/ejb-jar.xml
@@ -49,6 +49,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor>--> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/ejb/SimpleSessionBean.java index 61c3b0f..2d2982b 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/ejb/SimpleSessionBean.java
@@ -56,28 +56,28 @@ ds = (com.sun.appserv.jdbc.DataSource) ic_.lookup("java:comp/env/DataSource"); UserTransaction tx =(UserTransaction)ctxt_.getUserTransaction(); - tx.begin(); + tx.begin(); conn = ds.getConnection("scott", "tiger"); stmt = conn.createStatement(); - stmt.executeUpdate("INSERT INTO NOTXCONNTABLE VALUES('method1',3)"); + stmt.executeUpdate("INSERT INTO NOTXCONNTABLE VALUES('method1',3)"); String query1 = "SELECT * FROM NOTXCONNTABLE"; rs = stmt.executeQuery(query1); - noTxConn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection("scott", "tiger"); + noTxConn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection("scott", "tiger"); - stmt2 = noTxConn.createStatement(); + stmt2 = noTxConn.createStatement(); rs2 = stmt2.executeQuery("SELECT * FROM NOTXCONNTABLE"); - tx.commit(); + tx.commit(); if ( rs2.next() ) { - return false; - } - - - return true; - + return false; + } + + + return true; + } catch (Exception e) { - System.out.println("Caught Exception---"); - e.printStackTrace(); - return false; + System.out.println("Caught Exception---"); + e.printStackTrace(); + return false; } finally { if (rs != null ) { try { rs.close(); } catch( Exception e1) {} @@ -88,20 +88,20 @@ if (conn != null ) { try {conn.close();} catch( Exception e1) {} } - + if (rs2 != null ) { try {rs2.close();} catch( Exception e1 ) {} } if (stmt2 != null ) { try {stmt2.close(); } catch( Exception e1) {} } - + if (noTxConn != null ) { try { noTxConn.close(); }catch( Exception e1) {} } - } + } - + } public void ejbLoad() {
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/sql/create_pointbase.sql index 00eb96c..2d3d1a2 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/sql/create_pointbase.sql
@@ -1,5 +1,5 @@ -DROP TABLE NOTXCONNTABLE; -CREATE TABLE NOTXCONNTABLE( - name char(20), - num integer -); +DROP TABLE NOTXCONNTABLE; +CREATE TABLE NOTXCONNTABLE( + name char(20), + num integer +);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/sql/drop_pointbase.sql index 03490d0..762a0f6 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxconn/test2/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table NOTXCONNTABLE; +Drop table NOTXCONNTABLE;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxops/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/notxops/build.properties index 40056f6..8b80794 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxops/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxops/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-notxops"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxops/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/notxops/build.xml index f549f0e..33992f4 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxops/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxops/build.xml
@@ -36,7 +36,7 @@ <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"/> @@ -48,44 +48,44 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-notxops-pool"/> - <param name="jdbc.resource.type" value="javax.sql.XADataSource"/> - <param name="db.class" value="org.apache.derby.jdbc.ClientXADataSource"/> + <param name="jdbc.resource.type" value="javax.sql.XADataSource"/> + <param name="db.class" value="org.apache.derby.jdbc.ClientXADataSource"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-notxops-pool.steady_pool_size=1"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-notxops-pool.steady_pool_size=1"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-notxops-pool.max_pool_size=1"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-notxops-pool.max_pool_size=1"/> </antcall> <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="jdbc-notxops-pool"/> - <param name="jdbc.resource.name" value="jdbc/notxops"/> + <param name="jdbc.resource.name" value="jdbc/notxops"/> </antcall> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -94,13 +94,13 @@ <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/notxops"/> </antcall> - + <antcall target="delete-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-notxops-pool"/> </antcall> - + <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxops/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/notxops/client/Client.java index 39861c5..dacbfa0 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxops/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxops/client/Client.java
@@ -25,28 +25,28 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "NoTxOps "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "NoTxOps "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); - + System.out.println(" Will fail till a better XA driver is integrated with Derby"); - stat.addDescription("Running notxops testSuite1 "); + stat.addDescription("Running notxops testSuite1 "); SimpleSession simpleSession = simpleSessionHome.create(); if (simpleSession.test1() ) { - stat.addStatus( testSuite + " test1 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test1 : " , stat.FAIL ); - } - - - stat.printSummary(); + stat.addStatus( testSuite + " test1 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test1 : " , stat.FAIL ); + } + + + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxops/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/notxops/descriptor/ejb-jar.xml index f207a82..e419afd 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxops/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxops/descriptor/ejb-jar.xml
@@ -62,12 +62,12 @@ <container-transaction> <method> <ejb-name>SimpleSessionEJB</ejb-name> - <method-name>updateDb</method-name> + <method-name>updateDb</method-name> </method> <trans-attribute>RequiresNew</trans-attribute> </container-transaction> --> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxops/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/notxops/ejb/SimpleSessionBean.java index d23d6f5..71db479 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxops/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxops/ejb/SimpleSessionBean.java
@@ -28,14 +28,14 @@ { private SessionContext ctxt_; - private InitialContext ic_; + private InitialContext ic_; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + try { + ic_ = new InitialContext(); + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { @@ -47,55 +47,55 @@ * did not happen */ public boolean test1() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - boolean passed = false; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + boolean passed = false; - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeQuery( "SELECT * FROM NOTXOPS"); - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null) { - try { stmt1.close(); } catch( Exception e1 ) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - - - //Now try getting a connection again, but within a transaction - UserTransaction tx = (UserTransaction) ic_.lookup("java:comp/UserTransaction"); - try { - tx.begin(); - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - rs1 = stmt1.executeQuery("SELECT * FROM NOTXOPS"); - tx.commit(); - } catch (Exception e) { - e.printStackTrace(); - return false; - } finally { - if (rs1 != null ) { - try { rs1.close(); } catch( Exception e1 ) {} - } - if ( stmt1 != null ) { - try { stmt1.close(); } catch( Exception e1) {} - } - if ( conn1 != null ) { - try { conn1.close(); } catch( Exception e1) {} - } - } - - return true; + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeQuery( "SELECT * FROM NOTXOPS"); + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null) { + try { stmt1.close(); } catch( Exception e1 ) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } } - + + + //Now try getting a connection again, but within a transaction + UserTransaction tx = (UserTransaction) ic_.lookup("java:comp/UserTransaction"); + try { + tx.begin(); + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + rs1 = stmt1.executeQuery("SELECT * FROM NOTXOPS"); + tx.commit(); + } catch (Exception e) { + e.printStackTrace(); + return false; + } finally { + if (rs1 != null ) { + try { rs1.close(); } catch( Exception e1 ) {} + } + if ( stmt1 != null ) { + try { stmt1.close(); } catch( Exception e1) {} + } + if ( conn1 != null ) { + try { conn1.close(); } catch( Exception e1) {} + } + } + + return true; + } + public void ejbLoad() {} public void ejbStore() {} public void ejbRemove() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxops/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/notxops/sql/create_pointbase.sql index b1f0337..5d88dff 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxops/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxops/sql/create_pointbase.sql
@@ -1,9 +1,9 @@ -Drop table NOTXOPS; - -CREATE TABLE NOTXOPS ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO NOTXOPS VALUES(1, 'wxyz'); -INSERT INTO NOTXOPS VALUES(2, 'pqrs'); +Drop table NOTXOPS; + +CREATE TABLE NOTXOPS ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO NOTXOPS VALUES(1, 'wxyz'); +INSERT INTO NOTXOPS VALUES(2, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/notxops/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/notxops/sql/drop_pointbase.sql index 223fa1d..762c010 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/notxops/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/notxops/sql/drop_pointbase.sql
@@ -1,2 +1,2 @@ -Drop table NOTXOPS; -Drop table NOTXOPS; +Drop table NOTXOPS; +Drop table NOTXOPS;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/build.properties index 85ad1ee..4062f5a 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-onlygetconnection"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="2000"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/build.xml index 9daedc7..1f779f1 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/build.xml
@@ -32,14 +32,14 @@ &testproperties; &jdbcCommon; &jdbcCommonProps; - + <target name="all" depends="clean,build,deploy,run,undeploy"/> - + <target name="clean" depends="init-common"> <delete dir="${build.classes.dir}"/> <delete dir="${assemble.dir}"/> </target> - + <target name="compile" depends="clean"> <antcall target="compile-common"> <param name="src" value="ejb"/> @@ -66,28 +66,28 @@ <!-- <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-pointbase-pool.property.associatewiththread=true"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-pointbase-pool.property.associatewiththread=true"/> </antcall> --> </target> - - + + <target name="undeploy" depends="init-common"> <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> </target> - - + + <target name="run"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create.sql"/> - </antcall> + </antcall> <antcall target="runclient-common"/> </target> - + <target name="usage"> <antcall target="usage-common"/> </target> - + </project>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/client/Client.java index 24a1084..ce1ce31 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/client/Client.java
@@ -24,7 +24,7 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + private SimpleReporterAdapter stat = new SimpleReporterAdapter(); private String testSuite = "jdbc-onlygetconnection "; private NoTxConnTest bean; @@ -33,22 +33,22 @@ public static void main(String[] args) throws Exception { -// SimpleReporterAdapter stat = new SimpleReporterAdapter(); +// SimpleReporterAdapter stat = new SimpleReporterAdapter(); // // InitialContext ic = new InitialContext(); // Object objRef = ic.lookup("java:comp/env/ejb/NoTxConnTestEJB"); -// NoTxConnTestHome home = (NoTxConnTestHome) +// NoTxConnTestHome home = (NoTxConnTestHome) // javax.rmi.PortableRemoteObject.narrow(objRef, NoTxConnTestHome.class); // // NoTxConnTest bean = home.create(); // if ( bean.test1() ) { -// stat.addStatus(testSuite+" test1 : ", stat.PASS); -// } else { -// stat.addStatus(testSuite+" test1 : ", stat.FAIL); -// } -// stat.printSummary(); - +// stat.addStatus(testSuite+" test1 : ", stat.PASS); +// } else { +// stat.addStatus(testSuite+" test1 : ", stat.FAIL); +// } +// stat.printSummary(); + if ( args.length == 0 ) { (new Client()).runSingleThreaded(); } else { @@ -60,35 +60,35 @@ (new Client()).runMultiThreaded( numRuns ); } } - + } public Client() throws Exception { InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/NoTxConnTestEJB"); - NoTxConnTestHome home = (NoTxConnTestHome) + NoTxConnTestHome home = (NoTxConnTestHome) javax.rmi.PortableRemoteObject.narrow(objRef, NoTxConnTestHome.class); bean = home.create(); } - + public void runSingleThreaded() throws Exception { if ( bean.test1() ) { - stat.addStatus(testSuite+" test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+" test1 : ", stat.FAIL); - } - stat.printSummary(); - + stat.addStatus(testSuite+" test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+" test1 : ", stat.FAIL); + } + stat.printSummary(); + } - + public void runMultiThreaded( int numThreads ) throws Exception { MTClient[] mtc = new MTClient[ numThreads ]; boolean result = true; int failCount = 0; - for ( int i = 0; i < numThreads; i++) { + for ( int i = 0; i < numThreads; i++) { mtc[i] = new MTClient( i ); mtc[i].start(); } @@ -97,15 +97,15 @@ for ( int i = 0; i < numThreads; i++ ) { mtc[i].join(); } - + for ( int i = 0; i < numThreads; i++ ) { result &= mtc[i].result; if ( !mtc[i].result ) { failCount++; } - + } - + System.out.println("Total Threads: " + numThreads ); System.out.println("Total Passed : " + (numThreads - failCount ) ); System.out.println("Total Failed : " + failCount ); @@ -115,7 +115,7 @@ } else { stat.addStatus( testSuite + " multithreaded-test : " , stat.FAIL ); } - + stat.printSummary(); } @@ -126,7 +126,7 @@ MTClient( int id ) { id_ = id; } - + public void run() { try { result = bean.test1();
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/descriptor/sun-ejb-jar.xml index 460f67d..cea59ee 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/descriptor/sun-ejb-jar.xml
@@ -25,11 +25,11 @@ <resource-ref> <res-ref-name>jdbc/onlygetconnection</res-ref-name> <jndi-name>jdbc/s1qeDB</jndi-name> - <default-resource-principal> - <name>dbuser</name> - <password>dbpassword</password> - </default-resource-principal> + <default-resource-principal> + <name>dbuser</name> + <password>dbpassword</password> + </default-resource-principal> </resource-ref> - </ejb> + </ejb> </enterprise-beans> </sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/ejb/NoTxConnTestBean.java b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/ejb/NoTxConnTestBean.java index a5b7c20..0eefa7e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/ejb/NoTxConnTestBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/ejb/NoTxConnTestBean.java
@@ -30,7 +30,7 @@ private EJBContext ejbcontext; private transient jakarta.ejb.SessionContext m_ctx = null; transient javax.sql.DataSource ds; - + public void setSessionContext(jakarta.ejb.SessionContext ctx) { m_ctx = ctx; @@ -45,13 +45,13 @@ public void ejbPassivate() {} public boolean test1() { - Connection conn = null; - Statement stmt = null; - ResultSet rs = null; + Connection conn = null; + Statement stmt = null; + ResultSet rs = null; - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; try { @@ -61,25 +61,25 @@ stmt = conn.createStatement(); String query1 = "SELECT * FROM ONLYGETCONNECTION"; rs = stmt.executeQuery(query1); - + /* rs.close(); - stmt.close(); - conn.close(); - conn1 = ds.getConnection(); + stmt.close(); + conn.close(); + conn1 = ds.getConnection(); stmt1 = conn1.createStatement(); rs1 = stmt1.executeQuery(query1); rs1.close(); - stmt1.close(); - conn1.close(); + stmt1.close(); + conn1.close(); */ - return true; + return true; } catch (Exception e) { - System.out.println("Caught Exception---"); - e.printStackTrace(); - return false; + System.out.println("Caught Exception---"); + e.printStackTrace(); + return false; } finally { if (rs != null ) { try { rs.close(); } catch( Exception e1) {} @@ -90,8 +90,8 @@ if (conn != null ) { try {conn.close();} catch( Exception e1) {} } - - } + + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/sql/create.sql b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/sql/create.sql index c58a6e3..ae9f569 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/sql/create.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/sql/create.sql
@@ -1,5 +1,5 @@ DROP TABLE ONLYGETCONNECTION; CREATE TABLE ONLYGETCONNECTION( - name char(20), + name char(20), num integer );
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/test-validation-reconfig.sh b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/test-validation-reconfig.sh index 06bdfd3..5856d07 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/test-validation-reconfig.sh +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnection/test-validation-reconfig.sh
@@ -18,10 +18,10 @@ echo "S1AS_HOME is => " $S1AS_HOME echo " APS_HOME is =? " $APS_HOME -$S1AS_HOME/lib/ant/bin/ant run +$S1AS_HOME/lib/ant/bin/ant run cd $APS_HOME -gmake stopPB -gmake startPB -cd - -#$S1AS_HOME/bin/asadmin set domain.resources.jdbc-connection-pool.jdbc-pointbase-pool.is_connection_validation_required=true +gmake stopPB +gmake startPB +cd - +#$S1AS_HOME/bin/asadmin set domain.resources.jdbc-connection-pool.jdbc-pointbase-pool.is_connection_validation_required=true $S1AS_HOME/lib/ant/bin/ant run
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/build.properties index c5c6ac1..065ed88 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/build.properties
@@ -15,16 +15,16 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc"/> -<property name="appname" value="${module}-onlygetconnection-servlet"/> +<property name="appname" value="${module}-onlygetconnection-servlet"/> \u0020 <property name="assemble" value="${build.classes.dir}/archive"/> <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="application-client.xml" value="descriptor/application-client.xml"/> <property name="sun-application-client.xml" value="descriptor/sun-application-client.xml"/> -<property name="app.type" value="application"/> +<property name="app.type" value="application"/> \u0020 <property name="web.xml" value="descriptor/web.xml"/> <property name="sun-web.xml" value="descriptor/sun-web.xml"/> <property name="contextroot" value="onlygetconnectionservlet"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/build.xml index a76a572..e66c28f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/build.xml
@@ -34,7 +34,7 @@ <target name="clean" depends="init-common"> <antcall target="clean-common"/> </target> - + <target name="compile" depends="clean"> <antcall target="compile-common"> <param name="src" value="servlet"/> @@ -48,13 +48,13 @@ <property name="hasWebclient" value="yes"/> <antcall target="webclient-war-common"> <param name="hasWebclient" value="yes"/> - <param name="webclient.war.classes" value="**/servlet/*.class"/> + <param name="webclient.war.classes" value="**/servlet/*.class"/> </antcall> <antcall target="appclient-jar-common"/> <antcall target="ear-common"/> - - </target> - + + </target> + <target name="deploy" depends="init-common"> <antcall target="deploy-jdbc-common"> <param name="jdbc.resource.name" value="jdbc/onlygetconnectionservlet"/> @@ -62,15 +62,15 @@ </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-onlygetconnectionservlet-pool.property.associatewiththread=true"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-onlygetconnectionservlet-pool.property.associatewiththread=true"/> </antcall> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create.sql"/> - </antcall> + </antcall> <java classname="com.sun.s1asdev.jdbc.onlygetconnectionservlet.client.Client"> <classpath> @@ -78,17 +78,17 @@ </classpath> </java> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop.sql"/> - </antcall> + </antcall> <antcall target="undeploy-jdbc-common"> <param name="jdbc.resource.name" value="jdbc/onlygetconnectionservlet"/> <param name="jdbc.connpool.name" value="jdbc-onlygetconnectionservlet-pool"/> </antcall> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/client/Client.java index 35d56bd..8151364 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/client/Client.java
@@ -29,19 +29,19 @@ public static void main(String[] args) throws Exception { - - //SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "jdbc-onlygetconnection "; - + + //SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "jdbc-onlygetconnection "; + HttpURLConnection conn =(HttpURLConnection) new URL("http://localhost:8080/" + "onlygetconnectionservlet/onlygetconnectionservlet").openConnection(); /* - InputStream sis = conn.getInputStream(); + InputStream sis = conn.getInputStream(); BufferedReader in = new BufferedReader( new InputStreamReader(sis) ); System.out.println( conn.getResponseMessage() ); String op = null; - System.out.println(" Reading response"); + System.out.println(" Reading response"); while( (op = in.readLine()) != null ) { System.out.println(op); } @@ -49,17 +49,17 @@ Client c = new Client(); c.multiThreadedTest( 40 ); - + /* if ( bean.test1() ) { - stat.addStatus(testSuite+" test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+" test1 : ", stat.FAIL); - } - - stat.printSummary(); + stat.addStatus(testSuite+" test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+" test1 : ", stat.FAIL); + } + + stat.printSummary(); */ - + } public void multiThreadedTest( int numThreads ) throws Exception { @@ -72,11 +72,11 @@ conn =(HttpURLConnection) new URL("http://localhost:8080/" + "onlygetconnectionservlet/onlygetconnectionservlet").openConnection(); - InputStream sis = conn.getInputStream(); + InputStream sis = conn.getInputStream(); BufferedReader in = new BufferedReader( new InputStreamReader(sis) ); System.out.println( conn.getResponseMessage() ); String op = null; - System.out.println(" Reading response"); + System.out.println(" Reading response"); while( (op = in.readLine()) != null ) { //System.out.println(op); }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/servlet/OnlyGetConnectionServlet.java b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/servlet/OnlyGetConnectionServlet.java index 5fc92d9..02fa081 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/servlet/OnlyGetConnectionServlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/servlet/OnlyGetConnectionServlet.java
@@ -26,9 +26,9 @@ /** * Collection of getConnection tests using a servlet - * + * * @author aditya.gore@sun.com - */ + */ public class OnlyGetConnectionServlet extends HttpServlet { @@ -36,10 +36,10 @@ private PrintWriter out; private UserTransaction utx; - public void doGet( HttpServletRequest req, HttpServletResponse resp ) + public void doGet( HttpServletRequest req, HttpServletResponse resp ) throws IOException, ServletException { -System.out.println(" @@@@ in doGet"); +System.out.println(" @@@@ in doGet"); out = resp.getWriter(); writeHeader(); @@ -72,9 +72,9 @@ con = ds.getConnection(); stmt = con.createStatement(); rs = stmt.executeQuery("SELECT * FROM ONLYGETCONNECTION"); - out.println("test1 :: PASSED"); + out.println("test1 :: PASSED"); } catch(Exception e) { - e.printStackTrace( out ); + e.printStackTrace( out ); return; } finally { if ( rs != null ) { try { rs.close(); }catch( Exception e) {} } @@ -92,15 +92,15 @@ utx.begin(); con = ds.getConnection(); try { - Thread.sleep( 5000 ); + Thread.sleep( 5000 ); } catch(Exception e) { } stmt = con.createStatement(); rs = stmt.executeQuery("SELECT * FROM ONLYGETCONNECTION"); utx.commit(); - out.println("test2 :: PASSED"); + out.println("test2 :: PASSED"); } catch(Exception e) { - e.printStackTrace( out ); + e.printStackTrace( out ); return; } finally { if ( rs != null ) { try { rs.close(); }catch( Exception e) {} }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/sql/create.sql b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/sql/create.sql index eb9516e..55cfc02 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/sql/create.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/onlygetconnectionservlet/sql/create.sql
@@ -1,6 +1,6 @@ DROP TABLE ONLYGETCONNECTION; CREATE TABLE ONLYGETCONNECTION( - name char(20), + name char(20), num integer );
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/pooling/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/pooling/build.properties index 40b27a2..837faa9 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/pooling/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/pooling/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-pooling"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/pooling/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/pooling/build.xml index 4acc67b..99c5e9b 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/pooling/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/pooling/build.xml
@@ -36,7 +36,7 @@ <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"/> @@ -48,15 +48,15 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> - + <antcall target="deploy-jdbc-common"> <param name="jdbc.conpool.name" value="jdbc-derby-pool"/> <param name="jdbc.resource.name" value="jdbc/nonxaresource"/> @@ -92,17 +92,17 @@ <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-derby-pool.pooling=false"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-derby-pool.pooling=false"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-derby-pool-container.pooling=false"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-derby-pool-container.pooling=false"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-derby-xa-pool.pooling=false"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-derby-xa-pool.pooling=false"/> </antcall> <antcall target="deploy-common"/> @@ -110,19 +110,19 @@ <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> </target> - + <target name="run" depends="init-common"> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> - + <antcall target="undeploy-common"/> - <antcall target="delete-jdbc-resource-common"> + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/nonxaresource"/> </antcall> @@ -130,7 +130,7 @@ <param name="jdbc.conpool.name" value="jdbc-derby-pool"/> </antcall> - <antcall target="delete-jdbc-resource-common"> + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/nonxaresource-container"/> </antcall> @@ -138,7 +138,7 @@ <param name="jdbc.conpool.name" value="jdbc-derby-pool-container"/> </antcall> - <antcall target="delete-jdbc-resource-common"> + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/xaresource"/> </antcall> @@ -146,7 +146,7 @@ <param name="jdbc.conpool.name" value="jdbc-derby-xa-pool"/> </antcall> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/pooling/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/pooling/client/Client.java index d23ad7b..10e6b6c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/pooling/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/pooling/client/Client.java
@@ -25,7 +25,7 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + private static SimpleReporterAdapter stat = new SimpleReporterAdapter(); private static boolean rollback; private static boolean isXA; @@ -34,32 +34,32 @@ private static InitialContext ic; public static void main(String[] args) throws Exception { - + try { - ic = new InitialContext(); - } catch(NamingException ex) { - ex.printStackTrace(); - } + ic = new InitialContext(); + } catch(NamingException ex) { + ex.printStackTrace(); + } Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); - stat.addDescription("Running pooling testSuite "); + stat.addDescription("Running pooling testSuite "); SimpleSession simpleSession = simpleSessionHome.create(); - + System.out.println("verifying uniqueness of all connection"); if(simpleSession.openAndCloseConnection(40)) { stat.addStatus( testSuite + " openAndCloseConnection (non-xa) : ", stat.PASS ); - } else { + } else { stat.addStatus( testSuite + " openAndCloseConnection (non-xa) : ", stat.PASS ); - } + } System.out.println("creating connection upto max-pool-size of 32"); if(simpleSession.openMaxConnections(32)) { stat.addStatus( testSuite + " openMaxConnections (non-xa) : ", stat.PASS ); - } else { + } else { stat.addStatus( testSuite + " openMaxConnections (non-xa) : ", stat.PASS ); - } + } rollback = false; @@ -72,9 +72,9 @@ stat.printSummary(); } - + private static void runTest(SimpleSession simpleSession, boolean rollback) { - try { + try { //Connection opened and closed within transaction //non-xa resource isXA = false; @@ -91,8 +91,8 @@ } else { stat.addStatus( testSuite + " test1 rollback=" + rollback + " (xa. con opened closed within tx) : ", stat.FAIL ); } - - //Connection opened within transaction + + //Connection opened within transaction //but closed after transaction isXA = false; //non-xa resource @@ -109,16 +109,16 @@ } else { stat.addStatus( testSuite + " test2 rollback=" + rollback + " (xa. con opened closed after tx) : ", stat.FAIL ); } - + //XA and Non-XA resource within same transaction //non-xa resource and xa resource together if ( simpleSession.test3(rollback) ) { stat.addStatus( testSuite + " test3 rollback=" + rollback + " (xa non-xa within same tx) : ", stat.PASS ); } else { stat.addStatus( testSuite + " test3 rollback=" + rollback + " (xa non-xa within same tx) : ", stat.FAIL ); - } - }catch(Exception ex) { - ex.printStackTrace(); - } + } + }catch(Exception ex) { + ex.printStackTrace(); + } } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/pooling/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/pooling/descriptor/ejb-jar.xml index 4794970..96664ea 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/pooling/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/pooling/descriptor/ejb-jar.xml
@@ -64,6 +64,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/pooling/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/pooling/descriptor/sun-ejb-jar.xml index cdb0228..a4ca4b7 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/pooling/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/pooling/descriptor/sun-ejb-jar.xml
@@ -27,15 +27,15 @@ <jndi-name>com.sun.s1asdev.jdbc.pooling.ejb.SimpleSessionHome</jndi-name> <resource-ref> <res-ref-name>DataSource</res-ref-name> - <jndi-name>jdbc/nonxaresource</jndi-name> + <jndi-name>jdbc/nonxaresource</jndi-name> </resource-ref> <resource-ref> <res-ref-name>ContainerDataSource</res-ref-name> - <jndi-name>jdbc/nonxaresource-container</jndi-name> + <jndi-name>jdbc/nonxaresource-container</jndi-name> </resource-ref> <resource-ref> <res-ref-name>XADataSource</res-ref-name> - <jndi-name>jdbc/xaresource</jndi-name> + <jndi-name>jdbc/xaresource</jndi-name> </resource-ref> </ejb> </enterprise-beans>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/pooling/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/pooling/ejb/SimpleSessionBean.java index 8688975..d20dd6d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/pooling/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/pooling/ejb/SimpleSessionBean.java
@@ -34,62 +34,62 @@ private static String tableName = "COFFEE"; private InitialContext ic; private DataSource ds; - private DataSource xads; + private DataSource xads; private DataSource contds; private static boolean isXA=false; public void setSessionContext(SessionContext ctxt) { this.context = ctxt; - try { - ic = new InitialContext(); - ds = (DataSource)ic.lookup("java:comp/env/DataSource"); - xads = (DataSource)ic.lookup("java:comp/env/XADataSource"); - contds = (DataSource) ic.lookup("java:comp/env/ContainerDataSource"); - } catch( Exception ne ) { - ne.printStackTrace(); - } + try { + ic = new InitialContext(); + ds = (DataSource)ic.lookup("java:comp/env/DataSource"); + xads = (DataSource)ic.lookup("java:comp/env/XADataSource"); + contds = (DataSource) ic.lookup("java:comp/env/ContainerDataSource"); + } catch( Exception ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { } public boolean test1(boolean isXa, boolean rollback) { - boolean passed = false; - this.isXA = isXa; - this.rollback = rollback; - DataSource ds = null; - if(isXA) { - ds = this.xads; - } else { - ds = this.ds; - } + boolean passed = false; + this.isXA = isXa; + this.rollback = rollback; + DataSource ds = null; + if(isXA) { + ds = this.xads; + } else { + ds = this.ds; + } UserTransaction ut = null; try { - + createTable(ds); - + int count1 = getCount(ds); System.out.println("count1 : " + count1); - + ut = (UserTransaction) context.getUserTransaction(); ut.begin(); - + for(int i=0; i< count; i++) insertRow(ds); if(rollback) ut.rollback(); else ut.commit(); - + int count2=getCount(ds); - + System.out.println("count2 : " + count2); - + int diff = count2 - count1; if(( diff == count && !rollback) || (diff == 0 && rollback)) passed = true; else passed = false; - + } catch(Exception e){ passed = false; e.printStackTrace(); @@ -105,51 +105,51 @@ } } }; - return passed; - + return passed; + } - + public boolean test2(boolean isXa, boolean rollback) { - boolean passed = false; - this.isXA = isXa; - this.rollback = rollback; - DataSource ds = null; - if(isXA) { - ds = this.xads; - } else { - ds = this.ds; - } + boolean passed = false; + this.isXA = isXa; + this.rollback = rollback; + DataSource ds = null; + if(isXA) { + ds = this.xads; + } else { + ds = this.ds; + } UserTransaction ut = null; try { Connection[] con; createTable(ds); - + int count1 = getCount(ds); System.out.println("count1 : " + count1); - + ut = (UserTransaction) context.getUserTransaction(); ut.begin(); - + con = openConnections(ds, count); insertRow(con); closeConnections(con); - + if(rollback) ut.rollback(); else ut.commit(); - + int count2=getCount(ds); - + System.out.println("count2 : " + count2); - + int diff = count2 - count1; if(( diff == count && !rollback) || (diff == 0 && rollback)) passed = true; else passed = false; - + } catch(Exception e){ passed = false; e.printStackTrace(); @@ -165,52 +165,52 @@ } } } - return passed; + return passed; } public boolean test3(boolean rollback) { - boolean passed = false; - this.rollback = rollback; + boolean passed = false; + this.rollback = rollback; UserTransaction ut = null; - DataSource ds1 = this.ds; - DataSource ds2 = this.xads; + DataSource ds1 = this.ds; + DataSource ds2 = this.xads; try { - + isXA = false; createTable(ds1); isXA = true; createTable(ds2); - + isXA = false; int count1 = getCount(ds1); isXA = true; int count3 = getCount(ds2); System.out.println("count1 : " + count1); System.out.println("count3 : " + count3); - + ut = (UserTransaction) context.getUserTransaction(); ut.begin(); - + isXA = false; for(int i=0; i< count; i++) insertRow(ds1); isXA = true; for(int i=0; i< count; i++) insertRow(ds2); - + if(rollback) ut.rollback(); else ut.commit(); - + isXA = false; int count2=getCount(ds1); isXA = true; int count4=getCount(ds2); - + System.out.println("count2 : " + count2); System.out.println("count4 : " + count4); - + int diff1 = count2 - count1; int diff2 = count4 - count3; if((( diff1 == count && !rollback) || (diff1 == 0 && rollback)) @@ -218,7 +218,7 @@ passed=true; else passed=false; - + } catch(Exception e){ passed=false; e.printStackTrace(); @@ -234,21 +234,21 @@ } } }; - return passed; + return passed; } - + private void createTable(final DataSource ds) throws SQLException { String tableName; if(isXA) tableName = "COFFEE_XA"; else tableName = "COFFEE"; - + Connection con; Statement stmt; con = ds.getConnection("scott", "tiger"); stmt = con.createStatement(); - + try{ stmt.executeUpdate("drop table " + tableName); }catch(Exception ex){ @@ -258,7 +258,7 @@ stmt.close(); con.close(); } - + private int getCount(final DataSource ds) throws SQLException { String tableName; if(isXA) @@ -278,7 +278,7 @@ con.close(); return count; } - + private void insertRow(final DataSource ds) throws SQLException { String tableName; if(isXA) @@ -293,7 +293,7 @@ stmt.close(); con.close(); } - + private void insertRow(final Connection[] con) throws SQLException { String tableName; if(isXA) @@ -304,98 +304,98 @@ for(int i=0; i < con.length; i++){ stmt = con[i].createStatement(); stmt.executeUpdate("INSERT INTO " + tableName + " values ('COFFEE', 100)"); - stmt.close(); + stmt.close(); } } - - + + private void printConnection(final DataSource ds) throws SQLException{ com.sun.appserv.jdbc.DataSource dsTyped = (com.sun.appserv.jdbc.DataSource) ds; Connection wrapper = dsTyped.getConnection("scott", "tiger"); System.out.println("Connection type : " + dsTyped.getConnection(wrapper)); wrapper.close(); } - + public boolean openAndCloseConnection(int count) { - boolean status = true; - DataSource ds = contds; + boolean status = true; + DataSource ds = contds; try { com.sun.appserv.jdbc.DataSource dsTyped = (com.sun.appserv.jdbc.DataSource) ds; - HashSet<String> connections = new HashSet<String>(); + HashSet<String> connections = new HashSet<String>(); Connection con; - String conType; - int i = 0; + String conType; + int i = 0; for(; i < count; i++){ con = ds.getConnection(); - conType = dsTyped.getConnection(con).toString(); - System.out.println("Connection type : " + conType); + conType = dsTyped.getConnection(con).toString(); + System.out.println("Connection type : " + conType); con.close(); - if(!connections.add(conType)){ - status = false; - break; - } + if(!connections.add(conType)){ + status = false; + break; + } } - System.out.println("Total connection requested : " + count); - System.out.println("Total connection created : " + i); - System.out.println("Total number of unique connection : " + connections.size()); + System.out.println("Total connection requested : " + count); + System.out.println("Total connection created : " + i); + System.out.println("Total number of unique connection : " + connections.size()); }catch(Exception ex){ ex.printStackTrace(); } - return status; + return status; } - - public boolean openMaxConnections(int count) { - boolean status = false; - DataSource ds = contds; - Connection[] con = new Connection[count]; - int i = 0; - for(; i < count; i++){ - try{ - con[i] = ds.getConnection(); - }catch(SQLException ex){ - System.out.println("Unable to create max connections"); - status = false; - } - } - if(i == count){ - System.out.println("Able to create max connections"); - status=true; - try{ - ds.getConnection(); - System.out.println("Able to create beyond max connections"); - status=false; - }catch(SQLException ex){ - System.out.println("Unable to create beyond max connections"); - status=true; - } - } - + public boolean openMaxConnections(int count) { + boolean status = false; + DataSource ds = contds; + Connection[] con = new Connection[count]; + int i = 0; + for(; i < count; i++){ + try{ + con[i] = ds.getConnection(); + }catch(SQLException ex){ + System.out.println("Unable to create max connections"); + status = false; + } + } + + if(i == count){ + System.out.println("Able to create max connections"); + status=true; + try{ + ds.getConnection(); + System.out.println("Able to create beyond max connections"); + status=false; + }catch(SQLException ex){ + System.out.println("Unable to create beyond max connections"); + status=true; + } + } + for(; i > 0; i--){ - try{ - con[i - 1].close(); - }catch(SQLException ex){ - System.out.println("Unable to close connection"); - } - } - return status; + try{ + con[i - 1].close(); + }catch(SQLException ex){ + System.out.println("Unable to close connection"); + } + } + return status; } private Connection[] openConnections(DataSource ds, int count) throws NamingException, SQLException { - + Connection[] con = new Connection[count]; for(int i=0; i < count; i++) con[i] = ds.getConnection("scott", "tiger"); - + return con; } - + private void closeConnections(Connection[] con) throws SQLException { for(int i=0; i < count; i++) con[i].close(); } - + public void ejbLoad() {} public void ejbStore() {} public void ejbRemove() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/pooling/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/pooling/sql/create_pointbase.sql index b227cac..42d5a16 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/pooling/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/pooling/sql/create_pointbase.sql
@@ -1,9 +1,9 @@ -Drop table TXLEVELSWITCH; - -CREATE TABLE TXLEVELSWITCH ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO TXLEVELSWITCH VALUES(1, 'wxyz'); -INSERT INTO TXLEVELSWITCH VALUES(2, 'pqrs'); +Drop table TXLEVELSWITCH; + +CREATE TABLE TXLEVELSWITCH ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO TXLEVELSWITCH VALUES(1, 'wxyz'); +INSERT INTO TXLEVELSWITCH VALUES(2, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/pooling/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/pooling/sql/drop_pointbase.sql index 0c1242f..d11a115 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/pooling/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/pooling/sql/drop_pointbase.sql
@@ -1,2 +1,2 @@ -Drop table TXLEVELSWITCH; -Drop table TXLEVELSWITCH2; +Drop table TXLEVELSWITCH; +Drop table TXLEVELSWITCH2;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/build.xml index aff4edd..e13a6d9 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/build.xml
@@ -29,9 +29,9 @@ <target name="all"> <record name="reconfig.output" action="start" /> - <ant dir="maxpoolsize" target="all"/> - <ant dir="poolauth" target="all"/> - <ant dir="poolauth-2" target="all"/> + <ant dir="maxpoolsize" target="all"/> + <ant dir="poolauth" target="all"/> + <ant dir="poolauth-2" target="all"/> <record name="reconfig.output" action="stop" /> </target> @@ -60,9 +60,9 @@ </target> <target name="usage"> - <echo> - Usage: - ant all (Executes all the reconfig tests) - </echo> + <echo> + Usage: + ant all (Executes all the reconfig tests) + </echo> </target> </project>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/build.properties index b096d8c..15f223d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-reconfig-maxpoolsize"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="maxpoolsize-poolName" value="jdbc-maxpoolsize-pool"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/build.xml index e8b2a27..7c765a0 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/build.xml
@@ -27,7 +27,7 @@ ]> <project name="mix" default="usage" basedir="."> - + &commonSetup; &commonBuild; &run; @@ -42,7 +42,7 @@ <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"/> @@ -54,13 +54,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="${maxpoolsize-poolName}"/> @@ -68,32 +68,32 @@ <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="${maxpoolsize-poolName}"/> - <param name="jdbc.resource.name" value="jdbc/maxpoolsize"/> + <param name="jdbc.resource.name" value="jdbc/maxpoolsize"/> </antcall> <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="${maxpoolsize-poolName}-xa"/> - <param name="db.class" value="org.apache.derby.jdbc.ClientXADataSource"/> - <param name="jdbc.resource.type" value="javax.sql.XADataSource"/> + <param name="db.class" value="org.apache.derby.jdbc.ClientXADataSource"/> + <param name="jdbc.resource.type" value="javax.sql.XADataSource"/> </antcall> <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="${maxpoolsize-poolName}-xa"/> - <param name="jdbc.resource.name" value="jdbc/maxpoolsize-xa"/> + <param name="jdbc.resource.name" value="jdbc/maxpoolsize-xa"/> </antcall> <antcall target="deploy-common"/> - </target> - + </target> + <target name="run" depends="init-common"> <!-- set the maxpoolsize to 10 before running --> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}.max_pool_size=10"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}.max_pool_size=10"/> </antcall> <!-- also set the max-wait-time to a smaller value so the tests executes faster --> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}.max_wait_time_in_millis=1000"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}.max_wait_time_in_millis=1000"/> </antcall> <antcall target="runclient-common"> @@ -103,23 +103,23 @@ <!-- set the maxpoolsize to 15 --> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}.max_pool_size=20"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}.max_pool_size=20"/> </antcall> - + <antcall target="runclient-common"> <param name="appclient.application.args" value="2"/> </antcall> - + <!--- XA --> <!-- set the maxpoolsize to 10 before running --> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}-xa.max_pool_size=10"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}-xa.max_pool_size=10"/> </antcall> <!-- also set the max-wait-time to a smaller value so the tests executes faster --> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}-xa.max_wait_time_in_millis=1000"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}-xa.max_wait_time_in_millis=1000"/> </antcall> <antcall target="runclient-common"> @@ -128,7 +128,7 @@ <!-- set the maxpoolsize to 15 --> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}-xa.max_pool_size=20"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${maxpoolsize-poolName}-xa.max_pool_size=20"/> </antcall> <antcall target="runclient-common"> @@ -136,7 +136,7 @@ </antcall> </target> - + <target name="undeploy" depends="init-common"> <antcall target="undeploy-common"/> @@ -147,9 +147,9 @@ <antcall target="undeploy-jdbc-common"> <param name="jdbc.resource.name" value="jdbc/maxpoolsize-xa"/> - <param name="jdbc.conpool.name" value="${maxpoolsize-poolName}-xa"/> + <param name="jdbc.conpool.name" value="${maxpoolsize-poolName}-xa"/> </antcall> - </target> + </target> <target name="usage"> <antcall target="usage-common"/> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/client/Client.java index 645cc18..cfec288 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/client/Client.java
@@ -27,51 +27,51 @@ import java.io.*; public class Client { - + public static void main(String[] argv) throws Exception { - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "ReconfigMaxPoolSize "; + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "ReconfigMaxPoolSize "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - stat.addDescription("Reconfig MaxPoolSize tests"); + stat.addDescription("Reconfig MaxPoolSize tests"); /* - * Tests 1,2 use non-xa pool - so the 3rd param "useXA" is false - * Tests 3,4 use xa pool - so the 3rd param "useXA" is true - */ + * Tests 1,2 use non-xa pool - so the 3rd param "useXA" is false + * Tests 3,4 use xa pool - so the 3rd param "useXA" is true + */ if ("1".equals(argv[0]) ) { if (simpleBMP.test1(10, true, false ) ) { - stat.addStatus(testSuite+" test1 : ", stat.PASS); + stat.addStatus(testSuite+" test1 : ", stat.PASS); } else { - stat.addStatus(testSuite+" test1 : ", stat.FAIL); + stat.addStatus(testSuite+" test1 : ", stat.FAIL); } } else if ("2".equals(argv[0])) { - if (simpleBMP.test1(19, false, false) ) { - stat.addStatus(testSuite+" test2 : ", stat.PASS); + if (simpleBMP.test1(19, false, false) ) { + stat.addStatus(testSuite+" test2 : ", stat.PASS); } else { - stat.addStatus(testSuite+" test2 : ", stat.FAIL); + stat.addStatus(testSuite+" test2 : ", stat.FAIL); } } else if ("3".equals(argv[0])) { - if (simpleBMP.test1(10, false, true) ) { - stat.addStatus(testSuite+" test3 : ", stat.PASS); + if (simpleBMP.test1(10, false, true) ) { + stat.addStatus(testSuite+" test3 : ", stat.PASS); } else { - stat.addStatus(testSuite+" test3 : ", stat.FAIL); + stat.addStatus(testSuite+" test3 : ", stat.FAIL); } } else if ("4".equals(argv[0])) { - if (simpleBMP.test1(19, false, true) ) { - stat.addStatus(testSuite+" test4 : ", stat.PASS); + if (simpleBMP.test1(19, false, true) ) { + stat.addStatus(testSuite+" test4 : ", stat.PASS); } else { - stat.addStatus(testSuite+" test4 : ", stat.FAIL); + stat.addStatus(testSuite+" test4 : ", stat.FAIL); } } - System.out.println("jdbc reconfig-maxpoolsize status: "); - stat.printSummary(); + System.out.println("jdbc reconfig-maxpoolsize status: "); + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/descriptor/ejb-jar.xml index e7d6e88..9d9227e 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/descriptor/ejb-jar.xml
@@ -63,6 +63,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/ejb/SimpleBMP.java b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/ejb/SimpleBMP.java index e2a768d..d5e9fac 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/ejb/SimpleBMP.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/ejb/SimpleBMP.java
@@ -20,6 +20,6 @@ import java.rmi.*; public interface SimpleBMP extends EJBObject { - public boolean test1(int maxPoolSize, boolean expectToPass, boolean useXA ) + public boolean test1(int maxPoolSize, boolean expectToPass, boolean useXA ) throws RemoteException; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/ejb/SimpleBMPBean.java index 2049315..5c9c281 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/maxpoolsize/ejb/SimpleBMPBean.java
@@ -32,10 +32,10 @@ } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } - /** + /** * The basic strategy here is that we try to get 1 more connection * than the maxpoolsize. This single extra getConnection should not * pass. If this happens, the test has passed. @@ -43,56 +43,56 @@ public boolean test1( int maxPoolSize, boolean throwException, boolean useXA ) { try { - InitialContext ic = new InitialContext(); - if ( useXA ) { - ds = (DataSource) ic.lookup("java:comp/env/DataSource_xa"); - } else { - ds = (DataSource) ic.lookup("java:comp/env/DataSource"); - } - } catch( Exception e ) { - e.printStackTrace(); - return false; - } - boolean passed = true; - Connection[] conns = new Connection[maxPoolSize]; + InitialContext ic = new InitialContext(); + if ( useXA ) { + ds = (DataSource) ic.lookup("java:comp/env/DataSource_xa"); + } else { + ds = (DataSource) ic.lookup("java:comp/env/DataSource"); + } + } catch( Exception e ) { + e.printStackTrace(); + return false; + } + boolean passed = true; + Connection[] conns = new Connection[maxPoolSize]; for( int i = 0; i < maxPoolSize; i++ ) { - System.out.println("throwException is : " + throwException ); - try { - System.out.println("########Getting connection : " + i ); - conns[i] = ds.getConnection(); - } catch (Exception e) { - e.printStackTrace(); - return false; - } + System.out.println("throwException is : " + throwException ); + try { + System.out.println("########Getting connection : " + i ); + conns[i] = ds.getConnection(); + } catch (Exception e) { + e.printStackTrace(); + return false; + } - } - //try getting an extra connection - System.out.println("---Try getting extra connection"); - Connection con = null; - try { - con = ds.getConnection(); - } catch( Exception e) { - System.out.print("Caught exception : " ) ; - if ( throwException ) { - System.out.println("Setting passed to true"); - passed = true; + } + //try getting an extra connection + System.out.println("---Try getting extra connection"); + Connection con = null; + try { + con = ds.getConnection(); + } catch( Exception e) { + System.out.print("Caught exception : " ) ; + if ( throwException ) { + System.out.println("Setting passed to true"); + passed = true; } else { - passed = false; - } + passed = false; + } } finally { try { con.close(); } catch ( Exception e ) {} } - - for (int i = 0 ; i < maxPoolSize;i++ ) { - try { - conns[i].close(); - } catch( Exception e) { - //passed = false; - } - } - - return passed; + + for (int i = 0 ; i < maxPoolSize;i++ ) { + try { + conns[i].close(); + } catch( Exception e) { + //passed = false; + } + } + + return passed; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/build.properties index 7d8511f..4724652 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-poolauth"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/build.xml index 8de7b94..48b39d3 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/build.xml
@@ -25,7 +25,7 @@ <project name="mix" default="usage" basedir="."> - + &commonSetup; &commonBuild; &testproperties; @@ -35,7 +35,7 @@ <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"/> @@ -47,54 +47,54 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleSession*.class, **/*Client.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> - + <!-- set up non xa pools --> - + <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-poolauth-pool"/> </antcall> <antcall target="create-jdbc-resource-common"> - <param name="jdbc.conpool.name" value="jdbc-poolauth-pool"/> + <param name="jdbc.conpool.name" value="jdbc-poolauth-pool"/> <param name="jdbc.resource.name" value="jdbc/poolauth"/> </antcall> - - + + <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="create-sql"/> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.User=dbuser"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.User=dbuser"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.Password=dbpassword"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.Password=dbpassword"/> </antcall> <antcall target="runclient-common"> <param name="appclient.application.args" value="1"/> </antcall> - + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.User=pbpublic"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.User=pbpublic"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.Password=pbpublic"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.Password=pbpublic"/> </antcall> <antcall target="asadmin-common"> @@ -112,43 +112,43 @@ <param name="appclient.application.args" value="2"/> </antcall> </target> - + <target name="undeploy" depends="init-common"> - + <antcall target="drop-sql"/> <antcall target="undeploy-jdbc-common"> - <param name="jdbc.conpool.name" value="jdbc-poolauth-pool"/> + <param name="jdbc.conpool.name" value="jdbc-poolauth-pool"/> <param name="jdbc.resource.name" value="jdbc/poolauth"/> </antcall> - + <antcall target="undeploy-common"/> - </target> - + </target> + <target name="create-sql"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_dbuser_tables.sql"/> - <param name="db.user" value="dbuser"/> - <param name="db.pwd" value="dbpassword"/> + <param name="db.user" value="dbuser"/> + <param name="db.pwd" value="dbpassword"/> </antcall> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pbpublic_tables.sql"/> - <param name="db.user" value="pbpublic"/> - <param name="db.pwd" value="pbpublic"/> + <param name="db.user" value="pbpublic"/> + <param name="db.pwd" value="pbpublic"/> </antcall> </target> - - <target name="drop-sql"> + + <target name="drop-sql"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_dbuser_tables.sql"/> - <param name="db.user" value="dbuser"/> - <param name="db.pwd" value="dbpassword"/> + <param name="db.user" value="dbuser"/> + <param name="db.pwd" value="dbpassword"/> </antcall> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pbpublic_tables.sql"/> - <param name="db.user" value="pbpublic"/> - <param name="db.pwd" value="pbpublic"/> + <param name="db.user" value="pbpublic"/> + <param name="db.pwd" value="pbpublic"/> </antcall> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/client/Client.java index 7c4f7a7..ea8eba0 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/client/Client.java
@@ -25,35 +25,35 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "reconfig.poolauth-test1 "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "reconfig.poolauth-test1 "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); - - stat.addDescription("Running reconfig.poolauth testSuite1 "); + + stat.addDescription("Running reconfig.poolauth testSuite1 "); SimpleSession simpleSession = simpleSessionHome.create(); if ( "1".equals(args[0]) ) { - if (simpleSession.test1() ) { - stat.addStatus( testSuite + " test1 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test1 : " , stat.FAIL ); - } + if (simpleSession.test1() ) { + stat.addStatus( testSuite + " test1 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test1 : " , stat.FAIL ); + } } else { if (simpleSession.test2() ) { - stat.addStatus( testSuite + " test2 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test2 : " , stat.FAIL ); - } - } - - stat.printSummary(); + stat.addStatus( testSuite + " test2 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test2 : " , stat.FAIL ); + } + } + + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/descriptor/ejb-jar.xml index eecdd12..20a4463 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/descriptor/ejb-jar.xml
@@ -52,6 +52,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/ejb/SimpleSessionBean.java index 67cd654..c63a299 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/ejb/SimpleSessionBean.java
@@ -31,105 +31,105 @@ private DataSource ds; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); + try { + ic_ = new InitialContext(); ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { } public boolean test1() throws Exception { - //DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Statement stmt1 = null; - boolean passed = false; - //Get a connection with user,password = dbuser,dbpassword - //and access a table that only this principal can - //access - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeQuery("SELECT * FROM DBUSERTABLE"); - } catch( Exception e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null ) { - try { stmt1.close(); } catch(Exception e) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + //DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + Statement stmt1 = null; + boolean passed = false; + //Get a connection with user,password = dbuser,dbpassword + //and access a table that only this principal can + //access + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeQuery("SELECT * FROM DBUSERTABLE"); + } catch( Exception e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null ) { + try { stmt1.close(); } catch(Exception e) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } - //Now try querying a table owned by another principal and - //expect an exception - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeQuery("SELECT * FROM PBPUBLICTABLE"); - } catch( Exception e) { - e.printStackTrace(); - return true; - } finally { - if (stmt1 != null ) { - try { stmt1.close(); } catch(Exception e) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + //Now try querying a table owned by another principal and + //expect an exception + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeQuery("SELECT * FROM PBPUBLICTABLE"); + } catch( Exception e) { + e.printStackTrace(); + return true; + } finally { + if (stmt1 != null ) { + try { stmt1.close(); } catch(Exception e) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } - return false; + return false; } public boolean test2() throws Exception { - //DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Statement stmt1 = null; - boolean passed = false; - //Get a connection with user,password = pbpublic,pbpublic - //and access a table that only this principal can - //access - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeQuery("SELECT * FROM PBPUBLICTABLE"); - } catch( Exception e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null ) { - try { stmt1.close(); } catch(Exception e) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + //DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + Statement stmt1 = null; + boolean passed = false; + //Get a connection with user,password = pbpublic,pbpublic + //and access a table that only this principal can + //access + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeQuery("SELECT * FROM PBPUBLICTABLE"); + } catch( Exception e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null ) { + try { stmt1.close(); } catch(Exception e) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } - //Now try querying a table owned by another principal and - //expect an exception - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeQuery("SELECT * FROM DBUSERTABLE"); - } catch( Exception e) { - e.printStackTrace(); - return true; - } finally { - if (stmt1 != null ) { - try { stmt1.close(); } catch(Exception e) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + //Now try querying a table owned by another principal and + //expect an exception + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeQuery("SELECT * FROM DBUSERTABLE"); + } catch( Exception e) { + e.printStackTrace(); + return true; + } finally { + if (stmt1 != null ) { + try { stmt1.close(); } catch(Exception e) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } - return false; + return false; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/create_dbuser_tables.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/create_dbuser_tables.sql index f91aa17..e64065e 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/create_dbuser_tables.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/create_dbuser_tables.sql
@@ -1,9 +1,9 @@ -Drop table DBUSERTABLE; - -CREATE TABLE DBUSERTABLE ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO DBUSERTABLE VALUES(1, 'wxyz'); -INSERT INTO DBUSERTABLE VALUES(2, 'pqrs'); +Drop table DBUSERTABLE; + +CREATE TABLE DBUSERTABLE ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO DBUSERTABLE VALUES(1, 'wxyz'); +INSERT INTO DBUSERTABLE VALUES(2, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/create_pbpublic_tables.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/create_pbpublic_tables.sql index 79ea72a..379e047 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/create_pbpublic_tables.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/create_pbpublic_tables.sql
@@ -1,9 +1,9 @@ -Drop table PBPUBLICTABLE; - -CREATE TABLE PBPUBLICTABLE ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO PBPUBLICTABLE VALUES(1, 'wxyz'); -INSERT INTO PBPUBLICTABLE VALUES(2, 'pqrs'); +Drop table PBPUBLICTABLE; + +CREATE TABLE PBPUBLICTABLE ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO PBPUBLICTABLE VALUES(1, 'wxyz'); +INSERT INTO PBPUBLICTABLE VALUES(2, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/drop_dbuser_tables.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/drop_dbuser_tables.sql index 255700d..1933064 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/drop_dbuser_tables.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/drop_dbuser_tables.sql
@@ -1 +1 @@ -Drop table DBUSERTABLE; +Drop table DBUSERTABLE;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/drop_pbpublic_tables.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/drop_pbpublic_tables.sql index ff40a19..b023993 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/drop_pbpublic_tables.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth-2/sql/drop_pbpublic_tables.sql
@@ -1 +1 @@ -Drop table PBPUBLICTABLE; +Drop table PBPUBLICTABLE;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/build.properties index 7d8511f..4724652 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-poolauth"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/build.xml index 531c329..2a7672f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/build.xml
@@ -25,7 +25,7 @@ <project name="mix" default="usage" basedir="."> - + &commonSetup; &commonBuild; &testproperties; @@ -35,7 +35,7 @@ <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"/> @@ -47,97 +47,97 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleSession*.class, **/*Client.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> - + <!-- set up non xa pools --> - + <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-poolauth-pool"/> </antcall> <antcall target="create-jdbc-resource-common"> - <param name="jdbc.conpool.name" value="jdbc-poolauth-pool"/> + <param name="jdbc.conpool.name" value="jdbc-poolauth-pool"/> <param name="jdbc.resource.name" value="jdbc/poolauth"/> </antcall> - - + + <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="create-sql"/> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.User=dbuser"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.User=dbuser"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.Password=dbpassword"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.Password=dbpassword"/> </antcall> <antcall target="runclient-common"> <param name="appclient.application.args" value="1"/> </antcall> - + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.User=pbpublic"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.User=pbpublic"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.Password=pbpublic"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-poolauth-pool.property.Password=pbpublic"/> </antcall> - + <antcall target="runclient-common"> <param name="appclient.application.args" value="2"/> </antcall> </target> - + <target name="undeploy" depends="init-common"> - + <antcall target="drop-sql"/> <antcall target="undeploy-jdbc-common"> - <param name="jdbc.conpool.name" value="jdbc-poolauth-pool"/> + <param name="jdbc.conpool.name" value="jdbc-poolauth-pool"/> <param name="jdbc.resource.name" value="jdbc/poolauth"/> </antcall> - + <antcall target="undeploy-common"/> - </target> - + </target> + <target name="create-sql"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_dbuser_tables.sql"/> - <param name="db.user" value="dbuser"/> - <param name="db.pwd" value="dbpassword"/> + <param name="db.user" value="dbuser"/> + <param name="db.pwd" value="dbpassword"/> </antcall> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pbpublic_tables.sql"/> - <param name="db.user" value="pbpublic"/> - <param name="db.pwd" value="pbpublic"/> + <param name="db.user" value="pbpublic"/> + <param name="db.pwd" value="pbpublic"/> </antcall> </target> - - <target name="drop-sql"> + + <target name="drop-sql"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_dbuser_tables.sql"/> - <param name="db.user" value="dbuser"/> - <param name="db.pwd" value="dbpassword"/> + <param name="db.user" value="dbuser"/> + <param name="db.pwd" value="dbpassword"/> </antcall> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pbpublic_tables.sql"/> - <param name="db.user" value="pbpublic"/> - <param name="db.pwd" value="pbpublic"/> + <param name="db.user" value="pbpublic"/> + <param name="db.pwd" value="pbpublic"/> </antcall> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/client/Client.java index 7c4f7a7..ea8eba0 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/client/Client.java
@@ -25,35 +25,35 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "reconfig.poolauth-test1 "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "reconfig.poolauth-test1 "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); - - stat.addDescription("Running reconfig.poolauth testSuite1 "); + + stat.addDescription("Running reconfig.poolauth testSuite1 "); SimpleSession simpleSession = simpleSessionHome.create(); if ( "1".equals(args[0]) ) { - if (simpleSession.test1() ) { - stat.addStatus( testSuite + " test1 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test1 : " , stat.FAIL ); - } + if (simpleSession.test1() ) { + stat.addStatus( testSuite + " test1 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test1 : " , stat.FAIL ); + } } else { if (simpleSession.test2() ) { - stat.addStatus( testSuite + " test2 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test2 : " , stat.FAIL ); - } - } - - stat.printSummary(); + stat.addStatus( testSuite + " test2 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test2 : " , stat.FAIL ); + } + } + + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/descriptor/ejb-jar.xml index eecdd12..20a4463 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/descriptor/ejb-jar.xml
@@ -52,6 +52,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/ejb/SimpleSessionBean.java index 782bdc4..8d16527 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/ejb/SimpleSessionBean.java
@@ -27,107 +27,107 @@ { private SessionContext ctxt_; - private InitialContext ic_; + private InitialContext ic_; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + try { + ic_ = new InitialContext(); + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { } public boolean test1() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Statement stmt1 = null; - boolean passed = false; - //Get a connection with user,password = dbuser,dbpassword - //and access a table that only this principal can - //access - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeQuery("SELECT * FROM DBUSERTABLE"); - } catch( Exception e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null ) { - try { stmt1.close(); } catch(Exception e) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + Statement stmt1 = null; + boolean passed = false; + //Get a connection with user,password = dbuser,dbpassword + //and access a table that only this principal can + //access + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeQuery("SELECT * FROM DBUSERTABLE"); + } catch( Exception e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null ) { + try { stmt1.close(); } catch(Exception e) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } - //Now try querying a table owned by another principal and - //expect an exception - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeQuery("SELECT * FROM PBPUBLICTABLE"); - } catch( Exception e) { - e.printStackTrace(); - return true; - } finally { - if (stmt1 != null ) { - try { stmt1.close(); } catch(Exception e) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + //Now try querying a table owned by another principal and + //expect an exception + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeQuery("SELECT * FROM PBPUBLICTABLE"); + } catch( Exception e) { + e.printStackTrace(); + return true; + } finally { + if (stmt1 != null ) { + try { stmt1.close(); } catch(Exception e) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } - return false; + return false; } public boolean test2() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Statement stmt1 = null; - boolean passed = false; - //Get a connection with user,password = pbpublic,pbpublic - //and access a table that only this principal can - //access - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeQuery("SELECT * FROM PBPUBLICTABLE"); - } catch( Exception e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null ) { - try { stmt1.close(); } catch(Exception e) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + Statement stmt1 = null; + boolean passed = false; + //Get a connection with user,password = pbpublic,pbpublic + //and access a table that only this principal can + //access + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeQuery("SELECT * FROM PBPUBLICTABLE"); + } catch( Exception e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null ) { + try { stmt1.close(); } catch(Exception e) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } - //Now try querying a table owned by another principal and - //expect an exception - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeQuery("SELECT * FROM DBUSERTABLE"); - } catch( Exception e) { - e.printStackTrace(); - return true; - } finally { - if (stmt1 != null ) { - try { stmt1.close(); } catch(Exception e) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } + //Now try querying a table owned by another principal and + //expect an exception + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeQuery("SELECT * FROM DBUSERTABLE"); + } catch( Exception e) { + e.printStackTrace(); + return true; + } finally { + if (stmt1 != null ) { + try { stmt1.close(); } catch(Exception e) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } - return false; + return false; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/create_dbuser_tables.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/create_dbuser_tables.sql index f91aa17..e64065e 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/create_dbuser_tables.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/create_dbuser_tables.sql
@@ -1,9 +1,9 @@ -Drop table DBUSERTABLE; - -CREATE TABLE DBUSERTABLE ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO DBUSERTABLE VALUES(1, 'wxyz'); -INSERT INTO DBUSERTABLE VALUES(2, 'pqrs'); +Drop table DBUSERTABLE; + +CREATE TABLE DBUSERTABLE ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO DBUSERTABLE VALUES(1, 'wxyz'); +INSERT INTO DBUSERTABLE VALUES(2, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/create_pbpublic_tables.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/create_pbpublic_tables.sql index 79ea72a..379e047 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/create_pbpublic_tables.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/create_pbpublic_tables.sql
@@ -1,9 +1,9 @@ -Drop table PBPUBLICTABLE; - -CREATE TABLE PBPUBLICTABLE ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO PBPUBLICTABLE VALUES(1, 'wxyz'); -INSERT INTO PBPUBLICTABLE VALUES(2, 'pqrs'); +Drop table PBPUBLICTABLE; + +CREATE TABLE PBPUBLICTABLE ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO PBPUBLICTABLE VALUES(1, 'wxyz'); +INSERT INTO PBPUBLICTABLE VALUES(2, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/drop_dbuser_tables.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/drop_dbuser_tables.sql index 255700d..1933064 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/drop_dbuser_tables.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/drop_dbuser_tables.sql
@@ -1 +1 @@ -Drop table DBUSERTABLE; +Drop table DBUSERTABLE;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/drop_pbpublic_tables.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/drop_pbpublic_tables.sql index ff40a19..b023993 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/drop_pbpublic_tables.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/poolauth/sql/drop_pbpublic_tables.sql
@@ -1 +1 @@ -Drop table PBPUBLICTABLE; +Drop table PBPUBLICTABLE;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/build.properties index 835fee5..fd16aa3 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-appauth"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="oracle.user.1" value="scott"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/build.xml index d30a398..428395a 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/build.xml
@@ -40,7 +40,7 @@ <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"/> @@ -52,23 +52,23 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-oracle-common"> - <param name="oracle.user" value="${oracle.user.1}"/> - <param name="oracle.password" value="${oracle.password.1}"/> - <param name="sql.file" value="sql/create_pointbase.sql"/> + <param name="oracle.user" value="${oracle.user.1}"/> + <param name="oracle.password" value="${oracle.password.1}"/> + <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="execute-sql-oracle-common"> - <param name="oracle.user" value="${oracle.user.2}"/> - <param name="oracle.password" value="${oracle.password.2}"/> - <param name="sql.file" value="sql/create_pointbase1.sql"/> + <param name="oracle.user" value="${oracle.user.2}"/> + <param name="oracle.password" value="${oracle.password.2}"/> + <param name="sql.file" value="sql/create_pointbase1.sql"/> </antcall> <antcall target="deploy-jdbc-oracle-common"> <param name="oracle.conpool.name" value="jdbc-oracle-pool"/> @@ -76,11 +76,11 @@ </antcall> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -88,12 +88,12 @@ <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/drop_pointbase1.sql"/> </antcall> - <antcall target="undeploy-jdbc-oracle-common"> + <antcall target="undeploy-jdbc-oracle-common"> <param name="oracle.pool.name" value="jdbc-oracle-pool"/> - <param name="oracle.resource.name" value="jdbc/s1qeDB-oracle"/> + <param name="oracle.resource.name" value="jdbc/s1qeDB-oracle"/> </antcall> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/client/SimpleBMPClient.java index 65b2630..8ecf79d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/client/SimpleBMPClient.java
@@ -30,35 +30,35 @@ public static void main(String[] args) throws Exception { - + SimpleReporterAdapter stat = new SimpleReporterAdapter(); String testSuite = "Reconfig User/Pass"; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); stat.addDescription("Reconfig user/pass tests"); SimpleBMP simpleBMP = simpleBMPHome.create(); - - System.out.println("----------------------------"); - System.out.print(" test1: "); - if ( simpleBMP.test1("scott","tiger", "A_Customer") ) { + + System.out.println("----------------------------"); + System.out.print(" test1: "); + if ( simpleBMP.test1("scott","tiger", "A_Customer") ) { stat.addStatus(testSuite + " user1Test : ", stat.PASS); System.out.println("Calling test again"); - if ( simpleBMP.test1("shal", "shal", "B_Customer") ) { - System.out.println("Passed"); - stat.addStatus(testSuite + " user2Test : ", stat.PASS); - } else { - System.out.println("Failed"); + if ( simpleBMP.test1("shal", "shal", "B_Customer") ) { + System.out.println("Passed"); + stat.addStatus(testSuite + " user2Test : ", stat.PASS); + } else { + System.out.println("Failed"); stat.addStatus(testSuite + " user2Test : ", stat.FAIL); - } - - } else { - System.out.println("Failed"); - stat.addStatus(testSuite + " user1Test : ", stat.FAIL); - } - System.out.println("----------------------------"); + } + + } else { + System.out.println("Failed"); + stat.addStatus(testSuite + " user1Test : ", stat.FAIL); + } + System.out.println("----------------------------"); stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/descriptor/ejb-jar.xml index 31ff6d6..cb0ff7b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/descriptor/ejb-jar.xml
@@ -57,6 +57,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/ejb/SimpleBMPBean.java index 3a64bea..c31db0e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/ejb/SimpleBMPBean.java
@@ -32,46 +32,46 @@ int id; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource1"); - } catch (NamingException e) { - e.printStackTrace(); - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource1"); + } catch (NamingException e) { + e.printStackTrace(); + throw new EJBException("cant find datasource"); + } } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } public boolean test1(String user, String password, String tableName) { //access User1's table and push some data then read it out - boolean passed = false; - Connection conn = null; - try { - System.out.println("Called with " + user + ":"+password); - conn = ds.getConnection(user, password); - //conn = ds.getConnection(); - insertData( conn, tableName ); - queryTable( conn, tableName ); - //emptyTable( conn, tableName ); + boolean passed = false; + Connection conn = null; + try { + System.out.println("Called with " + user + ":"+password); + conn = ds.getConnection(user, password); + //conn = ds.getConnection(); + insertData( conn, tableName ); + queryTable( conn, tableName ); + //emptyTable( conn, tableName ); conn.close(); - passed = true; - } catch (Exception e) { - //e.printStackTrace(); - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - return passed; + passed = true; + } catch (Exception e) { + //e.printStackTrace(); + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } } - + + return passed; + } + public void ejbLoad() {} public void ejbStore() {} @@ -82,46 +82,46 @@ public void ejbPostCreate() {} //Insert some arbitrary data into the table - private void insertData( Connection con, String tableName ) + private void insertData( Connection con, String tableName ) throws SQLException { PreparedStatement stmt = con.prepareStatement( - "insert into " + tableName + " values (?, ?)" ); + "insert into " + tableName + " values (?, ?)" ); - for (int i = 0; i < 5; i++ ) { + for (int i = 0; i < 5; i++ ) { stmt.setInt(1, i); - stmt.setString(2, "abcd-"+i); - stmt.executeUpdate(); - } - - stmt.close(); + stmt.setString(2, "abcd-"+i); + stmt.executeUpdate(); } - private void emptyTable( Connection con, String tableName ) + stmt.close(); + } + + private void emptyTable( Connection con, String tableName ) throws SQLException { try { Statement stmt = con.createStatement(); - - stmt.execute("delete * from "+ tableName); - stmt.close(); + + stmt.execute("delete * from "+ tableName); + stmt.close(); } catch( Exception e) { - } - } - private void queryTable( Connection con, String tableName ) + } + + private void queryTable( Connection con, String tableName ) throws SQLException { try { - Statement stmt = con.createStatement(); - ResultSet rs = stmt.executeQuery("select * from "+ tableName); - while( rs.next() ) { - System.out.println( rs ); - } - rs.close(); - } catch( Exception e) { - } + Statement stmt = con.createStatement(); + ResultSet rs = stmt.executeQuery("select * from "+ tableName); + while( rs.next() ) { + System.out.println( rs ); + } + rs.close(); + } catch( Exception e) { + } } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/create_pointbase.sql index be66744..e9406fc 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table A_Customer; - -CREATE TABLE A_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table A_Customer; + +CREATE TABLE A_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/create_pointbase1.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/create_pointbase1.sql index cb74cb4..4253633 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/create_pointbase1.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/create_pointbase1.sql
@@ -1,7 +1,7 @@ -Drop table B_Customer; - -CREATE TABLE B_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table B_Customer; + +CREATE TABLE B_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/drop_pointbase.sql index 0c8171d..6dd688a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table A_Customer; +Drop table A_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/drop_pointbase1.sql b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/drop_pointbase1.sql index fd35fa7..abcaacc 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/drop_pointbase1.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/reconfig/userpass/sql/drop_pointbase1.sql
@@ -1 +1 @@ -Drop table B_Customer; +Drop table B_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/report.xml b/appserver/tests/appserv-tests/devtests/jdbc/report.xml index f56765f..8f75ae4 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/report.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/report.xml
@@ -23,7 +23,7 @@ <target name="report"> <echo message="Comparing results with expected results"/> - + <xslt style="${stylesheet}" in="${xmlfile}" out="${htmlfile}" basedir="." destdir="." />
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/run_test.sh b/appserver/tests/appserv-tests/devtests/jdbc/run_test.sh index c7a3fa0..cb4ae09 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/run_test.sh +++ b/appserver/tests/appserv-tests/devtests/jdbc/run_test.sh
@@ -18,7 +18,7 @@ list_test_ids(){ echo jdbc_all } - + test_run(){ ${S1AS_HOME}/bin/asadmin start-domain domain1 ${S1AS_HOME}/bin/asadmin start-database @@ -38,13 +38,13 @@ generate_junit_report ${1} change_junit_report_class_names } - + get_test_target(){ - case ${1} in - jdbc_all ) - TARGET=all - export TARGET;; - esac + case ${1} in + jdbc_all ) + TARGET=all + export TARGET;; + esac } OPT=${1}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simple/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/simple/build.properties index a78caea..fdd4e36 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simple/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/simple/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-simple"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simple/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/simple/build.xml index 981b347..a32a183 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simple/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/simple/build.xml
@@ -42,7 +42,7 @@ <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"/> @@ -54,13 +54,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -69,14 +69,14 @@ <antcall target="create-persistence-resource-common"/> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -85,7 +85,7 @@ <antcall target="delete-persistence-resource-common"/> <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simple/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/simple/client/SimpleBMPClient.java index 413fe65..4648f91 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simple/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/simple/client/SimpleBMPClient.java
@@ -29,66 +29,66 @@ public static void main(String[] args) throws Exception { - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "jdbcsimple "; + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "jdbcsimple "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - + if ( simpleBMP.test1(10) ) { - stat.addStatus(testSuite+"test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test1 : ", stat.FAIL); - } + stat.addStatus(testSuite+"test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test1 : ", stat.FAIL); + } - if ( simpleBMP.test2() ) { - stat.addStatus(testSuite+"test2 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test2 : ", stat.FAIL); - } - - if ( simpleBMP.test3() ) { - stat.addStatus(testSuite+"test3 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test3 : ", stat.FAIL); - } + if ( simpleBMP.test2() ) { + stat.addStatus(testSuite+"test2 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test2 : ", stat.FAIL); + } - if ( simpleBMP.test4() ) { - stat.addStatus(testSuite+"test4 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test4 : ", stat.FAIL); - } + if ( simpleBMP.test3() ) { + stat.addStatus(testSuite+"test3 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test3 : ", stat.FAIL); + } - if ( simpleBMP.test5() ) { - stat.addStatus(testSuite+"test5 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test5 : ", stat.FAIL); - } + if ( simpleBMP.test4() ) { + stat.addStatus(testSuite+"test4 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test4 : ", stat.FAIL); + } - if ( simpleBMP.test6() ) { - stat.addStatus(testSuite+"test6 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test6 : ", stat.FAIL); - } + if ( simpleBMP.test5() ) { + stat.addStatus(testSuite+"test5 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test5 : ", stat.FAIL); + } - if ( simpleBMP.test7() ) { - stat.addStatus(testSuite+"test7 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test7 : ", stat.FAIL); - } + if ( simpleBMP.test6() ) { + stat.addStatus(testSuite+"test6 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test6 : ", stat.FAIL); + } - if ( simpleBMP.test8() ) { - stat.addStatus(testSuite+"test8 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test8 : ", stat.FAIL); - } + if ( simpleBMP.test7() ) { + stat.addStatus(testSuite+"test7 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test7 : ", stat.FAIL); + } - stat.printSummary(); - - + if ( simpleBMP.test8() ) { + stat.addStatus(testSuite+"test8 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test8 : ", stat.FAIL); + } + + stat.printSummary(); + + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simple/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/simple/descriptor/ejb-jar.xml index e09c276..ffe0509 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simple/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/simple/descriptor/ejb-jar.xml
@@ -57,6 +57,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simple/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/simple/ejb/SimpleBMPBean.java index 0222cd7..5cb9448 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simple/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/simple/ejb/SimpleBMPBean.java
@@ -31,175 +31,175 @@ protected DataSource ds; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } System.out.println("[**SimpleBMPBean**] Done with setEntityContext...."); } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } /* Get 10 connections in a bunch and then close them*/ public boolean test1( int numRuns ) { - boolean passed = true; - Connection[] conns = new Connection[10]; + boolean passed = true; + Connection[] conns = new Connection[10]; for( int i = 0; i < numRuns; i++ ) { - try { - conns[i] = ds.getConnection(); - } catch (Exception e) { - passed = false; - } /*finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } */ + try { + conns[i] = ds.getConnection(); + } catch (Exception e) { + passed = false; + } /*finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } */ } - - for (int i = 0 ; i < numRuns;i++ ) { - try { - conns[i].close(); - } catch( Exception e) { - passed = false; - } - } - return passed; + + for (int i = 0 ; i < numRuns;i++ ) { + try { + conns[i].close(); + } catch( Exception e) { + passed = false; + } + } + return passed; } /* Get a single connection and close it */ public boolean test2() { Connection conn = null; boolean passed = true; - try { - conn = ds.getConnection(); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - return passed; + try { + conn = ds.getConnection(); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } + + return passed; } - - /* Use the getConnection API in the ConnectorRuntime + + /* Use the getConnection API in the ConnectorRuntime * Use a jdbc resource jndi name */ public boolean test3() { - System.out.println("---------------Running test3---------------"); + System.out.println("---------------Running test3---------------"); Connection con = null; - ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - - try { - con = runtime.getConnection( "jdbc/s1qeDB" ); - } catch( SQLException sqle ) { - sqle.printStackTrace(); - return false; - } + ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - return true; + try { + con = runtime.getConnection( "jdbc/s1qeDB" ); + } catch( SQLException sqle ) { + sqle.printStackTrace(); + return false; } - /* Use the getConnection API in the ConnectorRuntime + return true; + } + + /* Use the getConnection API in the ConnectorRuntime * Use a PMF resource */ public boolean test4() { - System.out.println("---------------Running test4-------------"); + System.out.println("---------------Running test4-------------"); Connection con = null; - ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - - try { - con = runtime.getConnection( "jdo/s1qePM" ); - } catch( Exception sqle ) { - sqle.printStackTrace(); - return false; - } + ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - return true; + try { + con = runtime.getConnection( "jdo/s1qePM" ); + } catch( Exception sqle ) { + sqle.printStackTrace(); + return false; } - /* Use the getConnection API in the ConnectorRuntime + return true; + } + + /* Use the getConnection API in the ConnectorRuntime * Use a jdbc resource jndi name */ public boolean test5() { - System.out.println("---------------Running test5---------------"); + System.out.println("---------------Running test5---------------"); Connection con = null; - ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - - try { - con = runtime.getConnection( "jdbc/s1qeDB", "pbpublic", "pbpublic" ); - } catch( Exception sqle ) { - sqle.printStackTrace(); - return false; - } + ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - return true; + try { + con = runtime.getConnection( "jdbc/s1qeDB", "pbpublic", "pbpublic" ); + } catch( Exception sqle ) { + sqle.printStackTrace(); + return false; } - /* Use the getConnection API in the ConnectorRuntime + return true; + } + + /* Use the getConnection API in the ConnectorRuntime * Use a PMF resource */ public boolean test6() { - System.out.println("---------------Running test6-------------"); + System.out.println("---------------Running test6-------------"); Connection con = null; - ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - - try { - con = runtime.getConnection( "jdo/s1qePM", "pbpublic", "pbpublic" ); - } catch( Exception sqle ) { - sqle.printStackTrace(); - return false; - } + ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - return true; + try { + con = runtime.getConnection( "jdo/s1qePM", "pbpublic", "pbpublic" ); + } catch( Exception sqle ) { + sqle.printStackTrace(); + return false; } - /* Use the getConnection API in the ConnectorRuntime + return true; + } + + /* Use the getConnection API in the ConnectorRuntime * Use a jdbc resource jndi name */ public boolean test7() { - System.out.println("---------------Running test7---------------"); + System.out.println("---------------Running test7---------------"); Connection con = null; - ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - - try { - con = runtime.getConnection( "jdbc/notpresent" ); - } catch( Exception sqle ) { - System.out.println("Caught expected exception"); - sqle.printStackTrace(); - return true; - } + ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - return false; + try { + con = runtime.getConnection( "jdbc/notpresent" ); + } catch( Exception sqle ) { + System.out.println("Caught expected exception"); + sqle.printStackTrace(); + return true; } - /* Use the getConnection API in the ConnectorRuntime + return false; + } + + /* Use the getConnection API in the ConnectorRuntime * Use a PMF resource */ public boolean test8() { - System.out.println("---------------Running test8-------------"); + System.out.println("---------------Running test8-------------"); Connection con = null; - ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - - try { - con = runtime.getConnection( "jdo/notpresent" ); - } catch( Exception sqle ) { - System.out.println("Caught expected exception"); - sqle.printStackTrace(); - return true; - } + ConnectorRuntime runtime = ConnectorRuntime.getRuntime(); - return false; + try { + con = runtime.getConnection( "jdo/notpresent" ); + } catch( Exception sqle ) { + System.out.println("Caught expected exception"); + sqle.printStackTrace(); + return true; + } + + return false; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simple/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/simple/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simple/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/simple/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simple/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/simple/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simple/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/simple/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/build.properties index f124eeb..b6841be 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-simplemysql"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/build.xml index 5bdafa6..4d24c89 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/build.xml
@@ -40,7 +40,7 @@ <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"/> @@ -52,13 +52,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-mysql-common"> <param name="sql.file" value="sql/create_mysql.sql"/> @@ -66,14 +66,14 @@ <antcall target="deploy-jdbc-mysql-common"/> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-mysql-common"> <param name="sql.file" value="sql/create_mysql.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-mysql-common"> <param name="sql.file" value="sql/drop_mysql.sql"/> @@ -81,7 +81,7 @@ <antcall target="undeploy-jdbc-mysql-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/client/SimpleBMPClient.java index b2a2a1a..6eb254d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/client/SimpleBMPClient.java
@@ -29,37 +29,37 @@ public static void main(String[] args) throws Exception { - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "jdbcsimplemysql "; + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "jdbcsimplemysql "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simplemysqlBMPHome = (SimpleBMPHome) + SimpleBMPHome simplemysqlBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simplemysqlBMP = simplemysqlBMPHome.create(); if ( simplemysqlBMP.test1(10) ) { - stat.addStatus(testSuite+"test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test1 : ", stat.FAIL); - } + stat.addStatus(testSuite+"test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test1 : ", stat.FAIL); + } - if ( simplemysqlBMP.test2() ) { - stat.addStatus(testSuite+"test2 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test2 : ", stat.FAIL); - } + if ( simplemysqlBMP.test2() ) { + stat.addStatus(testSuite+"test2 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test2 : ", stat.FAIL); + } - if ( simplemysqlBMP.test3() ) { - stat.addStatus(testSuite+"test3 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test3 : ", stat.FAIL); - } + if ( simplemysqlBMP.test3() ) { + stat.addStatus(testSuite+"test3 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test3 : ", stat.FAIL); + } - System.out.println("jdbc simplemysql status: "); - stat.printSummary(); - - + System.out.println("jdbc simplemysql status: "); + stat.printSummary(); + + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/descriptor/ejb-jar.xml index 36623a5..af16c8b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/descriptor/ejb-jar.xml
@@ -57,6 +57,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/ejb/SimpleBMPBean.java index 2556bf7..1270faa 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/ejb/SimpleBMPBean.java
@@ -30,102 +30,102 @@ protected DataSource ds; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } System.out.println("[**SimpleBMPBean**] Done with setEntityContext...."); } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } /* Get 10 connections in a bunch and then close them*/ public boolean test1( int numRuns ) { - boolean passed = true; - Connection[] conns = new Connection[10]; + boolean passed = true; + Connection[] conns = new Connection[10]; for( int i = 0; i < numRuns; i++ ) { - try { - conns[i] = ds.getConnection(); - } catch (Exception e) { - passed = false; - } /*finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } */ + try { + conns[i] = ds.getConnection(); + } catch (Exception e) { + passed = false; + } /*finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } */ } - - for (int i = 0 ; i < numRuns;i++ ) { - try { - conns[i].close(); - } catch( Exception e) { - passed = false; - } - } - return passed; + + for (int i = 0 ; i < numRuns;i++ ) { + try { + conns[i].close(); + } catch( Exception e) { + passed = false; + } + } + return passed; } /* Get a single connection and close it */ public boolean test2() { Connection conn = null; boolean passed = true; - try { - conn = ds.getConnection(); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - return passed; + try { + conn = ds.getConnection(); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } + + return passed; } - + /* Get a single connection and do some DB operations */ public boolean test3() { Connection conn = null; - Statement stmt = null; - ResultSet rs = null; + Statement stmt = null; + ResultSet rs = null; boolean passed = true; - try { - conn = ds.getConnection(); - stmt = conn.createStatement(); - stmt.executeUpdate("INSERT INTO O_CUSTOMER VALUES (0,'abcd')"); - stmt.executeUpdate("INSERT INTO O_CUSTOMER VALUES (1,'pqrs')"); + try { + conn = ds.getConnection(); + stmt = conn.createStatement(); + stmt.executeUpdate("INSERT INTO O_CUSTOMER VALUES (0,'abcd')"); + stmt.executeUpdate("INSERT INTO O_CUSTOMER VALUES (1,'pqrs')"); System.out.println("Inserted values OK"); - rs = stmt.executeQuery("SELECT * FROM O_CUSTOMER"); - while( rs.next() ) { - System.out.println(rs.getInt("c_id")); - System.out.println(rs.getString("c_phone")); - } - - } catch (Exception e) { - passed = false; - e.printStackTrace(); - } finally { - if (rs != null) { - try { rs.close(); }catch( Exception e1) {} - } - if (stmt != null) { - try { stmt.close(); }catch(Exception e1) {} - } - if ( conn != null ) { - try { conn.close(); } catch( Exception e1) {} - } - } - - return passed; + rs = stmt.executeQuery("SELECT * FROM O_CUSTOMER"); + while( rs.next() ) { + System.out.println(rs.getInt("c_id")); + System.out.println(rs.getString("c_phone")); + } + + } catch (Exception e) { + passed = false; + e.printStackTrace(); + } finally { + if (rs != null) { + try { rs.close(); }catch( Exception e1) {} + } + if (stmt != null) { + try { stmt.close(); }catch(Exception e1) {} + } + if ( conn != null ) { + try { conn.close(); } catch( Exception e1) {} + } + } + + return passed; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/sql/create_mysql.sql b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/sql/create_mysql.sql index dd31599..f13ff8b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/sql/create_mysql.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/sql/create_mysql.sql
@@ -1,7 +1,7 @@ -Drop table O_CUSTOMER; - -CREATE TABLE O_CUSTOMER ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_CUSTOMER; + +CREATE TABLE O_CUSTOMER ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/sql/drop_mysql.sql b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/sql/drop_mysql.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/sql/drop_mysql.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/simplemysql/sql/drop_mysql.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/build.properties index 8cdd5ac..50ac500 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-simpleora"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/build.xml index b302dcf..ecdfdac 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/build.xml
@@ -40,7 +40,7 @@ <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"/> @@ -52,13 +52,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="deploy-jdbc-oracle-common"/> @@ -71,14 +71,14 @@ </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> <antcall target="undeploy-jdbc-oracle-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/client/SimpleBMPClient.java index 1d54ecf..7309060 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/client/SimpleBMPClient.java
@@ -29,39 +29,39 @@ public static void main(String[] args) throws Exception { - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "jdbcsimpleora "; + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "jdbcsimpleora "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - stat.addDescription("Simple Oracle test "); + stat.addDescription("Simple Oracle test "); - + if ( simpleBMP.test1(10) ) { - stat.addStatus(testSuite+"test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test1 : ", stat.FAIL); - } - - if ( simpleBMP.test2() ) { - stat.addStatus(testSuite+"test2 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test2 : ", stat.FAIL); - } + stat.addStatus(testSuite+"test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test1 : ", stat.FAIL); + } - if ( simpleBMP.test3() ) { - stat.addStatus(testSuite+"test3 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test3 : ", stat.FAIL); - } + if ( simpleBMP.test2() ) { + stat.addStatus(testSuite+"test2 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test2 : ", stat.FAIL); + } - System.out.println("jdbc simpleora status: "); - stat.printSummary(); - - + if ( simpleBMP.test3() ) { + stat.addStatus(testSuite+"test3 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test3 : ", stat.FAIL); + } + + System.out.println("jdbc simpleora status: "); + stat.printSummary(); + + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/descriptor/ejb-jar.xml index 20d716e..5ac9a4b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/descriptor/ejb-jar.xml
@@ -63,6 +63,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/descriptor/sun-ejb-jar.xml index 6f4a404..f3a4375 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/descriptor/sun-ejb-jar.xml
@@ -27,7 +27,7 @@ <jndi-name>com.sun.s1asdev.jdbc.simpleora.ejb.SimpleBMPHome</jndi-name> <resource-ref> <res-ref-name>DataSource</res-ref-name> - <jndi-name>jdbc/oracleres</jndi-name> + <jndi-name>jdbc/oracleres</jndi-name> <default-resource-principal> <name>scott</name> <password>tiger</password> @@ -35,7 +35,7 @@ </resource-ref> <resource-ref> <res-ref-name>DataSource1</res-ref-name> - <jndi-name>jdbc/oracleres</jndi-name> + <jndi-name>jdbc/oracleres</jndi-name> <default-resource-principal> <name>scott</name> <password>tiger</password>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/ejb/SimpleBMPBean.java index fd2dd44..7d4f169 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/ejb/SimpleBMPBean.java
@@ -31,121 +31,121 @@ protected DataSource ds1; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - ds1 = (DataSource) context.lookup("java:comp/env/DataSource1"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + ds1 = (DataSource) context.lookup("java:comp/env/DataSource1"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } /* Get 10 connections in a bunch and then close them*/ public boolean test1( int numRuns ) { - boolean passed = true; - Connection[] conns = new Connection[10]; + boolean passed = true; + Connection[] conns = new Connection[10]; for( int i = 0; i < numRuns; i++ ) { - try { - conns[i] = ds.getConnection(); - } catch (Exception e) { - passed = false; - } + try { + conns[i] = ds.getConnection(); + } catch (Exception e) { + passed = false; } - - for (int i = 0 ; i < numRuns;i++ ) { - try { - conns[i].close(); - } catch( Exception e) { - passed = false; - } - } - return passed; + } + + for (int i = 0 ; i < numRuns;i++ ) { + try { + conns[i].close(); + } catch( Exception e) { + passed = false; + } + } + return passed; } /* Get a single connection and close it */ public boolean test2() { Connection conn = null; - Statement stmt = null; - ResultSet rs = null; + Statement stmt = null; + ResultSet rs = null; boolean passed = true; - try { - conn = ds.getConnection(); - conn.setTransactionIsolation( conn.getTransactionIsolation() ); - stmt = conn.createStatement(); - rs = stmt.executeQuery( "SELECT * FROM O_CUSTOMER"); - while( rs.next() ) { - System.out.println(rs.getString(1)); - } - stmt.executeUpdate("INSERT INTO O_CUSTOMER values (100, 'new phone')"); + try { + conn = ds.getConnection(); + conn.setTransactionIsolation( conn.getTransactionIsolation() ); + stmt = conn.createStatement(); + rs = stmt.executeQuery( "SELECT * FROM O_CUSTOMER"); + while( rs.next() ) { + System.out.println(rs.getString(1)); + } + stmt.executeUpdate("INSERT INTO O_CUSTOMER values (100, 'new phone')"); rs = stmt.executeQuery( "SELECT * FROM O_CUSTOMER"); - while( rs.next() ) { - System.out.println(rs.getString(1)); - } + while( rs.next() ) { + System.out.println(rs.getString(1)); + } stmt.executeUpdate("DELETE FROM O_CUSTOMER WHERE c_id=100"); - } catch (Exception e) { - passed = false; - e.printStackTrace(); - } finally { - if (rs != null ) { - try { rs.close(); } catch( Exception e1 ) {} - } - if (stmt != null ) { - try { stmt.close(); } catch( Exception e1 ) {} - } - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - - } - - return passed; + } catch (Exception e) { + passed = false; + e.printStackTrace(); + } finally { + if (rs != null ) { + try { rs.close(); } catch( Exception e1 ) {} + } + if (stmt != null ) { + try { stmt.close(); } catch( Exception e1 ) {} + } + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + + } + + return passed; } /** Application auth */ public boolean test3() { Connection conn = null; - Statement stmt = null; - ResultSet rs = null; + Statement stmt = null; + ResultSet rs = null; boolean passed = true; - try { - conn = ds1.getConnection("scott", "tiger"); - stmt = conn.createStatement(); - stmt.executeUpdate("INSERT INTO O_CUSTOMER values (100, 'new phone')"); + try { + conn = ds1.getConnection("scott", "tiger"); + stmt = conn.createStatement(); + stmt.executeUpdate("INSERT INTO O_CUSTOMER values (100, 'new phone')"); rs = stmt.executeQuery( "SELECT * FROM O_CUSTOMER"); - while( rs.next() ) { - System.out.println(rs.getString(1)); - } + while( rs.next() ) { + System.out.println(rs.getString(1)); + } stmt.executeUpdate("DELETE FROM O_CUSTOMER WHERE c_id=100"); rs = stmt.executeQuery( "SELECT * FROM O_CUSTOMER"); - System.out.println( rs ); - } catch (Exception e) { - passed = false; - e.printStackTrace(); - } finally { - if (rs != null ) { - try { rs.close(); } catch( Exception e1 ) {} - } - if (stmt != null ) { - try { stmt.close(); } catch( Exception e1 ) {} - } - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - return passed; + System.out.println( rs ); + } catch (Exception e) { + passed = false; + e.printStackTrace(); + } finally { + if (rs != null ) { + try { rs.close(); } catch( Exception e1 ) {} + } + if (stmt != null ) { + try { stmt.close(); } catch( Exception e1 ) {} + } + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } + + return passed; } - + public void ejbLoad() {} public void ejbStore() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/sql/create_pointbase.sql index dd31599..f13ff8b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_CUSTOMER; - -CREATE TABLE O_CUSTOMER ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_CUSTOMER; + +CREATE TABLE O_CUSTOMER ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleora/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleora/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/build.properties index 8cdd5ac..50ac500 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-simpleora"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/build.xml index b302dcf..ecdfdac 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/build.xml
@@ -40,7 +40,7 @@ <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"/> @@ -52,13 +52,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="deploy-jdbc-oracle-common"/> @@ -71,14 +71,14 @@ </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-oracle-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> <antcall target="undeploy-jdbc-oracle-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/client/SimpleBMPClient.java index 93a503f..85a2442 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/client/SimpleBMPClient.java
@@ -29,39 +29,39 @@ public static void main(String[] args) throws Exception { - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "jdbcsimpleora "; + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "jdbcsimpleora "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - stat.addDescription("Simple OracleDD test "); + stat.addDescription("Simple OracleDD test "); - + if ( simpleBMP.test1(10) ) { - stat.addStatus(testSuite+"test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test1 : ", stat.FAIL); - } - - if ( simpleBMP.test2() ) { - stat.addStatus(testSuite+"test2 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test2 : ", stat.FAIL); - } + stat.addStatus(testSuite+"test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test1 : ", stat.FAIL); + } - if ( simpleBMP.test3() ) { - stat.addStatus(testSuite+"test3 : ", stat.PASS); - } else { - stat.addStatus(testSuite+"test3 : ", stat.FAIL); - } + if ( simpleBMP.test2() ) { + stat.addStatus(testSuite+"test2 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test2 : ", stat.FAIL); + } - System.out.println("jdbc simpleora status: "); - stat.printSummary(); - - + if ( simpleBMP.test3() ) { + stat.addStatus(testSuite+"test3 : ", stat.PASS); + } else { + stat.addStatus(testSuite+"test3 : ", stat.FAIL); + } + + System.out.println("jdbc simpleora status: "); + stat.printSummary(); + + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/descriptor/ejb-jar.xml index 20d716e..5ac9a4b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/descriptor/ejb-jar.xml
@@ -63,6 +63,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/descriptor/sun-ejb-jar.xml index 6f4a404..f3a4375 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/descriptor/sun-ejb-jar.xml
@@ -27,7 +27,7 @@ <jndi-name>com.sun.s1asdev.jdbc.simpleora.ejb.SimpleBMPHome</jndi-name> <resource-ref> <res-ref-name>DataSource</res-ref-name> - <jndi-name>jdbc/oracleres</jndi-name> + <jndi-name>jdbc/oracleres</jndi-name> <default-resource-principal> <name>scott</name> <password>tiger</password> @@ -35,7 +35,7 @@ </resource-ref> <resource-ref> <res-ref-name>DataSource1</res-ref-name> - <jndi-name>jdbc/oracleres</jndi-name> + <jndi-name>jdbc/oracleres</jndi-name> <default-resource-principal> <name>scott</name> <password>tiger</password>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/ejb/SimpleBMPBean.java index f20cc0f..f2e6d56 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/ejb/SimpleBMPBean.java
@@ -31,120 +31,120 @@ protected DataSource ds1; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - ds1 = (DataSource) context.lookup("java:comp/env/DataSource1"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + ds1 = (DataSource) context.lookup("java:comp/env/DataSource1"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } /* Get 10 connections in a bunch and then close them*/ public boolean test1( int numRuns ) { - boolean passed = true; - Connection[] conns = new Connection[10]; + boolean passed = true; + Connection[] conns = new Connection[10]; for( int i = 0; i < numRuns; i++ ) { - try { - conns[i] = ds.getConnection(); - } catch (Exception e) { - passed = false; - } + try { + conns[i] = ds.getConnection(); + } catch (Exception e) { + passed = false; } - - for (int i = 0 ; i < numRuns;i++ ) { - try { - conns[i].close(); - } catch( Exception e) { - passed = false; - } - } - return passed; + } + + for (int i = 0 ; i < numRuns;i++ ) { + try { + conns[i].close(); + } catch( Exception e) { + passed = false; + } + } + return passed; } /* Get a single connection and close it */ public boolean test2() { Connection conn = null; - Statement stmt = null; - ResultSet rs = null; + Statement stmt = null; + ResultSet rs = null; boolean passed = true; - try { - conn = ds.getConnection(); - stmt = conn.createStatement(); - rs = stmt.executeQuery( "SELECT * FROM O_CUSTOMER"); - while( rs.next() ) { - System.out.println(rs.getString(1)); - } - stmt.executeUpdate("INSERT INTO O_CUSTOMER values (100, 'new phone')"); + try { + conn = ds.getConnection(); + stmt = conn.createStatement(); + rs = stmt.executeQuery( "SELECT * FROM O_CUSTOMER"); + while( rs.next() ) { + System.out.println(rs.getString(1)); + } + stmt.executeUpdate("INSERT INTO O_CUSTOMER values (100, 'new phone')"); rs = stmt.executeQuery( "SELECT * FROM O_CUSTOMER"); - while( rs.next() ) { - System.out.println(rs.getString(1)); - } + while( rs.next() ) { + System.out.println(rs.getString(1)); + } stmt.executeUpdate("DELETE FROM O_CUSTOMER WHERE c_id=100"); - } catch (Exception e) { - passed = false; - e.printStackTrace(); - } finally { - if (rs != null ) { - try { rs.close(); } catch( Exception e1 ) {} - } - if (stmt != null ) { - try { stmt.close(); } catch( Exception e1 ) {} - } - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - - } - - return passed; + } catch (Exception e) { + passed = false; + e.printStackTrace(); + } finally { + if (rs != null ) { + try { rs.close(); } catch( Exception e1 ) {} + } + if (stmt != null ) { + try { stmt.close(); } catch( Exception e1 ) {} + } + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + + } + + return passed; } /** Application auth */ public boolean test3() { Connection conn = null; - Statement stmt = null; - ResultSet rs = null; + Statement stmt = null; + ResultSet rs = null; boolean passed = true; - try { - conn = ds1.getConnection("scott", "tiger"); - stmt = conn.createStatement(); - stmt.executeUpdate("INSERT INTO O_CUSTOMER values (100, 'new phone')"); + try { + conn = ds1.getConnection("scott", "tiger"); + stmt = conn.createStatement(); + stmt.executeUpdate("INSERT INTO O_CUSTOMER values (100, 'new phone')"); rs = stmt.executeQuery( "SELECT * FROM O_CUSTOMER"); - while( rs.next() ) { - System.out.println(rs.getString(1)); - } + while( rs.next() ) { + System.out.println(rs.getString(1)); + } stmt.executeUpdate("DELETE FROM O_CUSTOMER WHERE c_id=100"); rs = stmt.executeQuery( "SELECT * FROM O_CUSTOMER"); - System.out.println( rs ); - } catch (Exception e) { - passed = false; - e.printStackTrace(); - } finally { - if (rs != null ) { - try { rs.close(); } catch( Exception e1 ) {} - } - if (stmt != null ) { - try { stmt.close(); } catch( Exception e1 ) {} - } - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - return passed; + System.out.println( rs ); + } catch (Exception e) { + passed = false; + e.printStackTrace(); + } finally { + if (rs != null ) { + try { rs.close(); } catch( Exception e1 ) {} + } + if (stmt != null ) { + try { stmt.close(); } catch( Exception e1 ) {} + } + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } + + return passed; } - + public void ejbLoad() {} public void ejbStore() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/sql/create_pointbase.sql index dd31599..f13ff8b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_CUSTOMER; - -CREATE TABLE O_CUSTOMER ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_CUSTOMER; + +CREATE TABLE O_CUSTOMER ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/simpleoradd/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/build.properties index 05a29ca..37e3ca6 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-statementwrapper"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/build.xml index 26e31a7..8e26589 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/build.xml
@@ -42,7 +42,7 @@ <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"/> @@ -54,13 +54,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -89,9 +89,9 @@ </antcall> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="server.monitoring-service.module-monitoring-levels.jdbc-connection-pool=OFF"/> @@ -108,7 +108,7 @@ <param name="appclient.application.args" value="2"/> </antcall> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -121,7 +121,7 @@ <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/client/SimpleBMPClient.java index b7bb9ca..910d6b2 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/client/SimpleBMPClient.java
@@ -33,22 +33,22 @@ public static SimpleReporterAdapter stat = new SimpleReporterAdapter(); public static final Object lock = new Object(); - public static int NO_OF_THREADS = 5; + public static int NO_OF_THREADS = 5; public static final int JMX_PORT = 8686; public static final String HOST_NAME = "localhost"; public long sumTotal = 0; public boolean successExecuting = true; public SimpleBMPClient(int option){ - if(option == 1) { + if(option == 1) { execute(); - } else if(option == 2) { - try { - getMonitorablePropertyOfConnectionPool("ql-jdbc-pool", "frequsedsqlqueries"); - } catch(Exception ex) { + } else if(option == 2) { + try { + getMonitorablePropertyOfConnectionPool("ql-jdbc-pool", "frequsedsqlqueries"); + } catch(Exception ex) { ex.printStackTrace(); - } - } + } + } } private void execute() { @@ -65,40 +65,40 @@ } if(successExecuting) { - stat.addStatus("SQL Trace monitoring Test1 ", stat.PASS); - } else { - stat.addStatus("SQL Trace monitoring Test1 ", stat.FAIL); - } + stat.addStatus("SQL Trace monitoring Test1 ", stat.PASS); + } else { + stat.addStatus("SQL Trace monitoring Test1 ", stat.FAIL); + } stat.printSummary(); } public static void main(String[] args) throws Exception { - stat.addDescription("SQL Tracing tests"); + stat.addDescription("SQL Tracing tests"); if (args != null && args.length > 0) { String param = args[0]; switch (Integer.parseInt(param)) { case 1: {//run the threads - new SimpleBMPClient(1); - break; - } - case 2: { //compare monitoring stats + new SimpleBMPClient(1); + break; + } + case 2: { //compare monitoring stats new SimpleBMPClient(2); - break; - } - } - } + break; + } + } + } } class WorkerThread extends Thread{ - private int timesToExecuteQuery = 0; + private int timesToExecuteQuery = 0; public WorkerThread(int noExecs, String name){ - super(name); - timesToExecuteQuery = noExecs; + super(name); + timesToExecuteQuery = noExecs; } public void run() { @@ -109,62 +109,62 @@ javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - String tableName = Thread.currentThread().getName(); - String tableValue = "iiop"; - for(int i=0; i<timesToExecuteQuery; i++) { + String tableName = Thread.currentThread().getName(); + String tableValue = "iiop"; + for(int i=0; i<timesToExecuteQuery; i++) { simpleBMP.preparedStatementTest1(tableName, tableValue); - } + } }catch(Exception e){ System.out.println("Thread : " + Thread.currentThread().getName() + "did not run "); e.printStackTrace(); - SimpleBMPClient.this.successExecuting = false; + SimpleBMPClient.this.successExecuting = false; } } } public void getMonitorablePropertyOfConnectionPool(String poolName, String monitoringStat) throws Exception { - boolean passed = false; - final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; + boolean passed = false; + final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; final JMXServiceURL url = new JMXServiceURL(urlStr); - final JMXConnector jmxConn = JMXConnectorFactory.connect(url); - final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); + final JMXConnector jmxConn = JMXConnectorFactory.connect(url); + final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); ObjectName objectName = new ObjectName("amx:pp=/mon/server-mon[server],type=jdbcra-mon,name=resources/" + poolName); - javax.management.openmbean.CompositeDataSupport returnValue = - (javax.management.openmbean.CompositeDataSupport) - connection.getAttribute(objectName, monitoringStat); + javax.management.openmbean.CompositeDataSupport returnValue = + (javax.management.openmbean.CompositeDataSupport) + connection.getAttribute(objectName, monitoringStat); - String freqUsedQueries = (String) returnValue.get("current"); - String delimiter = "%%%EOL%%%"; - StringTokenizer st = new StringTokenizer(freqUsedQueries, delimiter); + String freqUsedQueries = (String) returnValue.get("current"); + String delimiter = "%%%EOL%%%"; + StringTokenizer st = new StringTokenizer(freqUsedQueries, delimiter); - List<String> queryList = new LinkedList<String>(); - List<String> expectedQueryList = new LinkedList<String>(); - expectedQueryList.add("select * from customer_stmt_wrapper5 where c_phone= ?"); - expectedQueryList.add("select * from customer_stmt_wrapper4 where c_phone= ?"); - expectedQueryList.add("select * from customer_stmt_wrapper3 where c_phone= ?"); + List<String> queryList = new LinkedList<String>(); + List<String> expectedQueryList = new LinkedList<String>(); + expectedQueryList.add("select * from customer_stmt_wrapper5 where c_phone= ?"); + expectedQueryList.add("select * from customer_stmt_wrapper4 where c_phone= ?"); + expectedQueryList.add("select * from customer_stmt_wrapper3 where c_phone= ?"); - while(st.hasMoreTokens()) { - String query = st.nextToken().trim(); - if(!query.equals("")) { - queryList.add(query); - } - } - /*for(int k=0; k<queryList.size(); k++) { - System.out.println(">>>>> query=" + queryList.get(k)); - }*/ + while(st.hasMoreTokens()) { + String query = st.nextToken().trim(); + if(!query.equals("")) { + queryList.add(query); + } + } + /*for(int k=0; k<queryList.size(); k++) { + System.out.println(">>>>> query=" + queryList.get(k)); + }*/ - passed = expectedQueryList.equals(queryList); - - if(passed) { - stat.addStatus("SQL Trace monitoring Test2 ", stat.PASS); - } else { - stat.addStatus("SQL Trace monitoring Test2 ", stat.FAIL); - } + passed = expectedQueryList.equals(queryList); + + if(passed) { + stat.addStatus("SQL Trace monitoring Test2 ", stat.PASS); + } else { + stat.addStatus("SQL Trace monitoring Test2 ", stat.FAIL); + } stat.printSummary(); }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/descriptor/ejb-jar.xml index 375993e..7b24b38 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/descriptor/ejb-jar.xml
@@ -57,6 +57,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/ejb/SimpleBMPBean.java index 2d0cf8b..affd530 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/ejb/SimpleBMPBean.java
@@ -27,17 +27,17 @@ protected DataSource ds; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/jdbc/DataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/jdbc/DataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } public boolean preparedStatementTest1(String tableName, String value){
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/sql/create_pointbase.sql index cb74e26..684e27c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/sqltracemonitoring/sql/create_pointbase.sql
@@ -1,46 +1,46 @@ -Drop table customer_stmt_wrapper1; - -CREATE TABLE customer_stmt_wrapper1 ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper1 VALUES(2, 'iiop'); - -Drop table customer_stmt_wrapper2; - -CREATE TABLE customer_stmt_wrapper2 ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper2 VALUES(2, 'iiop'); - -Drop table customer_stmt_wrapper3; - -CREATE TABLE customer_stmt_wrapper3 ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper3 VALUES(2, 'iiop'); - -Drop table customer_stmt_wrapper4; - -CREATE TABLE customer_stmt_wrapper4 ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper4 VALUES(2, 'iiop'); - -Drop table customer_stmt_wrapper5; - -CREATE TABLE customer_stmt_wrapper5 ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper5 VALUES(2, 'iiop'); - +Drop table customer_stmt_wrapper1; + +CREATE TABLE customer_stmt_wrapper1 ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper1 VALUES(2, 'iiop'); + +Drop table customer_stmt_wrapper2; + +CREATE TABLE customer_stmt_wrapper2 ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper2 VALUES(2, 'iiop'); + +Drop table customer_stmt_wrapper3; + +CREATE TABLE customer_stmt_wrapper3 ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper3 VALUES(2, 'iiop'); + +Drop table customer_stmt_wrapper4; + +CREATE TABLE customer_stmt_wrapper4 ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper4 VALUES(2, 'iiop'); + +Drop table customer_stmt_wrapper5; + +CREATE TABLE customer_stmt_wrapper5 ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper5 VALUES(2, 'iiop'); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/build.properties index 05a29ca..37e3ca6 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-statementwrapper"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/build.xml index 2e0cbe5..4518c8c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/build.xml
@@ -36,7 +36,7 @@ <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"/> @@ -48,13 +48,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -79,9 +79,9 @@ <!-- Creating another ds for comparison of records --> <antcall target="deploy-jdbc-common"> <param name="jdbc.conpool.name" value="second-pool"/> - <param name="db.class" value="org.apache.derby.jdbc.ClientDataSource"/> - <param name="jdbc.resource.type" value="javax.sql.DataSource"/> - <param name="jdbc.resource.name" value="jdbc/compareDS"/> + <param name="db.class" value="org.apache.derby.jdbc.ClientDataSource"/> + <param name="jdbc.resource.type" value="javax.sql.DataSource"/> + <param name="jdbc.resource.name" value="jdbc/compareDS"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> @@ -91,9 +91,9 @@ <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> - <!--<antcall target="execute-sql-common"> + <!--<antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall>--> <antcall target="asadmin-common"> @@ -108,7 +108,7 @@ </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -121,7 +121,7 @@ </antcall> <antcall target="undeploy-jdbc-common"/> <antcall target="delete-jdbc-resource-common"> - <param name="jdbc.resource.name" value="jdbc/compareDS"/> + <param name="jdbc.resource.name" value="jdbc/compareDS"/> </antcall> <antcall target="delete-jdbc-connpool-common"> @@ -129,7 +129,7 @@ </antcall> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/client/SimpleBMPClient.java index 64d2e1f..e2124a1 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/client/SimpleBMPClient.java
@@ -64,11 +64,11 @@ stat.addStatus(testSuite + " statementTest : ", stat.FAIL); } - if(getMonitorablePropertyOfConnectionPool() == 2) { + if(getMonitorablePropertyOfConnectionPool() == 2) { stat.addStatus(testSuite + " Monitoring after statementTest : ", stat.PASS); - } else { + } else { stat.addStatus(testSuite + " Monitoring after statementTest : ", stat.FAIL); - } + } //Testing PreparedStatement object for (int i = 0; i < 2; i++) { SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); @@ -90,11 +90,11 @@ stat.addStatus(testSuite + " preparedStatementTest : ", stat.FAIL); } - if(getMonitorablePropertyOfConnectionPool() == 4) { + if(getMonitorablePropertyOfConnectionPool() == 4) { stat.addStatus(testSuite + " Monitoring after preparedStatementTest : ", stat.PASS); - } else { + } else { stat.addStatus(testSuite + " Monitoring after preparedStatementTest : ", stat.FAIL); - } + } //Testing CallableStatement objects for (int i = 0; i < 2; i++) { SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); @@ -116,30 +116,30 @@ stat.addStatus(testSuite + " callableStatementTest : ", stat.FAIL); } - if(getMonitorablePropertyOfConnectionPool() == 6) { + if(getMonitorablePropertyOfConnectionPool() == 6) { stat.addStatus(testSuite + " Monitoring after callableStatementTest : ", stat.PASS); - } else { + } else { stat.addStatus(testSuite + " Monitoring after callableStatementTest : ", stat.FAIL); - } + } stat.printSummary(); } public static int getMonitorablePropertyOfConnectionPool() throws Exception { - final String monitoringStat = "numpotentialstatementleak"; - final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; + final String monitoringStat = "numpotentialstatementleak"; + final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; final JMXServiceURL url = new JMXServiceURL(urlStr); - final JMXConnector jmxConn = JMXConnectorFactory.connect(url); - final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); + final JMXConnector jmxConn = JMXConnectorFactory.connect(url); + final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); ObjectName objectName = new ObjectName("amx:pp=/mon/server-mon[server],type=jdbcra-mon,name=resources/" + poolName); - javax.management.openmbean.CompositeDataSupport returnValue = - (javax.management.openmbean.CompositeDataSupport) - connection.getAttribute(objectName, monitoringStat); + javax.management.openmbean.CompositeDataSupport returnValue = + (javax.management.openmbean.CompositeDataSupport) + connection.getAttribute(objectName, monitoringStat); - System.out.println(">>>" + monitoringStat + "=" + returnValue.get("count")); + System.out.println(">>>" + monitoringStat + "=" + returnValue.get("count")); return new Integer(returnValue.get("count").toString()); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/descriptor/ejb-jar.xml index 29cf2ae..6c1a37b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/descriptor/ejb-jar.xml
@@ -63,6 +63,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/ejb/SimpleBMPBean.java index 74aa810..53104c7 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/ejb/SimpleBMPBean.java
@@ -137,7 +137,7 @@ Connection conFromDS = null; Connection conFromCompareDS = null; CallableStatement stmt = null; - PreparedStatement stmt1 = null; + PreparedStatement stmt1 = null; try { conFromDS = ds.getConnection(); conFromCompareDS = compareDs.getConnection(); @@ -150,7 +150,7 @@ stmt1.executeUpdate(); } catch (SQLException sqe) { - result = false; + result = false; } finally { try { if (stmt1 != null) {
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/sql/create_pointbase.sql index b50ddec..c199783 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementleakdetection/sql/create_pointbase.sql
@@ -1,17 +1,17 @@ - -Drop table customer_stmt_wrapper; - -CREATE TABLE customer_stmt_wrapper ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); -INSERT INTO customer_stmt_wrapper VALUES(2, 'pqrs'); - -Drop table COMPARE_RECORDS; - -CREATE TABLE COMPARE_RECORDS( - REC_STMT_TYPE char(5), - REC_STMT integer -); + +Drop table customer_stmt_wrapper; + +CREATE TABLE customer_stmt_wrapper ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); +INSERT INTO customer_stmt_wrapper VALUES(2, 'pqrs'); + +Drop table COMPARE_RECORDS; + +CREATE TABLE COMPARE_RECORDS( + REC_STMT_TYPE char(5), + REC_STMT integer +);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/build.properties index 45073d5..15f7f51 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-statementtimeout"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/build.xml index 35ce7a0..7d73134 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/build.xml
@@ -70,7 +70,7 @@ <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> - <antcall target="deploy-jdbc-common"/> + <antcall target="deploy-jdbc-common"/> <antcall target="asadmin-common"> <param name="admin.command" value="set"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/client/SimpleBMPClient.java index c7d48fa..491bfc4 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/client/SimpleBMPClient.java
@@ -36,7 +36,7 @@ javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - stat.addDescription("JDBC Statement Timeout Tests"); + stat.addDescription("JDBC Statement Timeout Tests"); if (simpleBMP.statementTest()) { stat.addStatus(testSuite + " statementTest : ", SimpleReporterAdapter.PASS);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/sql/create_pointbase.sql index dd4c5e5..11e61ee 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementtimeout/sql/create_pointbase.sql
@@ -1,10 +1,10 @@ - -Drop table customer_stmt_wrapper; - -CREATE TABLE customer_stmt_wrapper ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); + +Drop table customer_stmt_wrapper; + +CREATE TABLE customer_stmt_wrapper ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); INSERT INTO customer_stmt_wrapper VALUES(2, 'pqrs'); \ No newline at end of file
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/build.properties index 05a29ca..37e3ca6 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-statementwrapper"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/build.xml index f1caeb8..ac44fac 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/build.xml
@@ -36,7 +36,7 @@ <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"/> @@ -48,13 +48,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -63,14 +63,14 @@ <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -78,7 +78,7 @@ <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/client/SimpleBMPClient.java index dcbe04e..86d7a7a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/client/SimpleBMPClient.java
@@ -29,28 +29,28 @@ public static void main(String[] args) throws Exception { - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "StatementWrapper "; + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "StatementWrapper "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); stat.addDescription("JDBC Statement Wrapper Tests"); if ( simpleBMP.statementTest() ) { - stat.addStatus(testSuite+" statementTest : ", stat.PASS); - } else { - stat.addStatus(testSuite+" statementTest : ", stat.FAIL); - } + stat.addStatus(testSuite+" statementTest : ", stat.PASS); + } else { + stat.addStatus(testSuite+" statementTest : ", stat.FAIL); + } - if ( simpleBMP.preparedStatementTest() ) { - stat.addStatus(testSuite+" preparedStatementTest : ", stat.PASS); - } else { - stat.addStatus(testSuite+" preparedStatementTest : ", stat.FAIL); - } + if ( simpleBMP.preparedStatementTest() ) { + stat.addStatus(testSuite+" preparedStatementTest : ", stat.PASS); + } else { + stat.addStatus(testSuite+" preparedStatementTest : ", stat.FAIL); + } if ( simpleBMP.callableStatementTest() ) { stat.addStatus(testSuite+" callableStatementTest : ", stat.PASS);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/descriptor/ejb-jar.xml index c90e9be..a568b82 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/descriptor/ejb-jar.xml
@@ -57,6 +57,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/ejb/SimpleBMPBean.java index 97aead0..38a8c77 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/ejb/SimpleBMPBean.java
@@ -28,18 +28,18 @@ protected DataSource ds; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } System.out.println("[**SimpleBMPBean**] Done with setEntityContext...."); } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } public boolean statementTest() { @@ -52,8 +52,8 @@ stmt = conFromDS.createStatement(); conFromStatement = stmt.getConnection(); - System.out.println("statement Test : conFromDS : " + conFromDS); - System.out.println("statement Test : conFromStatement : " + conFromStatement); + System.out.println("statement Test : conFromDS : " + conFromDS); + System.out.println("statement Test : conFromStatement : " + conFromStatement); if( conFromDS==conFromStatement || conFromDS.equals(conFromStatement) ){ result = true; @@ -84,8 +84,8 @@ stmt = conFromDS.prepareStatement("select * from customer_stmt_wrapper"); conFromStatement = stmt.getConnection(); - System.out.println("Prepared statement Test : conFromDS : " + conFromDS); - System.out.println("Prepared statement Test : conFromStatement : " + conFromStatement); + System.out.println("Prepared statement Test : conFromDS : " + conFromDS); + System.out.println("Prepared statement Test : conFromStatement : " + conFromStatement); if( conFromDS==conFromStatement || conFromDS.equals(conFromStatement) ){ result = true; } @@ -115,8 +115,8 @@ stmt = conFromDS.prepareCall("select * from customer_stmt_wrapper"); conFromStatement = stmt.getConnection(); - System.out.println("Callable statement Test : conFromDS : " + conFromDS); - System.out.println("Callable statement Test : conFromStatement : " + conFromStatement); + System.out.println("Callable statement Test : conFromDS : " + conFromDS); + System.out.println("Callable statement Test : conFromStatement : " + conFromStatement); if( conFromDS==conFromStatement || conFromDS.equals(conFromStatement) ){ result = true; } @@ -146,8 +146,8 @@ dbmd = conFromDS.getMetaData(); conFromMetaData = dbmd.getConnection(); - System.out.println("statementTest : conFromDS : " + conFromDS); - System.out.println("statementTest : conFromDbMetadata : " + conFromMetaData); + System.out.println("statementTest : conFromDS : " + conFromDS); + System.out.println("statementTest : conFromDbMetadata : " + conFromMetaData); if( conFromDS==conFromMetaData || conFromDS.equals(conFromMetaData) ){ result = true; } @@ -173,8 +173,8 @@ rs = stmt.executeQuery("select * from customer_stmt_wrapper"); conFromResultSet = rs.getStatement().getConnection(); - System.out.println("ResultSet test : conFromDS : " + conFromDS); - System.out.println("ResultSet test : conFromResultSet: " + conFromResultSet); + System.out.println("ResultSet test : conFromDS : " + conFromDS); + System.out.println("ResultSet test : conFromResultSet: " + conFromResultSet); if( conFromDS==conFromResultSet || conFromDS.equals(conFromResultSet) ){ result = true; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/sql/create_pointbase.sql index dd4c5e5..11e61ee 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/statementwrapper/sql/create_pointbase.sql
@@ -1,10 +1,10 @@ - -Drop table customer_stmt_wrapper; - -CREATE TABLE customer_stmt_wrapper ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); + +Drop table customer_stmt_wrapper; + +CREATE TABLE customer_stmt_wrapper ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); INSERT INTO customer_stmt_wrapper VALUES(2, 'pqrs'); \ No newline at end of file
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/build.properties index 74a2979..102f15c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-stmtcaching_hit_miss"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/build.xml index e96f49e..e42b779 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/build.xml
@@ -69,7 +69,7 @@ </target> <target name="undeploy" depends="init-common"> - <antcall target="execute-sql-common"> + <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> @@ -92,18 +92,18 @@ - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching_hit_miss-pool.statement_cache_size=5"/> </antcall> - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching_hit_miss-pool.statement_cache_type=FIXED"/> </antcall> - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching_hit_miss-pool.wrap_jdbc_objects=true"/> @@ -115,10 +115,10 @@ <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching_hit_miss-pool.idle_timeout_in_seconds=3000"/> </antcall> - <!--<antcall target="asadmin-common"> + <!--<antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching_hit_miss-pool.property.StatementCacheType="/> + value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching_hit_miss-pool.property.StatementCacheType="/> </antcall>--> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/descriptor/ejb-jar.xml index 9247e9e..8ecdb32 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/descriptor/ejb-jar.xml
@@ -43,8 +43,8 @@ <res-ref-name>DataSource</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> - <res-sharing-scope>Unshareable</res-sharing-scope> - </resource-ref> + <res-sharing-scope>Unshareable</res-sharing-scope> + </resource-ref> </entity> </enterprise-beans>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/descriptor/sun-ejb-jar.xml index f33f641..25c9ef5 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/descriptor/sun-ejb-jar.xml
@@ -27,7 +27,7 @@ <jndi-name>com.sun.s1asdev.jdbc.stmtcaching.ejb.SimpleBMPHome</jndi-name> <resource-ref> <res-ref-name>DataSource</res-ref-name> - <jndi-name>jdbc/jdbc-stmtcaching_hit_miss</jndi-name> + <jndi-name>jdbc/jdbc-stmtcaching_hit_miss</jndi-name> <default-resource-principal> <name>DBUSER</name> <password>DBPASSWORD</password>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/ejb/SimpleBMPBean.java index bcf3676..a535415 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/ejb/SimpleBMPBean.java
@@ -41,100 +41,100 @@ } public boolean testHit() { - System.out.println("Statement caching Hit test Start"); + System.out.println("Statement caching Hit test Start"); com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; boolean passed = false; Connection conn = null; - try { + try { conn = ds.getConnection(); - System.out.println(">>>> conn = " + conn.hashCode()); - }catch(Exception ex) { - } + System.out.println(">>>> conn = " + conn.hashCode()); + }catch(Exception ex) { + } for (int i = 1; i < 7; i++) { - System.out.println("Index = " + i); + System.out.println("Index = " + i); try { - if(i == 6) { - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?"); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else { - int[] columnIndexes = {i+1, i+2}; + if(i == 6) { + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?"); + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else { + int[] columnIndexes = {i+1, i+2}; stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?"); - } - if(i == 1) { - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } + } + if(i == 1) { + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } } catch (Exception e) { e.printStackTrace(); passed = false; } finally { - if(stmt != null) { - try { - stmt.close(); - } catch(Exception ex) {} - } + if(stmt != null) { + try { + stmt.close(); + } catch(Exception ex) {} + } } } - passed = (firstStatement == lastStatement); - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } + passed = (firstStatement == lastStatement); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } /* if (conn != null) { try { conn.close(); } catch (Exception e1) { } - }*/ - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Hit test End"); - return passed; + }*/ + } catch(Exception ex) { + ex.printStackTrace(); } - + System.out.println("Statement caching Hit test End"); + return passed; + } + public boolean testMiss() { - System.out.println("Statement caching Hit after Miss test Start"); + System.out.println("Statement caching Hit after Miss test Start"); com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; Connection conn = null; try { conn = ds.getConnection(); - System.out.println(">>>> conn = " + conn.hashCode()); + System.out.println(">>>> conn = " + conn.hashCode()); } catch(Exception ex) {} boolean passed = false; for (int i = 1; i < 8; i++) { try { - if(i == 6) { - //stmt = conn.prepareStatement("select * from " + tableName + tableIndex + " where c_phone=?"); + if(i == 6) { + //stmt = conn.prepareStatement("select * from " + tableName + tableIndex + " where c_phone=?"); stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?"); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else { + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else { stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?"); - } - if(i == 1) { - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } + } + if(i == 1) { + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } } catch (Exception e) { e.printStackTrace(); passed = false; @@ -142,155 +142,155 @@ } } passed = firstStatement != lastStatement; - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } -/* if(conn != null) { - conn.close(); - }*/ - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Hit after Miss test End"); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } +/* if(conn != null) { + conn.close(); + }*/ + } catch(Exception ex) { + ex.printStackTrace(); + } + System.out.println("Statement caching Hit after Miss test End"); return passed; } public boolean testHitColumnNames() { - System.out.println("Statement caching Hit (Column Names) test Start"); + System.out.println("Statement caching Hit (Column Names) test Start"); com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; boolean passed = false; Connection conn = null; - try { + try { conn = ds.getConnection(); - System.out.println(">>>> conn = " + conn.hashCode()); - }catch(Exception ex) { - } + System.out.println(">>>> conn = " + conn.hashCode()); + }catch(Exception ex) { + } for (int i = 1; i < 7; i++) { - System.out.println("Index = " + i); + System.out.println("Index = " + i); try { - if(i == 6) { - String[] columnNames = {"c_id", "c_phone"}; - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else if(i ==1) { - String[] columnNames = {"c_id", "c_phone"}; - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } else { - int j = i + 2; + if(i == 6) { + String[] columnNames = {"c_id", "c_phone"}; + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else if(i ==1) { + String[] columnNames = {"c_id", "c_phone"}; + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } else { + int j = i + 2; int k = j + 1; - String[] columnNames = {"c_id"+j, "c_id"+k}; + String[] columnNames = {"c_id"+j, "c_id"+k}; stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?", columnNames); - } + } } catch (Exception e) { e.printStackTrace(); passed = false; } finally { - if(stmt != null) { - try { - stmt.close(); - } catch(Exception ex) {} - } + if(stmt != null) { + try { + stmt.close(); + } catch(Exception ex) {} + } } } - passed = (firstStatement == lastStatement); - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } + passed = (firstStatement == lastStatement); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } /* if (conn != null) { try { conn.close(); } catch (Exception e1) { } - }*/ - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Hit (Column names) test End"); - return passed; + }*/ + } catch(Exception ex) { + ex.printStackTrace(); + } + System.out.println("Statement caching Hit (Column names) test End"); + return passed; } public boolean testHitColumnIndexes() { - System.out.println("Statement caching Hit (Column indexes) test Start"); + System.out.println("Statement caching Hit (Column indexes) test Start"); com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; boolean passed = false; Connection conn = null; - try { + try { conn = ds.getConnection(); - System.out.println(">>>> conn = " + conn.hashCode()); - }catch(Exception ex) { - } + System.out.println(">>>> conn = " + conn.hashCode()); + }catch(Exception ex) { + } for (int i = 1; i < 7; i++) { - System.out.println("Index = " + i); + System.out.println("Index = " + i); try { - if(i == 6) { - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnIndexes6); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else { - //First stmt executed would have {2,3} same as columnIndexes6 - int[] columnIndexes = {i+1, i+2}; + if(i == 6) { + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnIndexes6); + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else { + //First stmt executed would have {2,3} same as columnIndexes6 + int[] columnIndexes = {i+1, i+2}; stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?", columnIndexes); - } - if(i == 1) { - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } + } + if(i == 1) { + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } } catch (Exception e) { e.printStackTrace(); passed = false; } finally { - if(stmt != null) { - try { - stmt.close(); - } catch(Exception ex) {} - } + if(stmt != null) { + try { + stmt.close(); + } catch(Exception ex) {} + } } } - passed = (firstStatement == lastStatement); - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } + passed = (firstStatement == lastStatement); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } /*if (conn != null) { try { conn.close(); } catch (Exception e1) { } } */ - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Hit (Column indexes) test End"); - return passed; + } catch(Exception ex) { + ex.printStackTrace(); + } + System.out.println("Statement caching Hit (Column indexes) test End"); + return passed; } public void ejbLoad() { }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/sql/create_pointbase.sql index 82f34a6..988d2e9 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/sql/create_pointbase.sql
@@ -1,161 +1,161 @@ -drop table customer_stmt_wrapper1; -drop table customer_stmt_wrapper2; -drop table customer_stmt_wrapper3; -drop table customer_stmt_wrapper4; -drop table customer_stmt_wrapper5; -drop table customer_stmt_wrapper6; -drop table customer_stmt_wrapper7; -drop table customer_stmt_wrapper8; -drop table customer_stmt_wrapper9; -drop table customer_stmt_wrapper10; -CREATE TABLE customer_stmt_wrapper1 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null - -); - -INSERT INTO customer_stmt_wrapper1 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper2 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper2 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper3 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper3 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); -CREATE TABLE customer_stmt_wrapper4 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper4 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper5 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper5 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - - - -CREATE TABLE customer_stmt_wrapper6 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper6 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper7 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper7 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper8 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper8 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper9 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper9 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper10 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper10 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); +drop table customer_stmt_wrapper1; +drop table customer_stmt_wrapper2; +drop table customer_stmt_wrapper3; +drop table customer_stmt_wrapper4; +drop table customer_stmt_wrapper5; +drop table customer_stmt_wrapper6; +drop table customer_stmt_wrapper7; +drop table customer_stmt_wrapper8; +drop table customer_stmt_wrapper9; +drop table customer_stmt_wrapper10; +CREATE TABLE customer_stmt_wrapper1 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null + +); + +INSERT INTO customer_stmt_wrapper1 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper2 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper2 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper3 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper3 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); +CREATE TABLE customer_stmt_wrapper4 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper4 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper5 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper5 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + + + +CREATE TABLE customer_stmt_wrapper6 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper6 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper7 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper7 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper8 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper8 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper9 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper9 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper10 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper10 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/sql/drop_pointbase.sql index cb98378..f64c6e4 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.fixed/sql/drop_pointbase.sql
@@ -1,10 +1,10 @@ -drop table customer_stmt_wrapper1; -drop table customer_stmt_wrapper2; -drop table customer_stmt_wrapper3; -drop table customer_stmt_wrapper4; -drop table customer_stmt_wrapper5; -drop table customer_stmt_wrapper6; -drop table customer_stmt_wrapper7; -drop table customer_stmt_wrapper8; -drop table customer_stmt_wrapper9; -drop table customer_stmt_wrapper10; +drop table customer_stmt_wrapper1; +drop table customer_stmt_wrapper2; +drop table customer_stmt_wrapper3; +drop table customer_stmt_wrapper4; +drop table customer_stmt_wrapper5; +drop table customer_stmt_wrapper6; +drop table customer_stmt_wrapper7; +drop table customer_stmt_wrapper8; +drop table customer_stmt_wrapper9; +drop table customer_stmt_wrapper10;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/build.properties index 74a2979..102f15c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-stmtcaching_hit_miss"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/build.xml index d235bde..4892811 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/build.xml
@@ -79,7 +79,7 @@ </target> <target name="undeploy" depends="init-common"> - <antcall target="execute-sql-common"> + <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> @@ -100,13 +100,13 @@ <param name="jdbc.resource.name" value="jdbc/jdbc-stmtcaching_hit_miss"/> </antcall> - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc/jdbc-stmtcaching_hit_miss-pool.statement_cache_size=5"/> </antcall> - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc/jdbc-stmtcaching_hit_miss-pool.wrap_jdbc_objects=true"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/client/Client.java index 49f5205..df2c8f1 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/client/Client.java
@@ -54,34 +54,34 @@ stat.addDescription("Statement Caching Hit miss tests"); if (simpleBMP.testHit() && getMonitorablePropertyOfConnectionPool("jdbc/jdbc-stmtcaching_hit_miss-pool",NUM_HITS) == 1 && getMonitorablePropertyOfConnectionPool("jdbc/jdbc-stmtcaching_hit_miss-pool",NUM_MISSES) == 5) { - System.out.println("HIT pass"); + System.out.println("HIT pass"); stat.addStatus(" Statement Caching - (Hit): ", stat.PASS); } else { - System.out.println("HIT fail"); + System.out.println("HIT fail"); stat.addStatus(" Statement Caching - (Hit): ", stat.FAIL); } if (simpleBMP.testMiss() && getMonitorablePropertyOfConnectionPool("jdbc/jdbc-stmtcaching_hit_miss-pool",NUM_HITS) == 6 && getMonitorablePropertyOfConnectionPool("jdbc/jdbc-stmtcaching_hit_miss-pool",NUM_MISSES) == 7) { - System.out.println("MISS pass"); + System.out.println("MISS pass"); stat.addStatus(" Statement Caching - (Miss): ", stat.PASS); } else { - System.out.println("MISS fail"); + System.out.println("MISS fail"); stat.addStatus(" Statement Caching - (Miss): ", stat.FAIL); } if (simpleBMP.testHitColumnIndexes() && getMonitorablePropertyOfConnectionPool("jdbc/jdbc-stmtcaching_hit_miss-pool",NUM_HITS) == 7 && getMonitorablePropertyOfConnectionPool("jdbc/jdbc-stmtcaching_hit_miss-pool",NUM_MISSES) == 12) { - System.out.println("columnIndexes pass"); + System.out.println("columnIndexes pass"); stat.addStatus(" Statement Caching - (hit columnIndexes) : ", stat.PASS); } else { - System.out.println("columnIndexes fail"); + System.out.println("columnIndexes fail"); stat.addStatus(" Statement Caching - (hit columnIndexes) : ", stat.FAIL); } if (simpleBMP.testHitColumnNames() && getMonitorablePropertyOfConnectionPool("jdbc/jdbc-stmtcaching_hit_miss-pool",NUM_HITS) == 8 && getMonitorablePropertyOfConnectionPool("jdbc/jdbc-stmtcaching_hit_miss-pool",NUM_MISSES) == 17) { - System.out.println("columnNames pass"); + System.out.println("columnNames pass"); stat.addStatus(" Statement Caching - (hit columnNames) : ", stat.PASS); } else { - System.out.println("columnNames fail"); + System.out.println("columnNames fail"); stat.addStatus(" Statement Caching - (hit columnNames) : ", stat.FAIL); } stat.printSummary(); @@ -89,20 +89,20 @@ public int getMonitorablePropertyOfConnectionPool(String poolName, String monitoringStat) throws Exception { - final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; + final String urlStr = "service:jmx:rmi:///jndi/rmi://" + HOST_NAME + ":" + JMX_PORT + "/jmxrmi"; final JMXServiceURL url = new JMXServiceURL(urlStr); - final JMXConnector jmxConn = JMXConnectorFactory.connect(url); - final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); + final JMXConnector jmxConn = JMXConnectorFactory.connect(url); + final MBeanServerConnection connection = jmxConn.getMBeanServerConnection(); ObjectName objectName = new ObjectName("amx:pp=/mon/server-mon[server],type=jdbcra-mon,name=resources/" + poolName); - javax.management.openmbean.CompositeDataSupport returnValue = - (javax.management.openmbean.CompositeDataSupport) - connection.getAttribute(objectName, monitoringStat); + javax.management.openmbean.CompositeDataSupport returnValue = + (javax.management.openmbean.CompositeDataSupport) + connection.getAttribute(objectName, monitoringStat); - System.out.println(">>>" + monitoringStat + "=" + returnValue.get("count")); + System.out.println(">>>" + monitoringStat + "=" + returnValue.get("count")); return new Integer(returnValue.get("count").toString()); }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/descriptor/sun-ejb-jar.xml index f33f641..25c9ef5 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/descriptor/sun-ejb-jar.xml
@@ -27,7 +27,7 @@ <jndi-name>com.sun.s1asdev.jdbc.stmtcaching.ejb.SimpleBMPHome</jndi-name> <resource-ref> <res-ref-name>DataSource</res-ref-name> - <jndi-name>jdbc/jdbc-stmtcaching_hit_miss</jndi-name> + <jndi-name>jdbc/jdbc-stmtcaching_hit_miss</jndi-name> <default-resource-principal> <name>DBUSER</name> <password>DBPASSWORD</password>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/ejb/SimpleBMPBean.java index f81bde8..418099f 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/ejb/SimpleBMPBean.java
@@ -41,83 +41,83 @@ } public boolean testHit() { - System.out.println("Statement caching Hit test Start"); + System.out.println("Statement caching Hit test Start"); Connection firstConnection = null; Connection lastConnection = null; com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; boolean passed = false; Connection conn = null; - try { + try { conn = ds.getConnection(); - }catch(Exception ex) { - } + }catch(Exception ex) { + } for (int i = 1; i < 7; i++) { - System.out.println("Index = " + i); + System.out.println("Index = " + i); try { - if(i == 6) { - System.out.println(">>> Last"); - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?"); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else { - int[] columnIndexes = {i+1, i+2}; + if(i == 6) { + System.out.println(">>> Last"); + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?"); + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else { + int[] columnIndexes = {i+1, i+2}; stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?"); - } - if(i == 1) { - System.out.println(">>> First"); - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } + } + if(i == 1) { + System.out.println(">>> First"); + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } } catch (Exception e) { e.printStackTrace(); passed = false; } finally { - if(stmt != null) { - try { - stmt.close(); - } catch(Exception ex) {} - } + if(stmt != null) { + try { + stmt.close(); + } catch(Exception ex) {} + } } } - passed = (firstStatement == lastStatement); - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } + passed = (firstStatement == lastStatement); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } if (conn != null) { try { conn.close(); } catch (Exception e1) { } - } - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Hit test End"); - return passed; + } + } catch(Exception ex) { + ex.printStackTrace(); } - + System.out.println("Statement caching Hit test End"); + return passed; + } + public boolean testMiss() { - System.out.println("Statement caching Miss test Start"); + System.out.println("Statement caching Miss test Start"); Connection firstConnection = null; Connection lastConnection = null; com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; Connection conn = null; try { @@ -127,17 +127,17 @@ for (int i = 1; i < 8; i++) { try { - if(i ==7) { - stmt = conn.prepareStatement("select * from " + tableName + tableIndex + " where c_phone=?"); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else { + if(i ==7) { + stmt = conn.prepareStatement("select * from " + tableName + tableIndex + " where c_phone=?"); + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else { stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?"); - } - if(i == 1) { - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } + } + if(i == 1) { + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } } catch (Exception e) { e.printStackTrace(); passed = false; @@ -145,157 +145,157 @@ } } passed = firstStatement != lastStatement; - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } - if(conn != null) { - conn.close(); - } - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Miss test End"); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } + if(conn != null) { + conn.close(); + } + } catch(Exception ex) { + ex.printStackTrace(); + } + System.out.println("Statement caching Miss test End"); return passed; } public boolean testHitColumnNames() { - System.out.println("Statement caching Hit (Column Names) test Start"); + System.out.println("Statement caching Hit (Column Names) test Start"); Connection firstConnection = null; Connection lastConnection = null; com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; boolean passed = false; Connection conn = null; - try { + try { conn = ds.getConnection(); - }catch(Exception ex) { - } + }catch(Exception ex) { + } for (int i = 1; i < 7; i++) { - System.out.println("Index = " + i); + System.out.println("Index = " + i); try { - if(i == 6) { - String[] columnNames = {"c_id", "c_phone"}; - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else if(i ==1) { - String[] columnNames = {"c_id", "c_phone"}; - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } else { - int j = i + 2; + if(i == 6) { + String[] columnNames = {"c_id", "c_phone"}; + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else if(i ==1) { + String[] columnNames = {"c_id", "c_phone"}; + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } else { + int j = i + 2; int k = j + 1; - String[] columnNames = {"c_id"+j, "c_id"+k}; + String[] columnNames = {"c_id"+j, "c_id"+k}; stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?", columnNames); - } + } } catch (Exception e) { e.printStackTrace(); passed = false; } finally { - if(stmt != null) { - try { - stmt.close(); - } catch(Exception ex) {} - } + if(stmt != null) { + try { + stmt.close(); + } catch(Exception ex) {} + } } } - passed = (firstStatement == lastStatement); - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } + passed = (firstStatement == lastStatement); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } if (conn != null) { try { conn.close(); } catch (Exception e1) { } - } - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Hit (Column names) test End"); - return passed; + } + } catch(Exception ex) { + ex.printStackTrace(); + } + System.out.println("Statement caching Hit (Column names) test End"); + return passed; } public boolean testHitColumnIndexes() { - System.out.println("Statement caching Hit (Column indexes) test Start"); + System.out.println("Statement caching Hit (Column indexes) test Start"); Connection firstConnection = null; Connection lastConnection = null; com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; boolean passed = false; Connection conn = null; - try { + try { conn = ds.getConnection(); - }catch(Exception ex) { - } + }catch(Exception ex) { + } for (int i = 1; i < 7; i++) { - System.out.println("Index = " + i); + System.out.println("Index = " + i); try { - if(i == 6) { - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnIndexes6); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else { - //First stmt executed would have {2,3} same as columnIndexes6 - int[] columnIndexes = {i+1, i+2}; + if(i == 6) { + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnIndexes6); + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else { + //First stmt executed would have {2,3} same as columnIndexes6 + int[] columnIndexes = {i+1, i+2}; stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?", columnIndexes); - } - if(i == 1) { - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } + } + if(i == 1) { + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } } catch (Exception e) { e.printStackTrace(); passed = false; } finally { - if(stmt != null) { - try { - stmt.close(); - } catch(Exception ex) {} - } + if(stmt != null) { + try { + stmt.close(); + } catch(Exception ex) {} + } } } - passed = (firstStatement == lastStatement); - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } + passed = (firstStatement == lastStatement); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } if (conn != null) { try { conn.close(); } catch (Exception e1) { } - } - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Hit (Column indexes) test End"); - return passed; + } + } catch(Exception ex) { + ex.printStackTrace(); + } + System.out.println("Statement caching Hit (Column indexes) test End"); + return passed; } public void ejbLoad() { }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/sql/create_pointbase.sql index 82f34a6..988d2e9 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/sql/create_pointbase.sql
@@ -1,161 +1,161 @@ -drop table customer_stmt_wrapper1; -drop table customer_stmt_wrapper2; -drop table customer_stmt_wrapper3; -drop table customer_stmt_wrapper4; -drop table customer_stmt_wrapper5; -drop table customer_stmt_wrapper6; -drop table customer_stmt_wrapper7; -drop table customer_stmt_wrapper8; -drop table customer_stmt_wrapper9; -drop table customer_stmt_wrapper10; -CREATE TABLE customer_stmt_wrapper1 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null - -); - -INSERT INTO customer_stmt_wrapper1 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper2 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper2 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper3 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper3 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); -CREATE TABLE customer_stmt_wrapper4 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper4 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper5 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper5 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - - - -CREATE TABLE customer_stmt_wrapper6 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper6 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper7 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper7 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper8 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper8 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper9 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper9 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper10 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper10 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); +drop table customer_stmt_wrapper1; +drop table customer_stmt_wrapper2; +drop table customer_stmt_wrapper3; +drop table customer_stmt_wrapper4; +drop table customer_stmt_wrapper5; +drop table customer_stmt_wrapper6; +drop table customer_stmt_wrapper7; +drop table customer_stmt_wrapper8; +drop table customer_stmt_wrapper9; +drop table customer_stmt_wrapper10; +CREATE TABLE customer_stmt_wrapper1 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null + +); + +INSERT INTO customer_stmt_wrapper1 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper2 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper2 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper3 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper3 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); +CREATE TABLE customer_stmt_wrapper4 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper4 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper5 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper5 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + + + +CREATE TABLE customer_stmt_wrapper6 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper6 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper7 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper7 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper8 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper8 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper9 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper9 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper10 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper10 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/sql/drop_pointbase.sql index cb98378..f64c6e4 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss.monitoring/sql/drop_pointbase.sql
@@ -1,10 +1,10 @@ -drop table customer_stmt_wrapper1; -drop table customer_stmt_wrapper2; -drop table customer_stmt_wrapper3; -drop table customer_stmt_wrapper4; -drop table customer_stmt_wrapper5; -drop table customer_stmt_wrapper6; -drop table customer_stmt_wrapper7; -drop table customer_stmt_wrapper8; -drop table customer_stmt_wrapper9; -drop table customer_stmt_wrapper10; +drop table customer_stmt_wrapper1; +drop table customer_stmt_wrapper2; +drop table customer_stmt_wrapper3; +drop table customer_stmt_wrapper4; +drop table customer_stmt_wrapper5; +drop table customer_stmt_wrapper6; +drop table customer_stmt_wrapper7; +drop table customer_stmt_wrapper8; +drop table customer_stmt_wrapper9; +drop table customer_stmt_wrapper10;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/build.properties index 74a2979..102f15c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-stmtcaching_hit_miss"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/build.xml index d5ccc01..910f397 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/build.xml
@@ -69,7 +69,7 @@ </target> <target name="undeploy" depends="init-common"> - <antcall target="execute-sql-common"> + <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> @@ -92,13 +92,13 @@ - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching_hit_miss-pool.statement_cache_size=5"/> </antcall> - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching_hit_miss-pool.wrap_jdbc_objects=true"/> @@ -110,10 +110,10 @@ <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching_hit_miss-pool.idle_timeout_in_seconds=3000"/> </antcall> - <!--<antcall target="asadmin-common"> + <!--<antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" - value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching_hit_miss-pool.property.StatementCacheType="/> + value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stmtcaching_hit_miss-pool.property.StatementCacheType="/> </antcall>--> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/descriptor/sun-ejb-jar.xml index f33f641..25c9ef5 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/descriptor/sun-ejb-jar.xml
@@ -27,7 +27,7 @@ <jndi-name>com.sun.s1asdev.jdbc.stmtcaching.ejb.SimpleBMPHome</jndi-name> <resource-ref> <res-ref-name>DataSource</res-ref-name> - <jndi-name>jdbc/jdbc-stmtcaching_hit_miss</jndi-name> + <jndi-name>jdbc/jdbc-stmtcaching_hit_miss</jndi-name> <default-resource-principal> <name>DBUSER</name> <password>DBPASSWORD</password>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/ejb/SimpleBMPBean.java index 49a798f..f8d24b8 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/ejb/SimpleBMPBean.java
@@ -41,81 +41,81 @@ } public boolean testHit() { - System.out.println("Statement caching Hit test Start"); + System.out.println("Statement caching Hit test Start"); Connection firstConnection = null; Connection lastConnection = null; com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; boolean passed = false; Connection conn = null; - try { + try { conn = ds.getConnection(); - }catch(Exception ex) { - } + }catch(Exception ex) { + } for (int i = 1; i < 7; i++) { - System.out.println("Index = " + i); + System.out.println("Index = " + i); try { - if(i == 6) { - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?"); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else { - int[] columnIndexes = {i+1, i+2}; + if(i == 6) { + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?"); + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else { + int[] columnIndexes = {i+1, i+2}; stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?"); - } - if(i == 1) { - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } + } + if(i == 1) { + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } } catch (Exception e) { e.printStackTrace(); passed = false; } finally { - if(stmt != null) { - try { - stmt.close(); - } catch(Exception ex) {} - } + if(stmt != null) { + try { + stmt.close(); + } catch(Exception ex) {} + } } } - passed = (firstStatement == lastStatement); - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } + passed = (firstStatement == lastStatement); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } if (conn != null) { try { conn.close(); } catch (Exception e1) { } - } - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Hit test End"); - return passed; + } + } catch(Exception ex) { + ex.printStackTrace(); } - + System.out.println("Statement caching Hit test End"); + return passed; + } + public boolean testMiss() { - System.out.println("Statement caching Miss test Start"); + System.out.println("Statement caching Miss test Start"); Connection firstConnection = null; Connection lastConnection = null; com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; Connection conn = null; try { @@ -125,17 +125,17 @@ for (int i = 1; i < 8; i++) { try { - if(i ==7) { - stmt = conn.prepareStatement("select * from " + tableName + tableIndex + " where c_phone=?"); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else { + if(i ==7) { + stmt = conn.prepareStatement("select * from " + tableName + tableIndex + " where c_phone=?"); + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else { stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?"); - } - if(i == 1) { - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } + } + if(i == 1) { + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } } catch (Exception e) { e.printStackTrace(); passed = false; @@ -143,157 +143,157 @@ } } passed = firstStatement != lastStatement; - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } - if(conn != null) { - conn.close(); - } - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Miss test End"); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } + if(conn != null) { + conn.close(); + } + } catch(Exception ex) { + ex.printStackTrace(); + } + System.out.println("Statement caching Miss test End"); return passed; } public boolean testHitColumnNames() { - System.out.println("Statement caching Hit (Column Names) test Start"); + System.out.println("Statement caching Hit (Column Names) test Start"); Connection firstConnection = null; Connection lastConnection = null; com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; boolean passed = false; Connection conn = null; - try { + try { conn = ds.getConnection(); - }catch(Exception ex) { - } + }catch(Exception ex) { + } for (int i = 1; i < 7; i++) { - System.out.println("Index = " + i); + System.out.println("Index = " + i); try { - if(i == 6) { - String[] columnNames = {"c_id", "c_phone"}; - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else if(i ==1) { - String[] columnNames = {"c_id", "c_phone"}; - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } else { - int j = i + 2; + if(i == 6) { + String[] columnNames = {"c_id", "c_phone"}; + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else if(i ==1) { + String[] columnNames = {"c_id", "c_phone"}; + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnNames); + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } else { + int j = i + 2; int k = j + 1; - String[] columnNames = {"c_id"+j, "c_id"+k}; + String[] columnNames = {"c_id"+j, "c_id"+k}; stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?", columnNames); - } + } } catch (Exception e) { e.printStackTrace(); passed = false; } finally { - if(stmt != null) { - try { - stmt.close(); - } catch(Exception ex) {} - } + if(stmt != null) { + try { + stmt.close(); + } catch(Exception ex) {} + } } } - passed = (firstStatement == lastStatement); - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } + passed = (firstStatement == lastStatement); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } if (conn != null) { try { conn.close(); } catch (Exception e1) { } - } - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Hit (Column names) test End"); - return passed; + } + } catch(Exception ex) { + ex.printStackTrace(); + } + System.out.println("Statement caching Hit (Column names) test End"); + return passed; } public boolean testHitColumnIndexes() { - System.out.println("Statement caching Hit (Column indexes) test Start"); + System.out.println("Statement caching Hit (Column indexes) test Start"); Connection firstConnection = null; Connection lastConnection = null; com.sun.appserv.jdbc.DataSource ds = null; PreparedStatement stmt = null; - PreparedStatement firstStatement = null; - PreparedStatement lastStatement = null; + PreparedStatement firstStatement = null; + PreparedStatement lastStatement = null; String tableName = "customer_stmt_wrapper"; ds = this.ds; - int tableIndex = 1; + int tableIndex = 1; boolean passed = false; Connection conn = null; - try { + try { conn = ds.getConnection(); - }catch(Exception ex) { - } + }catch(Exception ex) { + } for (int i = 1; i < 7; i++) { - System.out.println("Index = " + i); + System.out.println("Index = " + i); try { - if(i == 6) { - stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnIndexes6); - lastStatement = stmt; - System.out.println("lastStatement : " + lastStatement); - } else { - //First stmt executed would have {2,3} same as columnIndexes6 - int[] columnIndexes = {i+1, i+2}; + if(i == 6) { + stmt = conn.prepareStatement("select * from "+ tableName + tableIndex + " where c_phone= ?", columnIndexes6); + lastStatement = stmt; + System.out.println("lastStatement : " + lastStatement); + } else { + //First stmt executed would have {2,3} same as columnIndexes6 + int[] columnIndexes = {i+1, i+2}; stmt = conn.prepareStatement("select * from "+ tableName+i +" where c_phone= ?", columnIndexes); - } - if(i == 1) { - firstStatement = stmt; - System.out.println("firstStatement : " + firstStatement); - } + } + if(i == 1) { + firstStatement = stmt; + System.out.println("firstStatement : " + firstStatement); + } } catch (Exception e) { e.printStackTrace(); passed = false; } finally { - if(stmt != null) { - try { - stmt.close(); - } catch(Exception ex) {} - } + if(stmt != null) { + try { + stmt.close(); + } catch(Exception ex) {} + } } } - passed = (firstStatement == lastStatement); - try { - if(firstStatement != null) { - firstStatement.close(); - } - if(lastStatement != null) { - lastStatement.close(); - } + passed = (firstStatement == lastStatement); + try { + if(firstStatement != null) { + firstStatement.close(); + } + if(lastStatement != null) { + lastStatement.close(); + } if (conn != null) { try { conn.close(); } catch (Exception e1) { } - } - } catch(Exception ex) { - ex.printStackTrace(); - } - System.out.println("Statement caching Hit (Column indexes) test End"); - return passed; + } + } catch(Exception ex) { + ex.printStackTrace(); + } + System.out.println("Statement caching Hit (Column indexes) test End"); + return passed; } public void ejbLoad() { }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/sql/create_pointbase.sql index 82f34a6..988d2e9 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/sql/create_pointbase.sql
@@ -1,161 +1,161 @@ -drop table customer_stmt_wrapper1; -drop table customer_stmt_wrapper2; -drop table customer_stmt_wrapper3; -drop table customer_stmt_wrapper4; -drop table customer_stmt_wrapper5; -drop table customer_stmt_wrapper6; -drop table customer_stmt_wrapper7; -drop table customer_stmt_wrapper8; -drop table customer_stmt_wrapper9; -drop table customer_stmt_wrapper10; -CREATE TABLE customer_stmt_wrapper1 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null - -); - -INSERT INTO customer_stmt_wrapper1 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper2 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper2 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper3 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper3 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); -CREATE TABLE customer_stmt_wrapper4 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper4 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper5 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper5 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - - - -CREATE TABLE customer_stmt_wrapper6 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper6 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper7 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper7 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper8 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper8 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper9 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper9 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); - -CREATE TABLE customer_stmt_wrapper10 ( - c_id integer not null, - c_phone char(16), - c_id3 integer not null, - c_id4 integer not null, - c_id5 integer not null, - c_id6 integer not null, - c_id7 integer not null, - c_id8 integer not null, - c_id9 integer not null, - c_id10 integer not null -); - -INSERT INTO customer_stmt_wrapper10 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); +drop table customer_stmt_wrapper1; +drop table customer_stmt_wrapper2; +drop table customer_stmt_wrapper3; +drop table customer_stmt_wrapper4; +drop table customer_stmt_wrapper5; +drop table customer_stmt_wrapper6; +drop table customer_stmt_wrapper7; +drop table customer_stmt_wrapper8; +drop table customer_stmt_wrapper9; +drop table customer_stmt_wrapper10; +CREATE TABLE customer_stmt_wrapper1 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null + +); + +INSERT INTO customer_stmt_wrapper1 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper2 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper2 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper3 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper3 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); +CREATE TABLE customer_stmt_wrapper4 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper4 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper5 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper5 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + + + +CREATE TABLE customer_stmt_wrapper6 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper6 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper7 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper7 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper8 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper8 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper9 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper9 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10); + +CREATE TABLE customer_stmt_wrapper10 ( + c_id integer not null, + c_phone char(16), + c_id3 integer not null, + c_id4 integer not null, + c_id5 integer not null, + c_id6 integer not null, + c_id7 integer not null, + c_id8 integer not null, + c_id9 integer not null, + c_id10 integer not null +); + +INSERT INTO customer_stmt_wrapper10 VALUES(2, 'iiop', 3, 4, 5, 6, 7, 8, 9, 10);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/sql/drop_pointbase.sql index cb98378..f64c6e4 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/stmtCaching_hit_miss/sql/drop_pointbase.sql
@@ -1,10 +1,10 @@ -drop table customer_stmt_wrapper1; -drop table customer_stmt_wrapper2; -drop table customer_stmt_wrapper3; -drop table customer_stmt_wrapper4; -drop table customer_stmt_wrapper5; -drop table customer_stmt_wrapper6; -drop table customer_stmt_wrapper7; -drop table customer_stmt_wrapper8; -drop table customer_stmt_wrapper9; -drop table customer_stmt_wrapper10; +drop table customer_stmt_wrapper1; +drop table customer_stmt_wrapper2; +drop table customer_stmt_wrapper3; +drop table customer_stmt_wrapper4; +drop table customer_stmt_wrapper5; +drop table customer_stmt_wrapper6; +drop table customer_stmt_wrapper7; +drop table customer_stmt_wrapper8; +drop table customer_stmt_wrapper9; +drop table customer_stmt_wrapper10;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/stress/build.properties index e2ea740..3714fed 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-stress"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="classes12.zip" value="/tmp/classes12.zip"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/stress/build.xml index 330f11b..7c5d5d9 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress/build.xml
@@ -36,7 +36,7 @@ <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"/> @@ -48,22 +48,22 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <!-- Create the ORACLE connection pool connection pool and datasource --> <antcall target="create-jdbc-connpool-common"> <param name="jdbc.resource.type" value="javax.sql.DataSource"/> <param name="jdbc.conpool.name" value="jdbc-stress"/> - <param name="db.class" value="oracle.jdbc.pool.OracleDataSource"/> - <param name="db.user" value="${ora.user}"/> - <param name="db.pwd" value="${ora.passwd}"/> - <param name="db.url" value="${ora.sid}"/> + <param name="db.class" value="oracle.jdbc.pool.OracleDataSource"/> + <param name="db.user" value="${ora.user}"/> + <param name="db.pwd" value="${ora.passwd}"/> + <param name="db.url" value="${ora.sid}"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> @@ -73,7 +73,7 @@ <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stress.property.URL=${ora.url}"/> </antcall> - + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-stress.property.ServerName=129.158.229.239"/> @@ -86,22 +86,22 @@ </antcall> - - <antcall target="deploy-common"/> + + <antcall target="deploy-common"/> <echo message="Executing sql from ${sql.file}"/> <sql src="sql/create_pointbase.sql" - driver="oracle.jdbc.driver.OracleDriver" - userid="${ora.user}" - password="${ora.passwd}" - url="${ora.url}" - classpath="${classes12.zip}" - onerror="continue" - print="yes" + driver="oracle.jdbc.driver.OracleDriver" + userid="${ora.user}" + password="${ora.passwd}" + url="${ora.url}" + classpath="${classes12.zip}" + onerror="continue" + print="yes" /> - + </target> - + <target name="run" depends="init-common"> <antcall target="runclient-common"/> </target> @@ -110,24 +110,24 @@ <echo message="Executing sql from ${sql.file}"/> <sql src="sql/drop_pointbase.sql" - driver="oracle.jdbc.driver.OracleDriver" - userid="${ora.user}" - password="${ora.passwd}" - url="${ora.url}" - classpath="${classes12.zip}" - onerror="continue" - print="yes" + driver="oracle.jdbc.driver.OracleDriver" + userid="${ora.user}" + password="${ora.passwd}" + url="${ora.url}" + classpath="${classes12.zip}" + onerror="continue" + print="yes" /> - <antcall target="undeploy-common"/> + <antcall target="undeploy-common"/> - <antcall target="delete-jdbc-resource-common"> + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/s1qeDB-stress"/> </antcall> - <antcall target="delete-jdbc-connpool-common"> + <antcall target="delete-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-stress"/> </antcall> - </target> + </target> <target name="usage"> <antcall target="usage-common"/> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/stress/client/SimpleBMPClient.java index f2817e7..4fa35f8 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress/client/SimpleBMPClient.java
@@ -24,48 +24,48 @@ import com.sun.s1asdev.jdbc.stress.ejb.SimpleBMP; public class SimpleBMPClient { - + // Invoke with args: #clients, #minutes public static void main(String[] args) throws Exception { - int numClients = 10; //10 clients - int numMinutes = 10; // 10 minutes - if (args.length == 2) { + int numClients = 10; //10 clients + int numMinutes = 10; // 10 minutes + if (args.length == 2) { numClients = Integer.parseInt( args[0] ); - numMinutes = Integer.parseInt( args[1] ); - } - + numMinutes = Integer.parseInt( args[1] ); + } + SimpleBMPClient client = new SimpleBMPClient(); - System.out.println("-=-=-=-=-=-=- Running for "+ numMinutes - +" minutes -=-=-=-=-=-=-=-"); - client.runTest( numClients, numMinutes ); - } - + System.out.println("-=-=-=-=-=-=- Running for "+ numMinutes + +" minutes -=-=-=-=-=-=-=-"); + client.runTest( numClients, numMinutes ); + } + public void runTest(int numClients, int numMinutes ) throws Exception { SimpleBMPClientThread[] threads = new SimpleBMPClientThread[ numClients ]; - for (int i = 0 ; i < numClients; i++ ) { - try { - threads[i] = new SimpleBMPClientThread(i); - } catch( Exception e) { - System.out.println("Could not create thread : " + i); - e.printStackTrace(); - } - threads[i].start(); - } - - //Let it all run for few hours and then kill all threads - System.out.println("Waiting for threads to do work now..."); - try { - //numMinutes min * 60 sec * 1000 = millis - Thread.sleep( numMinutes * 60 * 1000 ); - } catch(InterruptedException ie) { - ie.printStackTrace(); - } + for (int i = 0 ; i < numClients; i++ ) { + try { + threads[i] = new SimpleBMPClientThread(i); + } catch( Exception e) { + System.out.println("Could not create thread : " + i); + e.printStackTrace(); + } + threads[i].start(); + } - System.out.println("Interrupting threads now..."); - for (int i = 0 ; i < numClients; i++ ) { - threads[i].runFlag = false; - } - } + //Let it all run for few hours and then kill all threads + System.out.println("Waiting for threads to do work now..."); + try { + //numMinutes min * 60 sec * 1000 = millis + Thread.sleep( numMinutes * 60 * 1000 ); + } catch(InterruptedException ie) { + ie.printStackTrace(); + } + + System.out.println("Interrupting threads now..."); + for (int i = 0 ; i < numClients; i++ ) { + threads[i].runFlag = false; + } + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress/client/SimpleBMPClientThread.java b/appserver/tests/appserv-tests/devtests/jdbc/stress/client/SimpleBMPClientThread.java index 9d13b81..41aa292 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress/client/SimpleBMPClientThread.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress/client/SimpleBMPClientThread.java
@@ -37,24 +37,24 @@ javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); simpleBMP = simpleBMPHome.create(); } - + public void run() { int numRan = 0; - int numPassed = 0; + int numPassed = 0; System.out.println("Thread : " +id_ + " running"); while( runFlag == true ) { - numRan++; - try { - if ( simpleBMP.test1( id_) ) { + numRan++; + try { + if ( simpleBMP.test1( id_) ) { numPassed++; - } - } catch( Exception e) { - System.out.println( "Failed to run after : " + numPassed ); - break; - } - } + } + } catch( Exception e) { + System.out.println( "Failed to run after : " + numPassed ); + break; + } + } - System.out.println("Thread : "+id_ + " ran : " + numRan + - " passed: " + numPassed ); - } + System.out.println("Thread : "+id_ + " ran : " + numRan + + " passed: " + numPassed ); + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/stress/descriptor/ejb-jar.xml index 0f2e511..41c2ce5 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress/descriptor/ejb-jar.xml
@@ -57,6 +57,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/stress/ejb/SimpleBMPBean.java index a8d570c..601cad5 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress/ejb/SimpleBMPBean.java
@@ -30,74 +30,74 @@ int id; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } - + public boolean test1(int testId) { - Connection conn = null; - boolean passed = true; - try { - conn = ds.getConnection(); + Connection conn = null; + boolean passed = true; + try { + conn = ds.getConnection(); insertEntry( testId, "1234567890", conn); //queryTable( conn ); - emptyTable( conn, testId ); - } catch (Exception e) { - e.printStackTrace(); - passed = false; - } finally { - if ( conn != null ) { - try { conn.close(); } catch( Exception e1) {} - } - } - - return passed; - + emptyTable( conn, testId ); + } catch (Exception e) { + e.printStackTrace(); + passed = false; + } finally { + if ( conn != null ) { + try { conn.close(); } catch( Exception e1) {} + } } - + + return passed; + + } + private void insertEntry( int id, String phone, Connection con ) throws SQLException { - + PreparedStatement stmt = con.prepareStatement( - "insert into O_Customer values (?, ?)" ); + "insert into O_Customer values (?, ?)" ); - stmt.setInt(1, id); - stmt.setString(2, phone); + stmt.setInt(1, id); + stmt.setString(2, phone); - stmt.executeUpdate(); - stmt.close(); + stmt.executeUpdate(); + stmt.close(); } private void emptyTable( Connection con, int testId ) { try { Statement stmt = con.createStatement(); - - stmt.execute("delete * from O_Customer WHERE c_id="+testId); - stmt.close(); + + stmt.execute("delete * from O_Customer WHERE c_id="+testId); + stmt.close(); } catch( Exception e) { - } - + } + } private void queryTable( Connection con ) { try { - Statement stmt = con.createStatement(); - ResultSet rs = stmt.executeQuery("select * from O_Customer"); - while( rs.next() ) ; - rs.close(); - stmt.close(); - } catch( Exception e) { - } + Statement stmt = con.createStatement(); + ResultSet rs = stmt.executeQuery("select * from O_Customer"); + while( rs.next() ) ; + rs.close(); + stmt.close(); + } catch( Exception e) { + } } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/stress/sql/create_pointbase.sql index e4914f6..f256076 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/stress/sql/drop_pointbase.sql index 70d1fcc..d854b95 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/stress1/build.properties index a413a79..a8ddb35 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/build.properties
@@ -15,10 +15,10 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-stresscmp"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar-team.xml" value="descriptor/ejb-jar-team.xml"/> @@ -26,11 +26,11 @@ <property name="sun-ejb-jar-team.xml" value="descriptor/sun-ejb-jar-team.xml"/> <property name="sun-ejb-jar-roster.xml" value="descriptor/sun-ejb-jar-roster.xml"/> <property name="sun-cmp-mappings.xml" value="descriptor/sun-cmp-mappings.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="dbschema" value="sql/RosterSchema.dbschema"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/stress1/build.xml index 84c3846..3b49a7e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/build.xml
@@ -36,7 +36,7 @@ <target name="clean" depends="init-common"> <antcall target="clean-common"/> </target> - + <target name="compile" depends="clean"> <antcall target="compile-common"> <param name="src" value="util"/> @@ -55,43 +55,43 @@ <antcall target="package-team-jar"/> <antcall target="appclient-jar-common"/> <antcall target="package-ear"/> - </target> + </target> <target name="package-roster-jar"> <antcall target="package-ejbjar-common"> <param name="ejb-jar.xml" value="${ejb-jar-roster.xml}"/> <param name="sun-ejb-jar.xml" value="${sun-ejb-jar-roster.xml}"/> <param name="ejbjar.files" value="${build.classes.dir}"/> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/LeagueDetails.class,**/PlayerDetails.class, **/TeamDetails.class,**/*Roster*.class,**/Debug.class"/> <param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/> </antcall> - </target> + </target> <target name="package-team-jar"> <antcall target="package-ejbjar-common"> <param name="ejb-jar.xml" value="${ejb-jar-team.xml}"/> <param name="sun-ejb-jar.xml" value="${sun-ejb-jar-team.xml}"/> <param name="ejbjar.files" value="${build.classes.dir}"/> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*League*.class,**/*Player*.class,**/*Team*.class,**/Debug.class,**/*dbschema*" /> <param name="ejb.jar" value="${assemble.dir}/${appname}-team-ejb.jar"/> </antcall> - </target> + </target> <target name="package-ear"> <delete file="${assemble.dir}/${appname}.ear"/> <mkdir dir="${assemble.dir}"/> - <mkdir dir="${build.classes.dir}/META-INF"/> + <mkdir dir="${build.classes.dir}/META-INF"/> <ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}"> <fileset dir="${assemble.dir}"> <include name="*.jar"/> </fileset> <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/> - </ear> + </ear> </target> - + <target name="deploy" depends="init-common"> <antcall target="deploy-common"/> </target> @@ -101,10 +101,10 @@ <antcall target="create-jdbc-connpool-common"> <param name="jdbc.resource.type" value="javax.sql.DataSource"/> <param name="jdbc.conpool.name" value="${poolname}"/> - <param name="db.class" value="oracle.jdbc.pool.OracleDataSource"/> - <param name="db.user" value="${ora.user}"/> - <param name="db.pwd" value="${ora.passwd}"/> - <param name="db.url" value="${ora.sid}"/> + <param name="db.class" value="oracle.jdbc.pool.OracleDataSource"/> + <param name="db.user" value="${ora.user}"/> + <param name="db.pwd" value="${ora.passwd}"/> + <param name="db.url" value="${ora.sid}"/> </antcall> <antcall target="asadmin-common"> <param name="admin.command" value="set"/> @@ -114,7 +114,7 @@ <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${poolname}.property.URL=${ora.url}"/> </antcall> - + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${poolname}.property.ServerName=129.158.229.239"/> @@ -128,7 +128,7 @@ <antcall target="create-persistence-resource-common"> <param name="pm.resource.name" value="jdo/s1qePM-stress-cmp"/> - <param name="jdbc.resource.name" value="jdbc/s1qeDB-stress-cmp"/> + <param name="jdbc.resource.name" value="jdbc/s1qeDB-stress-cmp"/> </antcall> <antcall target="create-tables"/> @@ -138,17 +138,17 @@ <echo message="Executing sql from ${sql.file}"/> <sql src="sql/create_pointbase.sql" - driver="oracle.jdbc.driver.OracleDriver" - userid="${ora.user}" - password="${ora.passwd}" - url="${ora.url}" - classpath="${classes12.zip}" - onerror="continue" - print="yes" + driver="oracle.jdbc.driver.OracleDriver" + userid="${ora.user}" + password="${ora.passwd}" + url="${ora.url}" + classpath="${classes12.zip}" + onerror="continue" + print="yes" /> - + </target> - + <target name="run" depends="init-common"> <antcall target="create-tables"/> <antcall target="runclient-common"/> @@ -157,18 +157,18 @@ <target name="undeploy" depends="init-common"> <antcall target="undeploy-common"/> </target> - + <target name="drop-tables"> <echo message="Executing sql from ${sql.file}"/> <sql src="sql/drop_pointbase.sql" - driver="oracle.jdbc.driver.OracleDriver" - userid="${ora.user}" - password="${ora.passwd}" - url="${ora.url}" - classpath="${classes12.zip}" - onerror="continue" - print="yes" + driver="oracle.jdbc.driver.OracleDriver" + userid="${ora.user}" + password="${ora.passwd}" + url="${ora.url}" + classpath="${classes12.zip}" + onerror="continue" + print="yes" /> </target> @@ -176,14 +176,14 @@ <antcall target="delete-persistence-resource-common"> <param name="pm.resource.name" value="jdo/s1qePM-stress-cmp"/> </antcall> - <antcall target="delete-jdbc-resource-common"> + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/s1qeDB-stress-cmp"/> </antcall> - <antcall target="delete-jdbc-connpool-common"> + <antcall target="delete-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="${poolname}"/> </antcall> <antcall target="drop-tables"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/client/RosterClient.java b/appserver/tests/appserv-tests/devtests/jdbc/stress1/client/RosterClient.java index 403bcd8..8dcc230 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/client/RosterClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/client/RosterClient.java
@@ -23,48 +23,48 @@ import com.sun.s1asdev.jdbc.stress1.ejb.*; public class RosterClient { - + // Invoke with args: #clients, #minutes public static void main(String[] args) throws Exception { - int numClients = 10; //10 clients - int numMinutes = 10; // 10 minutes - if (args.length == 2) { + int numClients = 10; //10 clients + int numMinutes = 10; // 10 minutes + if (args.length == 2) { numClients = Integer.parseInt( args[0] ); - numMinutes = Integer.parseInt( args[1] ); - } - + numMinutes = Integer.parseInt( args[1] ); + } + RosterClient client = new RosterClient(); - System.out.println("-=-=-=-=-=-=- Running for "+ numMinutes - +" minutes -=-=-=-=-=-=-=-"); - client.runTest( numClients, numMinutes ); - } - + System.out.println("-=-=-=-=-=-=- Running for "+ numMinutes + +" minutes -=-=-=-=-=-=-=-"); + client.runTest( numClients, numMinutes ); + } + public void runTest(int numClients, int numMinutes ) throws Exception { RosterClientThread[] threads = new RosterClientThread[ numClients ]; - for (int i = 0 ; i < numClients; i++ ) { - try { - threads[i] = new RosterClientThread(i); - } catch( Exception e) { - System.out.println("Could not create thread : " + i); - e.printStackTrace(); - } - threads[i].start(); - } - - //Let it all run for few hours and then kill all threads - System.out.println("Waiting for threads to do work now..."); - try { - //numMinutes min * 60 sec * 1000 = millis - Thread.sleep( numMinutes * 60 * 1000 ); - } catch(InterruptedException ie) { - ie.printStackTrace(); - } + for (int i = 0 ; i < numClients; i++ ) { + try { + threads[i] = new RosterClientThread(i); + } catch( Exception e) { + System.out.println("Could not create thread : " + i); + e.printStackTrace(); + } + threads[i].start(); + } - System.out.println("Interrupting threads now..."); - for (int i = 0 ; i < numClients; i++ ) { - threads[i].runFlag = false; - } - } + //Let it all run for few hours and then kill all threads + System.out.println("Waiting for threads to do work now..."); + try { + //numMinutes min * 60 sec * 1000 = millis + Thread.sleep( numMinutes * 60 * 1000 ); + } catch(InterruptedException ie) { + ie.printStackTrace(); + } + + System.out.println("Interrupting threads now..."); + for (int i = 0 ; i < numClients; i++ ) { + threads[i].runFlag = false; + } + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/client/RosterClientThread.java b/appserver/tests/appserv-tests/devtests/jdbc/stress1/client/RosterClientThread.java index afb29d8..0a5bdff 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/client/RosterClientThread.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/client/RosterClientThread.java
@@ -33,7 +33,7 @@ private static SimpleReporterAdapter status = new SimpleReporterAdapter("appserv-tests"); - + public RosterClientThread( int clientID ) throws Exception { clientID_ = clientID; Context initial = new InitialContext(); @@ -44,22 +44,22 @@ } public void run() { int numRan = 0; - int numPassed = 0; + int numPassed = 0; System.out.println("Thread : " +clientID_ + " running"); while( runFlag == true ) { - numRan++; + numRan++; try { insertInfo(myRoster); getSomeInfo(myRoster); getMoreInfo(myRoster); - numPassed++; + numPassed++; } catch (Exception ex) { - System.out.println( "Failed to run after : " + numPassed ); - break; - } + System.out.println( "Failed to run after : " + numPassed ); + break; } - System.out.println("Thread: " + clientID_ + " ran: " + numRan + - " passed: " + numPassed ); + } + System.out.println("Thread: " + clientID_ + " ran: " + numRan + + " passed: " + numPassed ); } private static void getSomeInfo(Roster myRoster) { @@ -118,7 +118,7 @@ playerList = myRoster.getPlayersByPosition("defender"); playerList = myRoster.getAllPlayers(); playerList = myRoster.getPlayersNotOnTeam(); - playerList = myRoster.getPlayersByPositionAndName("power forward", + playerList = myRoster.getPlayersByPositionAndName("power forward", "Jack Patterson"); playerList = myRoster.getPlayersByCity("Truckee"); playerList = myRoster.getPlayersBySport("Soccer"); @@ -165,7 +165,7 @@ myRoster.createTeamInLeague(new TeamDetails( "T2", "Gophers", "Manteca"), "L1"); - + myRoster.createTeamInLeague(new TeamDetails( "T3", "Deer", "Bodie"), "L2"); @@ -283,7 +283,7 @@ // Players, no team myRoster.createPlayer(new PlayerDetails( "P26", "Hobie Jackson", "pitcher", 582.00)); - + myRoster.createPlayer(new PlayerDetails( "P27", "Melinda Kendall", "catcher", 677.00));
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LeagueBean.java b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LeagueBean.java index 4195b64..f6ed84f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LeagueBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LeagueBean.java
@@ -29,7 +29,7 @@ public abstract String getLeagueId(); public abstract void setLeagueId(String id); - + public abstract String getName(); public abstract void setName(String name); @@ -73,31 +73,31 @@ setSport(sport); return null; } - + public void ejbPostCreate (String id, String name, String sport) throws CreateException { } public void setEntityContext(EntityContext ctx) { context = ctx; } - + public void unsetEntityContext() { context = null; } - + public void ejbRemove() { //Debug.print("LeagueBean ejbRemove"); } - + public void ejbLoad() { //Debug.print("LeagueBean ejbLoad"); } - + public void ejbStore() { //Debug.print("LeagueBean ejbStore"); } - + public void ejbPassivate() { } - + public void ejbActivate() { } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalLeagueHome.java b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalLeagueHome.java index 6dc99ca..2704847 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalLeagueHome.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalLeagueHome.java
@@ -20,10 +20,10 @@ import jakarta.ejb.*; public interface LocalLeagueHome extends EJBLocalHome { - + public LocalLeague create (String id, String name, String sport) throws CreateException; - + public LocalLeague findByPrimaryKey (String id) throws FinderException; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalPlayerHome.java b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalPlayerHome.java index 2b3ae76..da46500 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalPlayerHome.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalPlayerHome.java
@@ -20,39 +20,39 @@ import jakarta.ejb.*; public interface LocalPlayerHome extends EJBLocalHome { - + public LocalPlayer create (String id, String name, String position, double salary) throws CreateException; - + public LocalPlayer findByPrimaryKey (String id) throws FinderException; - - public Collection findByPosition(String position) + + public Collection findByPosition(String position) throws FinderException; - public Collection findByHigherSalary(String name) + public Collection findByHigherSalary(String name) throws FinderException; - public Collection findBySalaryRange(double low, double high) + public Collection findBySalaryRange(double low, double high) throws FinderException; - public Collection findByLeague(LocalLeague league) + public Collection findByLeague(LocalLeague league) throws FinderException; - public Collection findBySport(String sport) + public Collection findBySport(String sport) throws FinderException; - public Collection findByCity(String city) + public Collection findByCity(String city) throws FinderException; - public Collection findAll() + public Collection findAll() throws FinderException; - public Collection findNotOnTeam() + public Collection findNotOnTeam() throws FinderException; - public Collection findByPositionAndName(String position, + public Collection findByPositionAndName(String position, String name) throws FinderException; public Collection findByTest (String parm1, String parm2, String parm3)
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalTeamHome.java b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalTeamHome.java index d0f2fa8..9f91550 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalTeamHome.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/LocalTeamHome.java
@@ -22,7 +22,7 @@ public interface LocalTeamHome extends EJBLocalHome { public LocalTeam create (String id, String name, String city) throws CreateException; - + public LocalTeam findByPrimaryKey (String id) throws FinderException; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/PlayerBean.java b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/PlayerBean.java index 694bd60..1e555e5 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/PlayerBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/PlayerBean.java
@@ -28,7 +28,7 @@ // Access methods for persistent fields public abstract String getPlayerId(); public abstract void setPlayerId(String id); - + public abstract String getName(); public abstract void setName(String name); @@ -51,13 +51,13 @@ // Business methods public Collection getLeagues() throws FinderException { - LocalPlayer player = + LocalPlayer player = (LocalPlayer)context.getEJBLocalObject(); return ejbSelectLeagues(player); } public Collection getSports() throws FinderException { - LocalPlayer player = + LocalPlayer player = (LocalPlayer)context.getEJBLocalObject(); return ejbSelectSports(player); } @@ -73,31 +73,31 @@ setSalary(salary); return null; } - + public void ejbPostCreate (String id, String name, String position, double salary) throws CreateException { } public void setEntityContext(EntityContext ctx) { context = ctx; } - + public void unsetEntityContext() { context = null; } - + public void ejbRemove() { //Debug.print("PlayerBean ejbRemove"); } - + public void ejbLoad() { //Debug.print("PlayerBean ejbLoad"); } - + public void ejbStore() { //Debug.print("PlayerBean ejbStore"); } - + public void ejbPassivate() { } - + public void ejbActivate() { } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/Roster.java b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/Roster.java index 274047f..f6074dc 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/Roster.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/Roster.java
@@ -22,55 +22,55 @@ import com.sun.s1asdev.jdbc.stress1.util.*; public interface Roster extends EJBObject { - + // Players - public void createPlayer(PlayerDetails details) + public void createPlayer(PlayerDetails details) throws RemoteException; - public void addPlayer(String playerId, String teamId) + public void addPlayer(String playerId, String teamId) throws RemoteException; - public void removePlayer(String playerId) + public void removePlayer(String playerId) throws RemoteException; - public void dropPlayer(String playerId, String teamId) + public void dropPlayer(String playerId, String teamId) throws RemoteException; - public PlayerDetails getPlayer(String playerId) + public PlayerDetails getPlayer(String playerId) throws RemoteException; - public ArrayList getPlayersOfTeam(String teamId) + public ArrayList getPlayersOfTeam(String teamId) throws RemoteException; - public ArrayList getPlayersOfTeamCopy(String teamId) + public ArrayList getPlayersOfTeamCopy(String teamId) throws RemoteException; - public ArrayList getPlayersByPosition(String position) + public ArrayList getPlayersByPosition(String position) throws RemoteException; - public ArrayList getPlayersByHigherSalary(String name) + public ArrayList getPlayersByHigherSalary(String name) throws RemoteException; - public ArrayList getPlayersBySalaryRange(double low, double high) + public ArrayList getPlayersBySalaryRange(double low, double high) throws RemoteException; - public ArrayList getPlayersByLeagueId(String leagueId) + public ArrayList getPlayersByLeagueId(String leagueId) throws RemoteException; - public ArrayList getPlayersBySport(String sport) + public ArrayList getPlayersBySport(String sport) throws RemoteException; - public ArrayList getPlayersByCity(String city) + public ArrayList getPlayersByCity(String city) throws RemoteException; - public ArrayList getAllPlayers() + public ArrayList getAllPlayers() throws RemoteException; - public ArrayList getPlayersNotOnTeam() + public ArrayList getPlayersNotOnTeam() throws RemoteException; - public ArrayList getPlayersByPositionAndName(String position, + public ArrayList getPlayersByPositionAndName(String position, String name) throws RemoteException; public ArrayList getLeaguesOfPlayer(String playerId) @@ -81,27 +81,27 @@ // Teams - public ArrayList getTeamsOfLeague(String leagueId) + public ArrayList getTeamsOfLeague(String leagueId) throws RemoteException; - public void createTeamInLeague(TeamDetails details, String leagueId) + public void createTeamInLeague(TeamDetails details, String leagueId) throws RemoteException; - public void removeTeam(String teamId) + public void removeTeam(String teamId) throws RemoteException; - public TeamDetails getTeam(String teamId) + public TeamDetails getTeam(String teamId) throws RemoteException; // Leagues - public void createLeague(LeagueDetails details) + public void createLeague(LeagueDetails details) throws RemoteException; - public void removeLeague(String leagueId) + public void removeLeague(String leagueId) throws RemoteException; - public LeagueDetails getLeague(String leagueId) + public LeagueDetails getLeague(String leagueId) throws RemoteException; // Test
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/RosterBean.java b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/RosterBean.java index 592a6b5..ec9b3d8 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/RosterBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/RosterBean.java
@@ -43,17 +43,17 @@ return copyPlayersToDetails(players); } - public void createPlayer(PlayerDetails details) { + public void createPlayer(PlayerDetails details) { //Debug.print("RosterBean createPlayer"); try { - LocalPlayer player = playerHome.create(details.getId(), + LocalPlayer player = playerHome.create(details.getId(), details.getName(), details.getPosition(), details.getSalary()); } catch (Exception ex) { throw new EJBException(ex.getMessage()); } } - - public void addPlayer(String playerId, String teamId) { + + public void addPlayer(String playerId, String teamId) { //Debug.print("RosterBean addPlayer"); try { LocalTeam team = teamHome.findByPrimaryKey(teamId); @@ -64,7 +64,7 @@ } } - public void removePlayer(String playerId) { + public void removePlayer(String playerId) { //Debug.print("RosterBean removePlayer"); try { LocalPlayer player = playerHome.findByPrimaryKey(playerId); @@ -73,7 +73,7 @@ throw new EJBException(ex.getMessage()); } } - + public void dropPlayer(String playerId, String teamId) { //Debug.print("RosterBean dropPlayer"); try { @@ -98,7 +98,7 @@ return playerDetails; } - public ArrayList getPlayersOfTeam(String teamId) { + public ArrayList getPlayersOfTeam(String teamId) { //Debug.print("RosterBean getPlayersOfTeam"); Collection players = null; @@ -113,7 +113,7 @@ } - public ArrayList getPlayersOfTeamCopy(String teamId) { + public ArrayList getPlayersOfTeamCopy(String teamId) { //Debug.print("RosterBean getPlayersOfTeamCopy"); ArrayList playersList = null; @@ -128,7 +128,7 @@ } - public ArrayList getTeamsOfLeague(String leagueId) { + public ArrayList getTeamsOfLeague(String leagueId) { //Debug.print("RosterBean getTeamsOfLeague"); ArrayList detailsList = new ArrayList(); @@ -164,7 +164,7 @@ } - public ArrayList getPlayersByHigherSalary(String name) { + public ArrayList getPlayersByHigherSalary(String name) { //Debug.print("RosterBean getPlayersByByHigherSalary"); Collection players = null; @@ -176,7 +176,7 @@ return copyPlayersToDetails(players); } // getPlayersByHigherSalary - public ArrayList getPlayersBySalaryRange(double low, double high) { + public ArrayList getPlayersBySalaryRange(double low, double high) { //Debug.print("RosterBean getPlayersBySalaryRange"); Collection players = null; @@ -189,7 +189,7 @@ return copyPlayersToDetails(players); } // getPlayersBySalaryRange - public ArrayList getPlayersByLeagueId(String leagueId) { + public ArrayList getPlayersByLeagueId(String leagueId) { //Debug.print("RosterBean getPlayersByLeagueId"); Collection players = null; @@ -202,7 +202,7 @@ return copyPlayersToDetails(players); } // getPlayersByLeagueId - public ArrayList getPlayersBySport(String sport) { + public ArrayList getPlayersBySport(String sport) { //Debug.print("RosterBean getPlayersBySport"); Collection players = null; @@ -214,7 +214,7 @@ return copyPlayersToDetails(players); } // getPlayersBySport - public ArrayList getPlayersByCity(String city) { + public ArrayList getPlayersByCity(String city) { //Debug.print("RosterBean getPlayersByCity"); Collection players = null; @@ -226,7 +226,7 @@ return copyPlayersToDetails(players); } // getPlayersByCity - public ArrayList getAllPlayers() { + public ArrayList getAllPlayers() { //Debug.print("RosterBean getAllPlayers"); Collection players = null; @@ -239,7 +239,7 @@ return copyPlayersToDetails(players); } // getAllPlayers - public ArrayList getPlayersNotOnTeam() { + public ArrayList getPlayersNotOnTeam() { //Debug.print("RosterBean getPlayersNotOnTeam"); Collection players = null; @@ -251,8 +251,8 @@ return copyPlayersToDetails(players); } // getPlayersNotOnTeam - public ArrayList getPlayersByPositionAndName(String position, - String name) { + public ArrayList getPlayersByPositionAndName(String position, + String name) { //Debug.print("RosterBean getPlayersByPositionAndName"); Collection players = null; @@ -264,7 +264,7 @@ return copyPlayersToDetails(players); } // getPlayersByPositionAndName - public ArrayList getLeaguesOfPlayer(String playerId) { + public ArrayList getLeaguesOfPlayer(String playerId) { //Debug.print("RosterBean getLeaguesOfPlayer"); ArrayList detailsList = new ArrayList(); Collection leagues = null; @@ -275,7 +275,7 @@ } catch (Exception ex) { throw new EJBException(ex.getMessage()); } - + Iterator i = leagues.iterator(); while (i.hasNext()) { LocalLeague league = (LocalLeague) i.next(); @@ -287,7 +287,7 @@ return detailsList; } // getLeaguesOfPlayer - public ArrayList getSportsOfPlayer(String playerId) { + public ArrayList getSportsOfPlayer(String playerId) { //Debug.print("RosterBean getSportsOfPlayer"); ArrayList sportsList = new ArrayList(); Collection sports = null; @@ -298,7 +298,7 @@ } catch (Exception ex) { throw new EJBException(ex.getMessage()); } - + Iterator i = sports.iterator(); while (i.hasNext()) { String sport = (String) i.next(); @@ -308,7 +308,7 @@ } // getSportsOfPlayer // Team business methods - public void createTeamInLeague(TeamDetails details, String leagueId) { + public void createTeamInLeague(TeamDetails details, String leagueId) { //Debug.print("RosterBean createTeamInLeague"); try { LocalLeague league = leagueHome.findByPrimaryKey(leagueId); @@ -320,8 +320,8 @@ throw new EJBException(ex.getMessage()); } } - - public void removeTeam(String teamId) { + + public void removeTeam(String teamId) { //Debug.print("RosterBean removeTeam"); try { LocalTeam team = teamHome.findByPrimaryKey(teamId); @@ -330,7 +330,7 @@ throw new EJBException(ex.getMessage()); } } - + public TeamDetails getTeam(String teamId) { //Debug.print("RosterBean getTeam"); TeamDetails teamDetails = null; @@ -345,18 +345,18 @@ } // League business methods - public void createLeague(LeagueDetails details) { + public void createLeague(LeagueDetails details) { //Debug.print("RosterBean createLeague"); try { - LocalLeague league = leagueHome.create(details.getId(), + LocalLeague league = leagueHome.create(details.getId(), details.getName(), details.getSport()); } catch (Exception ex) { throw new EJBException(ex.getMessage()); } } - - public void removeLeague(String leagueId) { + + public void removeLeague(String leagueId) { //Debug.print("RosterBean removeLeague"); try { LocalLeague league = leagueHome.findByPrimaryKey(leagueId); @@ -365,7 +365,7 @@ throw new EJBException(ex.getMessage()); } } - + public LeagueDetails getLeague(String leagueId) { //Debug.print("RosterBean getLeague"); LeagueDetails leagueDetails = null; @@ -379,7 +379,7 @@ } return leagueDetails; } - + // SessionBean methods public void ejbCreate() throws CreateException { //Debug.print("RosterBean ejbCreate"); @@ -412,7 +412,7 @@ public RosterBean() {} public void ejbRemove() {} public void setSessionContext(SessionContext sc) {} - + // Private methods private LocalPlayerHome lookupPlayer() throws NamingException { Context initial = new InitialContext();
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/TeamBean.java b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/TeamBean.java index e4562b3..55c20ff 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/TeamBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/ejb/TeamBean.java
@@ -30,7 +30,7 @@ public abstract String getTeamId(); public abstract void setTeamId(String id); - + public abstract String getName(); public abstract void setName(String name); @@ -95,30 +95,30 @@ setCity(city); return null; } - + public void ejbPostCreate (String id, String name, String city) throws CreateException { } public void setEntityContext(EntityContext ctx) { context = ctx; } - + public void unsetEntityContext() { context = null; } - + public void ejbRemove() { //Debug.print("TeamBean ejbRemove"); } - + public void ejbLoad() { //Debug.print("TeamBean ejbLoad"); } - + public void ejbStore() { //Debug.print("TeamBean ejbStore"); } - + public void ejbPassivate() { } public void ejbActivate() { } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/stress1/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/stress1/sql/create_pointbase.sql index 8414770..bf0a84e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/stress1/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/stress1/sql/create_pointbase.sql
@@ -3,35 +3,35 @@ DROP TABLE Team; DROP TABLE League; -CREATE TABLE Player +CREATE TABLE Player ( - player_Id VARCHAR(255) PRIMARY KEY, - name VARCHAR(255) , - position VARCHAR(255) , - salary DOUBLE PRECISION NOT NULL + player_Id VARCHAR(255) PRIMARY KEY, + name VARCHAR(255) , + position VARCHAR(255) , + salary DOUBLE PRECISION NOT NULL ); -CREATE TABLE League +CREATE TABLE League ( - league_Id VARCHAR(255) PRIMARY KEY, - name VARCHAR(255) , - sport VARCHAR(255) + league_Id VARCHAR(255) PRIMARY KEY, + name VARCHAR(255) , + sport VARCHAR(255) ); -CREATE TABLE Team +CREATE TABLE Team ( - team_Id VARCHAR(255) PRIMARY KEY, - city VARCHAR(255) , - name VARCHAR(255) , - league_Id VARCHAR(255) , - FOREIGN KEY (league_Id) REFERENCES League (league_Id) + team_Id VARCHAR(255) PRIMARY KEY, + city VARCHAR(255) , + name VARCHAR(255) , + league_Id VARCHAR(255) , + FOREIGN KEY (league_Id) REFERENCES League (league_Id) ); -CREATE TABLE TeamPlayer +CREATE TABLE TeamPlayer ( - player_Id VARCHAR(255) , - team_Id VARCHAR(255), + player_Id VARCHAR(255) , + team_Id VARCHAR(255), CONSTRAINT pk_TeamPlayer PRIMARY KEY (player_Id , team_Id) , - FOREIGN KEY (team_Id) REFERENCES Team (team_Id), - FOREIGN KEY (player_Id) REFERENCES Player (player_Id) + FOREIGN KEY (team_Id) REFERENCES Team (team_Id), + FOREIGN KEY (player_Id) REFERENCES Player (player_Id) );
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/build.properties index a3bab1f..1c09977 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/build.properties
@@ -15,14 +15,14 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="switchoffACCconnpooling"/> -<property name="appname" value="${module}"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> +<property name="appname" value="${module}"/> \u0020 +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> <property name="oracledb.port" value="1521"/> <property name="oracledb.host" value="natraj.sfbay.sun.com"/> <property name="oracledb.sid" value="dbsmpl1"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/build.xml index 7f6a540..c8cbb1d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/build.xml
@@ -36,7 +36,7 @@ <target name="clean" depends="init-common"> <antcall target="clean-common"/> </target> - + <target name="compile" depends="clean"> <antcall target="compile-common"> <param name="src" value="client"/> @@ -44,17 +44,17 @@ </target> <target name="build" depends="compile"> - <mkdir dir="${assemble.dir}"/> + <mkdir dir="${assemble.dir}"/> <antcall target="package-appclientjar-common"> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> - <param name="appclientjar.files" + <param name="appclientjar.files" value="${build.classes.dir}" /> - <param name="appclient.jar" - value="${assemble.dir}/${appname}AppClient.jar"/> + <param name="appclient.jar" + value="${assemble.dir}/${appname}AppClient.jar"/> </antcall> - </target> - + </target> + <!-- run appclient in AppServ --> <target name="myrunclient" depends="init-common"> <echo message="appclient -client ${assemble.dir}/${appname}AppClient.jar -name ${appname}Client -textauth -user j2ee -password j2ee -xml ${env.S1AS_HOME}/domains/${admin.domain}/config/glassfish-acc.xml ${appclient.application.args}"/> @@ -81,9 +81,9 @@ <target name="run" depends="init-common"> <antcall target="myrunclient"/> </target> - + <target name="unsetup" depends="init-common"> - <antcall target="delete-jdbc-resource-common"> + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/nonxaresource"/> </antcall> @@ -91,7 +91,7 @@ <param name="jdbc.conpool.name" value="jdbc-derby-pool"/> </antcall> - <antcall target="delete-jdbc-resource-common"> + <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/xaresource"/> </antcall> @@ -99,7 +99,7 @@ <param name="jdbc.conpool.name" value="jdbc-derby-xa-pool"/> </antcall> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/client/Client.java index 960771e..4bb6af8 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/switchoffACCconnpooling/client/Client.java
@@ -43,23 +43,23 @@ * @author kshitiz */ public class Client { - + private static int count = 10; private static boolean rollback; private static String tableName = "COFFEE"; - + //static SimpleReporterAdapter stat = new SimpleReporterAdapter("appserv-tests"); private static SimpleReporterAdapter stat = new SimpleReporterAdapter(); private static final String testSuite = "switchoffACCconnpooling"; private static int testCount = 0; - + private static boolean isXA=false; /** Creates a new instance of UnpooledTest */ public Client() { } - - + + /** * @param args the command line arguments */ @@ -77,9 +77,9 @@ runTest(); stat.printSummary(); } - + private static void runTest() { - + //Connection opened and closed within transaction //non-xa resource isXA = false; @@ -87,8 +87,8 @@ //xa resource isXA = true; test1("jdbc/xaresource"); - - //Connection opened within transaction + + //Connection opened within transaction //but closed after transaction isXA = false; //non-xa resource @@ -96,47 +96,47 @@ //xa resource isXA = true; test2("jdbc/xaresource"); - + //XA and Non-XA resource within same transaction //non-xa resource and xa resource together test3("jdbc/nonxaresource", "jdbc/xaresource"); - - test4("jdbc/nonxaresource", "jdbc/xaresource"); + + test4("jdbc/nonxaresource", "jdbc/xaresource"); //openAndCloseConnection("jdbc/oraclexa", 40); } - + public static void test1(String dsName) { UserTransaction ut = null; try { InitialContext ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup(dsName); printConnection(ds); - + createTable(ds); - + int count1 = getCount(ds); System.out.println("count1 : " + count1); - + ut = (UserTransaction) ic.lookup("java:comp/UserTransaction"); ut.begin(); - + for(int i=0; i< count; i++) insertRow(ds); if(rollback) ut.rollback(); else ut.commit(); - + int count2=getCount(ds); - + System.out.println("count2 : " + count2); - + int diff = count2 - count1; if(( diff == count && !rollback) || (diff == 0 && rollback)) printStatus(true); else printStatus(false); - + } catch(Exception e){ printStatus(false); e.printStackTrace(); @@ -152,9 +152,9 @@ } } }; - + } - + public static void test2(String dsName) { UserTransaction ut = null; try { @@ -164,32 +164,32 @@ Connection[] con; createTable(ds); - + int count1 = getCount(ds); System.out.println("count1 : " + count1); - + ut = (UserTransaction) ic.lookup("java:comp/UserTransaction"); ut.begin(); - + con = openConnections(dsName, count); insertRow(con); closeConnections(con, count); - + if(rollback) ut.rollback(); else ut.commit(); - + int count2=getCount(ds); - + System.out.println("count2 : " + count2); - + int diff = count2 - count1; if(( diff == count && !rollback) || (diff == 0 && rollback)) printStatus(true); else printStatus(false); - + } catch(Exception e){ printStatus(false); e.printStackTrace(); @@ -205,69 +205,69 @@ } } }; - + } - - + + public static void test4(String dsName, String xaDsName) { UserTransaction ut = null; try { InitialContext ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup(dsName); - DataSource xads = (DataSource) ic.lookup(xaDsName); + DataSource xads = (DataSource) ic.lookup(xaDsName); printConnection(ds); Connection[] con; - Connection[] xaCon; + Connection[] xaCon; - isXA = false; + isXA = false; createTable(ds); isXA = true; - createTable(xads); + createTable(xads); - isXA = false; + isXA = false; int count1 = getCount(ds); - isXA = true; - int xacount1 = getCount(xads); + isXA = true; + int xacount1 = getCount(xads); System.out.println("count1 : " + count1 + " xacount1 : " + xacount1); - + ut = (UserTransaction) ic.lookup("java:comp/UserTransaction"); ut.begin(); - - con = openConnections(dsName, count); - xaCon = openConnections(xaDsName, 1); - isXA = false; - insertRow(con); - isXA = true; - insertRow(xaCon); - isXA = false; + con = openConnections(dsName, count); + xaCon = openConnections(xaDsName, 1); + isXA = false; + insertRow(con); + isXA = true; + insertRow(xaCon); + + isXA = false; closeConnections(con, count); - isXA = true; - closeConnections(xaCon, 1); - + isXA = true; + closeConnections(xaCon, 1); + if(rollback) ut.rollback(); else ut.commit(); - - isXA = false; - int count2=getCount(ds); - isXA = true; - int xacount2 = getCount(xads); - - System.out.println("count2 : " + count2 + " xacount2 : " + xacount2); - - int diff = count2 - count1; - int xadiff = xacount2 - xacount1; - if((( diff == count && !rollback) || (diff == 0 && rollback)) && - ((xadiff == 1 && !rollback) || (xadiff == 0 && rollback))) + isXA = false; + int count2=getCount(ds); + isXA = true; + int xacount2 = getCount(xads); + + System.out.println("count2 : " + count2 + " xacount2 : " + xacount2); + + int diff = count2 - count1; + int xadiff = xacount2 - xacount1; + + if((( diff == count && !rollback) || (diff == 0 && rollback)) && + ((xadiff == 1 && !rollback) || (xadiff == 0 && rollback))) printStatus(true); else printStatus(false); - + } catch(Exception e){ printStatus(false); e.printStackTrace(); @@ -283,10 +283,10 @@ } } }; - + } - - + + public static void test3(String ds1Name, String ds2Name) { UserTransaction ut = null; try { @@ -295,42 +295,42 @@ printConnection(ds1); DataSource ds2 = (DataSource) ic.lookup(ds2Name); printConnection(ds2); - + isXA = false; createTable(ds1); isXA = true; createTable(ds2); - + isXA = false; int count1 = getCount(ds1); isXA = true; int count3 = getCount(ds2); System.out.println("count1 : " + count1); System.out.println("count3 : " + count3); - + ut = (UserTransaction) ic.lookup("java:comp/UserTransaction"); ut.begin(); - + isXA = false; for(int i=0; i< count; i++) insertRow(ds1); isXA = true; for(int i=0; i< count; i++) insertRow(ds2); - + if(rollback) ut.rollback(); else ut.commit(); - + isXA = false; int count2=getCount(ds1); isXA = true; int count4=getCount(ds2); - + System.out.println("count2 : " + count2); System.out.println("count4 : " + count4); - + int diff1 = count2 - count1; int diff2 = count4 - count3; if((( diff1 == count && !rollback) || (diff1 == 0 && rollback)) @@ -338,7 +338,7 @@ printStatus(true); else printStatus(false); - + } catch(Exception e){ printStatus(false); e.printStackTrace(); @@ -354,21 +354,21 @@ } } }; - + } - + private static void createTable(final DataSource ds) throws SQLException { String tableName; if(isXA) tableName = "COFFEE_XA"; else tableName = "COFFEE"; - + Connection con; Statement stmt; con = ds.getConnection(); stmt = con.createStatement(); - + try{ stmt.executeUpdate("drop table " + tableName); }catch(Exception ex){ @@ -378,7 +378,7 @@ stmt.close(); con.close(); } - + private static int getCount(final DataSource ds) throws SQLException { String tableName; if(isXA) @@ -398,7 +398,7 @@ con.close(); return count; } - + private static void insertRow(final DataSource ds) throws SQLException { String tableName; if(isXA) @@ -413,7 +413,7 @@ stmt.close(); con.close(); } - + private static void insertRow(final Connection[] con) throws SQLException { String tableName; if(isXA) @@ -424,108 +424,108 @@ for(int i=0; i < con.length; i++){ stmt = con[i].createStatement(); stmt.executeUpdate("INSERT INTO " + tableName + " values ('COFFEE', 100)"); - stmt.close(); + stmt.close(); } } - - + + private static void printConnection(final DataSource ds) throws SQLException{ com.sun.appserv.jdbc.DataSource dsTyped = (com.sun.appserv.jdbc.DataSource) ds; Connection wrapper = dsTyped.getConnection(); System.out.println("Connection type : " + dsTyped.getConnection(wrapper)); wrapper.close(); } - + private static void openAndCloseConnection(String dsName, int count) { try { InitialContext ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup(dsName); com.sun.appserv.jdbc.DataSource dsTyped = (com.sun.appserv.jdbc.DataSource) ds; - HashSet<String> connections = new HashSet<String>(); + HashSet<String> connections = new HashSet<String>(); Connection con; - String conType; - boolean status = true; - int i = 0; + String conType; + boolean status = true; + int i = 0; for(; i < count; i++){ con = ds.getConnection(); - conType = dsTyped.getConnection(con).toString(); - System.out.println("Connection type : " + conType); + conType = dsTyped.getConnection(con).toString(); + System.out.println("Connection type : " + conType); con.close(); - if(!connections.add(conType)){ - status = false; - break; - } + if(!connections.add(conType)){ + status = false; + break; + } } - System.out.println("Total connection requested : " + count); - System.out.println("Total connection created : " + i); - System.out.println("Total number of unique connection : " + connections.size()); - printStatus(status); + System.out.println("Total connection requested : " + count); + System.out.println("Total connection created : " + i); + System.out.println("Total number of unique connection : " + connections.size()); + printStatus(status); }catch(Exception ex){ ex.printStackTrace(); } } - + private static void openMaxConnections(String dsName, int count) { DataSource ds = null; - try{ - InitialContext ic = new InitialContext(); - ds = (DataSource) ic.lookup(dsName); - }catch(NamingException ex){ - System.out.println("Unable to lookup datasource"); - ex.printStackTrace(); - return; - } - - Connection[] con = new Connection[count]; - int i = 0; - for(; i < count; i++){ - try{ - con[i] = ds.getConnection(); - }catch(SQLException ex){ - System.out.println("Unable to create max connections"); - printStatus(false); - } - } + try{ + InitialContext ic = new InitialContext(); + ds = (DataSource) ic.lookup(dsName); + }catch(NamingException ex){ + System.out.println("Unable to lookup datasource"); + ex.printStackTrace(); + return; + } - if(i == count){ - System.out.println("Able to create max connections"); - printStatus(true); - try{ - ds.getConnection(); - System.out.println("Able to create beyond max connections"); - printStatus(false); - }catch(SQLException ex){ - System.out.println("Unable to create beyond max connections"); - printStatus(true); - } - } - + Connection[] con = new Connection[count]; + int i = 0; + for(; i < count; i++){ + try{ + con[i] = ds.getConnection(); + }catch(SQLException ex){ + System.out.println("Unable to create max connections"); + printStatus(false); + } + } + + if(i == count){ + System.out.println("Able to create max connections"); + printStatus(true); + try{ + ds.getConnection(); + System.out.println("Able to create beyond max connections"); + printStatus(false); + }catch(SQLException ex){ + System.out.println("Unable to create beyond max connections"); + printStatus(true); + } + } + for(; i > 0; i--){ - try{ - con[i - 1].close(); - }catch(SQLException ex){ - System.out.println("Unable to close connection"); - } - } + try{ + con[i - 1].close(); + }catch(SQLException ex){ + System.out.println("Unable to close connection"); + } + } } private static Connection[] openConnections(String dsName, int count) throws NamingException, SQLException { InitialContext ic = new InitialContext(); DataSource ds = (DataSource) ic.lookup(dsName); - + Connection[] con = new Connection[count]; for(int i=0; i < count; i++) { con[i] = ds.getConnection(); - System.out.println("con[" + i+ "]=" + con[i]); - } + System.out.println("con[" + i+ "]=" + con[i]); + } return con; } - + private static void closeConnections(Connection[] con, int count) throws SQLException { for(int i=0; i < count; i++) con[i].close(); } - + private static void printStatus(boolean status){ String testcaseID = testSuite + "-test" + (++testCount) ; if(status){
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/build.properties index e5fc47e..8af7443 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-tracingsql"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/build.xml index 0dc2d73..f6f96b9 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/build.xml
@@ -36,7 +36,7 @@ <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"/> @@ -45,15 +45,15 @@ <param name="src" value="client"/> </antcall> <antcall target="compile-common"> - <param name="src" value="logger"/> + <param name="src" value="logger"/> </antcall> </target> <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/SimpleBMP.class, **/SimpleBMPHome.class,**/*Client*.class" /> </antcall> <jar jarfile="${sql-trace-listener-jar}" update="true"> @@ -64,8 +64,8 @@ <copyfile src="${sql-trace-listener-jar}" dest="${env.S1AS_HOME}/lib/sql-trace-listener.jar"/> <antcall target="restart-server"/> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -93,10 +93,10 @@ <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="runclient-common"/> - + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" @@ -111,7 +111,7 @@ <!-- To check reconfiguration of SQL Trace listeners --> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -125,11 +125,11 @@ <antcall target="delete-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="${tracingsql-poolname}"/> </antcall> - <antcall target="undeploy-common"/> - <delete file="${env.S1AS_HOME}/lib/sql-trace-listener.jar"/> - <delete file="${sql-trace-listener-jar}"/> - <antcall target="restart-server"/> - </target> + <antcall target="undeploy-common"/> + <delete file="${env.S1AS_HOME}/lib/sql-trace-listener.jar"/> + <delete file="${sql-trace-listener-jar}"/> + <antcall target="restart-server"/> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/client/SimpleBMPClient.java index cebc04d..198502e 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/client/SimpleBMPClient.java
@@ -29,34 +29,34 @@ public static void main(String[] args) throws Exception { - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "SqlTracing "; + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "SqlTracing "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleBMPHome"); - SimpleBMPHome simpleBMPHome = (SimpleBMPHome) + SimpleBMPHome simpleBMPHome = (SimpleBMPHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); stat.addDescription("JDBC Sql Tracing Tests"); /*if ( simpleBMP.statementTest() ) { - stat.addStatus(testSuite+" statementTest : ", stat.PASS); - } else { - stat.addStatus(testSuite+" statementTest : ", stat.FAIL); - }*/ + stat.addStatus(testSuite+" statementTest : ", stat.PASS); + } else { + stat.addStatus(testSuite+" statementTest : ", stat.FAIL); + }*/ - if ( simpleBMP.preparedStatementTest() ) { - stat.addStatus(testSuite+" preparedStatementTest : ", stat.PASS); - } else { - stat.addStatus(testSuite+" preparedStatementTest : ", stat.FAIL); - } + if ( simpleBMP.preparedStatementTest() ) { + stat.addStatus(testSuite+" preparedStatementTest : ", stat.PASS); + } else { + stat.addStatus(testSuite+" preparedStatementTest : ", stat.FAIL); + } - if( simpleBMP.compareRecords()) { - stat.addStatus(testSuite+" Sql Tracing Test : ", stat.PASS); - } else { - stat.addStatus(testSuite+" Sql Tracing Test : ", stat.FAIL); - } + if( simpleBMP.compareRecords()) { + stat.addStatus(testSuite+" Sql Tracing Test : ", stat.PASS); + } else { + stat.addStatus(testSuite+" Sql Tracing Test : ", stat.FAIL); + } /*if ( simpleBMP.callableStatementTest() ) { stat.addStatus(testSuite+" callableStatementTest : ", stat.PASS); } else {
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/descriptor/ejb-jar.xml index 260eeb7..0a8b092 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/descriptor/ejb-jar.xml
@@ -63,6 +63,6 @@ <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/descriptor/sun-ejb-jar.xml index 693fd8b..6425325 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/descriptor/sun-ejb-jar.xml
@@ -35,7 +35,7 @@ </resource-ref> <resource-ref> <res-ref-name>TracingDataSource</res-ref-name> - <jndi-name>jdbc/tracingsql-res</jndi-name> + <jndi-name>jdbc/tracingsql-res</jndi-name> <default-resource-principal> <name>DBUSER</name> <password>DBPASSWORD</password>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/ejb/SimpleBMPBean.java index 040881f..ab4cb68 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/ejb/SimpleBMPBean.java
@@ -29,19 +29,19 @@ protected DataSource tracingds; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - tracingds = (DataSource) context.lookup("java:comp/env/TracingDataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + tracingds = (DataSource) context.lookup("java:comp/env/TracingDataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } System.out.println("[**SimpleBMPBean**] Done with setEntityContext...."); } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } public boolean statementTest() { @@ -54,8 +54,8 @@ stmt = conFromDS.createStatement(); conFromStatement = stmt.getConnection(); - System.out.println("statement Test : conFromDS : " + conFromDS); - System.out.println("statement Test : conFromStatement : " + conFromStatement); + System.out.println("statement Test : conFromDS : " + conFromDS); + System.out.println("statement Test : conFromStatement : " + conFromStatement); if( conFromDS==conFromStatement || conFromDS.equals(conFromStatement) ){ result = true; @@ -146,8 +146,8 @@ stmt = conFromDS.prepareCall("select * from customer_stmt_wrapper"); conFromStatement = stmt.getConnection(); - System.out.println("Callable statement Test : conFromDS : " + conFromDS); - System.out.println("Callable statement Test : conFromStatement : " + conFromStatement); + System.out.println("Callable statement Test : conFromDS : " + conFromDS); + System.out.println("Callable statement Test : conFromStatement : " + conFromStatement); if( conFromDS==conFromStatement || conFromDS.equals(conFromStatement) ){ result = true; } @@ -177,8 +177,8 @@ dbmd = conFromDS.getMetaData(); conFromMetaData = dbmd.getConnection(); - System.out.println("statementTest : conFromDS : " + conFromDS); - System.out.println("statementTest : conFromDbMetadata : " + conFromMetaData); + System.out.println("statementTest : conFromDS : " + conFromDS); + System.out.println("statementTest : conFromDbMetadata : " + conFromMetaData); if( conFromDS==conFromMetaData || conFromDS.equals(conFromMetaData) ){ result = true; } @@ -204,8 +204,8 @@ rs = stmt.executeQuery("select * from customer_stmt_wrapper"); conFromResultSet = rs.getStatement().getConnection(); - System.out.println("ResultSet test : conFromDS : " + conFromDS); - System.out.println("ResultSet test : conFromResultSet: " + conFromResultSet); + System.out.println("ResultSet test : conFromDS : " + conFromDS); + System.out.println("ResultSet test : conFromResultSet: " + conFromResultSet); if( conFromDS==conFromResultSet || conFromDS.equals(conFromResultSet) ){ result = true; } @@ -233,71 +233,71 @@ } public boolean compareRecords() { - boolean result = false; + boolean result = false; Connection conFromDS = null; - Connection con1 = null; - Statement stmt1 = null; - Statement stmt = null; - ResultSet rs = null; - ResultSet rs1 = null; + Connection con1 = null; + Statement stmt1 = null; + Statement stmt = null; + ResultSet rs = null; + ResultSet rs1 = null; try{ conFromDS = tracingds.getConnection(); - con1 = tracingds.getConnection(); + con1 = tracingds.getConnection(); stmt = conFromDS.createStatement(); - stmt1 = con1.createStatement(); + stmt1 = con1.createStatement(); rs = stmt.executeQuery("select * from expected_sql_trace"); - rs1 = stmt1.executeQuery("select * from sql_trace"); + rs1 = stmt1.executeQuery("select * from sql_trace"); System.out.println("@@@@ ------------------------------------------"); - for(int i=0; i<5; i++) { + for(int i=0; i<5; i++) { - String className =""; - String methodName=""; + String className =""; + String methodName=""; String args=""; String expectedClassName=""; String expectedMethodName=""; String expectedArgs=""; - if(rs1.next()) { + if(rs1.next()) { className = rs1.getString(1).trim(); - methodName = rs1.getString(2).trim(); - args = rs1.getString(3).trim(); - System.out.println("@@@@@ class=" + className + "---"); - System.out.println("@@@@@ method=" + methodName + "---"); - System.out.println("@@@@@ args=" + args + "---"); - } - - if(rs.next()) { - expectedClassName = rs.getString(1).trim(); - expectedMethodName = rs.getString(2).trim(); - expectedArgs = rs.getString(3).trim(); - System.out.println("@@@@@ expectedClass = " + expectedClassName + "---"); - System.out.println("@@@@@ expectedMethod = " + expectedMethodName + "---"); - System.out.println("@@@@@ expectedArgs = " + expectedArgs + "---"); - } - System.out.println("@@@@ ------------------------------------------"); - - if(className.equals(expectedClassName) && methodName.equals(expectedMethodName) && args.equals(expectedArgs)) { - result = true; - } else { - return false; - } + methodName = rs1.getString(2).trim(); + args = rs1.getString(3).trim(); + System.out.println("@@@@@ class=" + className + "---"); + System.out.println("@@@@@ method=" + methodName + "---"); + System.out.println("@@@@@ args=" + args + "---"); + } - /*if(className != null && expectedClassName != null) { - if(className.equals(expectedClassName)) - result = true; - } - if(methodName != null && expectedMethodName != null) { - if(methodName.equals(expectedMethodName)) - result = true; - } - if(args != null && expectedArgs != null) { - if(args.equals(expectedArgs)) - result = true; - }*/ - } + if(rs.next()) { + expectedClassName = rs.getString(1).trim(); + expectedMethodName = rs.getString(2).trim(); + expectedArgs = rs.getString(3).trim(); + System.out.println("@@@@@ expectedClass = " + expectedClassName + "---"); + System.out.println("@@@@@ expectedMethod = " + expectedMethodName + "---"); + System.out.println("@@@@@ expectedArgs = " + expectedArgs + "---"); + } + System.out.println("@@@@ ------------------------------------------"); + + if(className.equals(expectedClassName) && methodName.equals(expectedMethodName) && args.equals(expectedArgs)) { + result = true; + } else { + return false; + } + + /*if(className != null && expectedClassName != null) { + if(className.equals(expectedClassName)) + result = true; + } + if(methodName != null && expectedMethodName != null) { + if(methodName.equals(expectedMethodName)) + result = true; + } + if(args != null && expectedArgs != null) { + if(args.equals(expectedArgs)) + result = true; + }*/ + } }catch(SQLException sqe){ - }finally{ + }finally{ try{ if(stmt != null){ @@ -332,7 +332,7 @@ } }catch(SQLException sqe){} } - return result; + return result; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/logger/com/sun/s1asdev/jdbc/tracingsql/logger/TraceLogger.java b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/logger/com/sun/s1asdev/jdbc/tracingsql/logger/TraceLogger.java index 99c7384..ae59b6d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/logger/com/sun/s1asdev/jdbc/tracingsql/logger/TraceLogger.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/logger/com/sun/s1asdev/jdbc/tracingsql/logger/TraceLogger.java
@@ -27,13 +27,13 @@ import java.sql.SQLException; public class TraceLogger implements SQLTraceListener { - - DataSource ds; - public TraceLogger() { - try { + + DataSource ds; + public TraceLogger() { + try { InitialContext ic = new InitialContext(); - ds = (DataSource) ic.lookup("jdbc/tracingsql-res"); - } catch(NamingException ex) {} + ds = (DataSource) ic.lookup("jdbc/tracingsql-res"); + } catch(NamingException ex) {} } /** @@ -66,23 +66,23 @@ public void writeRecord(DataSource ds, String classname, String methodname, String args) { Connection conFromDS = null; - PreparedStatement stmt = null; + PreparedStatement stmt = null; try{ conFromDS = ds.getConnection(); - //System.out.println("###con=" + conFromDS); + //System.out.println("###con=" + conFromDS); stmt = conFromDS.prepareStatement( - "insert into sql_trace values (?, ?, ?)" ); + "insert into sql_trace values (?, ?, ?)" ); System.out.println("### stmt=" + stmt); - stmt.setString(1, classname); - stmt.setString(2, methodname); - stmt.setString(3, args); + stmt.setString(1, classname); + stmt.setString(2, methodname); + stmt.setString(3, args); - int count = stmt.executeUpdate(); - //System.out.println("### inserted " + count + " rows"); + int count = stmt.executeUpdate(); + //System.out.println("### inserted " + count + " rows"); }catch(SQLException sqe){ - }finally{ + }finally{ try{ if(stmt != null){
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/sql/create_pointbase.sql index 0397a75..0f04479 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/sql/create_pointbase.sql
@@ -1,46 +1,46 @@ - -Drop table customer_stmt_wrapper; - -CREATE TABLE customer_stmt_wrapper ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); -INSERT INTO customer_stmt_wrapper VALUES(2, 'pqrs'); - -Drop table sql_trace; - -CREATE TABLE sql_trace ( - classname char(100), - methodname char(100), - args char(200) -); - -Drop table null_entry_table; - -CREATE TABLE null_entry_table ( - field1 char(100) -); - - -Drop table expected_sql_trace; - -CREATE TABLE expected_sql_trace ( - classname char(100), - methodname char(100), - args char(200) -); - - -INSERT INTO expected_sql_trace VALUES('org.apache.derby.client.net.NetConnection', 'prepareStatement', 'select * from customer_stmt_wrapper;1003;1007;'); - -INSERT INTO expected_sql_trace VALUES('com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40', 'getConnection', ''); - -INSERT INTO expected_sql_trace VALUES('org.apache.derby.client.net.NetConnection', 'prepareStatement', 'INSERT INTO null_entry_table VALUES(?);1003;1007;'); - -INSERT INTO expected_sql_trace VALUES('com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40', 'setString', '1;'); - -INSERT INTO expected_sql_trace VALUES('com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40', 'executeUpdate', ''); - -INSERT INTO expected_sql_trace VALUES('com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40', 'close', ''); + +Drop table customer_stmt_wrapper; + +CREATE TABLE customer_stmt_wrapper ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); +INSERT INTO customer_stmt_wrapper VALUES(2, 'pqrs'); + +Drop table sql_trace; + +CREATE TABLE sql_trace ( + classname char(100), + methodname char(100), + args char(200) +); + +Drop table null_entry_table; + +CREATE TABLE null_entry_table ( + field1 char(100) +); + + +Drop table expected_sql_trace; + +CREATE TABLE expected_sql_trace ( + classname char(100), + methodname char(100), + args char(200) +); + + +INSERT INTO expected_sql_trace VALUES('org.apache.derby.client.net.NetConnection', 'prepareStatement', 'select * from customer_stmt_wrapper;1003;1007;'); + +INSERT INTO expected_sql_trace VALUES('com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40', 'getConnection', ''); + +INSERT INTO expected_sql_trace VALUES('org.apache.derby.client.net.NetConnection', 'prepareStatement', 'INSERT INTO null_entry_table VALUES(?);1003;1007;'); + +INSERT INTO expected_sql_trace VALUES('com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40', 'setString', '1;'); + +INSERT INTO expected_sql_trace VALUES('com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40', 'executeUpdate', ''); + +INSERT INTO expected_sql_trace VALUES('com.sun.gjc.spi.jdbc40.PreparedStatementWrapper40', 'close', '');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/sql/recreate_sql_trace_table.sql b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/sql/recreate_sql_trace_table.sql index 754f9bd..eaa4577 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/sql/recreate_sql_trace_table.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/tracingsql/sql/recreate_sql_trace_table.sql
@@ -1,6 +1,6 @@ Drop table sql_trace; CREATE TABLE sql_trace ( classname char(100), - methodname char(100), - args char(200) + methodname char(100), + args char(200) );
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transactions/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/transactions/build.xml index 7c82aaa..87ddf63 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/transactions/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/transactions/build.xml
@@ -35,7 +35,7 @@ <fileset dir="." includes="*.output"/> </delete> <record name="transactions.output" action="start" /> - <ant dir="test1" target="all"/> + <ant dir="test1" target="all"/> <record name="transactions.output" action="stop" /> </target> @@ -52,9 +52,9 @@ </target> <target name="usage"> - <echo> - Usage: - ant all (Executes all the reconfig tests) - </echo> + <echo> + Usage: + ant all (Executes all the reconfig tests) + </echo> </target> </project>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/build.properties index f1a76f3..2f0078f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/build.properties
@@ -15,7 +15,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="as7-jts"/> <property name="app.type" value="application"/> @@ -25,7 +25,7 @@ <property name="sun-web.xml" value="descriptor/sun-web.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="appname" value="txnstatus-test1"/> +<property name="appname" value="txnstatus-test1"/> \u0020 <property name="ejbjar.classes" value="${build.classes.dir}/com"/> <!-- pool1 --> <property name="ora.user1" value="aditya"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/build.xml index fee77c7..9e2c19b 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/build.xml
@@ -30,14 +30,14 @@ &commonBuild; &testproperties; - + <target name="all" depends="build,setup-jdbc,setup-sql,deploy,runweb,undeploy,cleanup-jdbc,cleanup-sql"/> <target name="clean" depends="init-common"> <delete dir="${build.classes.dir}"/> <delete dir="${assemble.dir}"/> </target> - + <target name="compile" depends="clean"> <antcall target="compile-common"> <param name="src" value="ejb"/> @@ -55,18 +55,18 @@ </antcall> <antcall target="package-war-local"> <param name="war.classes" value="${build.classes.dir}"/> - <param name="war.file" value="${assemble.dir}/${appname}-web.war"/> + <param name="war.file" value="${assemble.dir}/${appname}-web.war"/> </antcall> <antcall target="ear-common"/> <!-- <antcall target="webclient-war-common"/> <param name="hasWebclient" value="true"/> - <param name="webclient.war.classes" value="**/*.class"/> - </antcall> + <param name="webclient.war.classes" value="**/*.class"/> + </antcall> --> </target> <target name="package-war-local" > - <!-- <delete dir="${build.classes.dir}"/> + <!-- <delete dir="${build.classes.dir}"/> <mkdir dir="${build.classes.dir}"/> <antcall target="compile-servlet"/>--> @@ -125,7 +125,7 @@ <antcall target="create-jdbc-resource-common" > <param name="jdbc.conpool.name" value="jts-xa-pool2"/> <param name="jdbc.resource.name" value="jdbc/oracleds2"/> - </antcall> + </antcall> <antcall target="create-jdbc-oracle-xa-pool" > <param name="poolname" value="jts-xa-pool1"/> @@ -134,7 +134,7 @@ <param name="ora.sid" value="${ora.sid1}"/> <param name="ora.url" value="${ora.url1}"/> </antcall> - + <antcall target="create-jdbc-resource-common" > <param name="jdbc.conpool.name" value="jts-xa-pool1"/> <param name="jdbc.resource.name" value="jdbc/oraclethird"/> @@ -167,7 +167,7 @@ onerror="continue" print="yes" classpath="${dbdriver.classpath}"/> - + <echo message="Executing sql statement at from ${create.sql.file2}"/> <sql driver="${db.driver}" @@ -191,7 +191,7 @@ onerror="continue" print="yes" classpath="${dbdriver.classpath}"/> - + <echo message="Executing sql statement at from ${drop.sql.file2}"/> <sql driver="${db.driver}" @@ -217,14 +217,14 @@ <antcall target="usage-common"/> </target> - <!-- + <!-- Tomcat's GTest tool for webtests --> <target name="runweb" depends="init-common"> - <taskdef name="gtest" classname="org.apache.tomcat.task.GTest" + <taskdef name="gtest" classname="org.apache.tomcat.task.GTest" classpath="${env.APS_HOME}/lib/testdriversecurity.jar:${env.APS_HOME}/lib/commons-logging.jar" /> <property name="wgdir" value="${env.APS_HOME}/devtests/jdbc/transactions"/> - <gtest request="GET /txnstatus/bmservlet4 HTTP/1.0" + <gtest request="GET /txnstatus/bmservlet4 HTTP/1.0" debug="9" firstTask="true" lastTest="true" @@ -246,7 +246,7 @@ testCaseDescription="txnstatus-test1" testStrategy="txnstatus-test1" /> - </target> + </target> <target name="create-jdbc-oracle-xa-pool" depends="init-common"> <antcall target="create-jdbc-connpool-common" > @@ -262,7 +262,7 @@ <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${poolname}.property.URL=${ora.url}"/> </antcall> - + </target> - + </project>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/ejb/bmsamplebean3.java b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/ejb/bmsamplebean3.java index 4e428b6..cf28c7d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/ejb/bmsamplebean3.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/ejb/bmsamplebean3.java
@@ -26,10 +26,10 @@ import java.sql.*; import javax.rmi.PortableRemoteObject; -public class bmsamplebean3 implements SessionBean +public class bmsamplebean3 implements SessionBean { private transient jakarta.ejb.SessionContext m_ctx = null; - EJBContext ejbcontext; + EJBContext ejbcontext; public void setSessionContext(jakarta.ejb.SessionContext ctx) { m_ctx = ctx; @@ -40,15 +40,15 @@ { } - public void ejbRemove() + public void ejbRemove() { } - public void ejbActivate() + public void ejbActivate() { } - public void ejbPassivate() + public void ejbPassivate() { } @@ -65,39 +65,39 @@ bmsample4 remote = null; int resultFromBean4=1; try { - System.out.println("in bean1...."); + System.out.println("in bean1...."); InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/oraclethird"); - System.out.println("ds lookup succeeded"); + System.out.println("ds lookup succeeded"); conn = ds.getConnection(); System.out.println("Connection succeeded"+conn); stmt = conn.createStatement(); - //stmt.executeQuery("delete from status1"); + //stmt.executeQuery("delete from status1"); String query1 = "select * from status1"; - stmt.executeUpdate("insert into status1 values('bean3',3)"); + stmt.executeUpdate("insert into status1 values('bean3',3)"); rs = stmt.executeQuery(query1); while(rs.next()) { System.out.println("Last Name: " + rs.getString("NAME")); System.out.println("First Name: " + rs.getInt("num")); } - + Object objref = ctx.lookup("ejb/bmsamplebean4"); - home = (bmsample4home)PortableRemoteObject.narrow(objref, bmsample4home.class); + home = (bmsample4home)PortableRemoteObject.narrow(objref, bmsample4home.class); remote = home.create(); resultFromBean4 = remote.performDBOps(); - rs.close(); + rs.close(); stmt.close(); conn.close(); - } + } catch (SQLException e) { - System.out.println("SQLException is : " + e); + System.out.println("SQLException is : " + e); return 1; } catch (Exception e) { - System.out.println("Exception is : " + e); + System.out.println("Exception is : " + e); return 1; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/ejb/bmsamplebean4.java b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/ejb/bmsamplebean4.java index 9542700..dd59b7d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/ejb/bmsamplebean4.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/ejb/bmsamplebean4.java
@@ -25,9 +25,9 @@ import javax.sql.*; import java.sql.*; -public class bmsamplebean4 implements SessionBean +public class bmsamplebean4 implements SessionBean { - EJBContext ejbcontext; + EJBContext ejbcontext; private transient jakarta.ejb.SessionContext m_ctx = null; public void setSessionContext(jakarta.ejb.SessionContext ctx) { @@ -38,15 +38,15 @@ { } - public void ejbRemove() + public void ejbRemove() { } - public void ejbActivate() + public void ejbActivate() { } - public void ejbPassivate() + public void ejbPassivate() { } @@ -60,15 +60,15 @@ Statement stmt = null,stmt2=null; ResultSet rs = null,rs2=null; try { - System.out.println("in bean2 ...."); + System.out.println("in bean2 ...."); InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/oracleds2"); - System.out.println("ds lookup succeeded"); + System.out.println("ds lookup succeeded"); conn = ds.getConnection(); System.out.println("Connection succeeded"+conn); stmt = conn.createStatement(); String query1 = "select * from status1"; - stmt.executeUpdate("insert into status1 values('bean4',3)"); + stmt.executeUpdate("insert into status1 values('bean4',3)"); rs = stmt.executeQuery(query1); while(rs.next()) { @@ -78,14 +78,14 @@ rs.close(); stmt.close(); conn.close(); - } + } catch (SQLException e){ e.printStackTrace(); return 1; } catch (Exception e) { - e.printStackTrace(); + e.printStackTrace(); return 1; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/servlet/bmservlet4.java b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/servlet/bmservlet4.java index a7023be..3698411 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/servlet/bmservlet4.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test1/servlet/bmservlet4.java
@@ -25,7 +25,7 @@ import javax.rmi.PortableRemoteObject; import javax.sql.*; import com.sun.s1asdev.jdbc.transactions.test1.ejb.*; - + public class bmservlet4 extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) @@ -33,7 +33,7 @@ { defaultAction(req, res); } - + public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { @@ -59,7 +59,7 @@ res.setContentType("text/plain"); PrintWriter out = res.getWriter(); Context ctx; - + try { Hashtable env = new Hashtable(1); @@ -71,10 +71,10 @@ remote = home.create(); out.println("calling bean1 "); out.println(" the result of invoking the ejb method is " + remote.performDBOps()); - } + } catch (Exception e) { - System.out.println(" ERROR: " + e); + System.out.println(" ERROR: " + e); } try { @@ -82,17 +82,17 @@ java.sql.Connection conn = null,conn2 = null; java.sql.Statement stmt = null,stmt2 = null; java.sql.ResultSet rs = null,rs2 = null; - ctx = new InitialContext(); - ds = (DataSource)ctx.lookup("jdbc/ora1"); - ds2 = (DataSource)ctx.lookup("jdbc/ora2"); - + ctx = new InitialContext(); + ds = (DataSource)ctx.lookup("jdbc/ora1"); + ds2 = (DataSource)ctx.lookup("jdbc/ora2"); + conn = ds.getConnection(); - conn2 = ds2.getConnection(); - stmt=conn.createStatement(); - stmt2=conn2.createStatement(); - out.println("Verifying table contents ...."); - rs=stmt.executeQuery("select * from status1"); - int count=0; + conn2 = ds2.getConnection(); + stmt=conn.createStatement(); + stmt2=conn2.createStatement(); + out.println("Verifying table contents ...."); + rs=stmt.executeQuery("select * from status1"); + int count=0; while (rs.next()) {count++; out.println("record = "+rs.getString(1)); @@ -105,25 +105,25 @@ } out.println("Total Records in table1 = "+count); out.println("Total Records in table2 = "+count2); - if ((count==1)&&(count2==1)) + if ((count==1)&&(count2==1)) out.println("Result:PASS"); else out.println("Result:FAIL"); // stmt.executeUpdate("delete from status1"); // stmt2.executeUpdate("delete from status2"); // conn.commit(); - // conn2.commit(); + // conn2.commit(); rs.close(); out.println("deleted in 1"); out.println("deleted in 2"); - rs2.close(); + rs2.close(); stmt.close(); - stmt2.close(); - conn.close(); - conn2.close();*/ - }catch(Exception e){} - - + stmt2.close(); + conn.close(); + conn2.close();*/ + }catch(Exception e){} + + }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/build.properties index 43125dc..1b9a9e8 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/build.properties
@@ -15,7 +15,7 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="as7-jts"/> <property name="app.type" value="application"/> @@ -25,7 +25,7 @@ <property name="sun-web.xml" value="descriptor/sun-web.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="appname" value="txnstatus-test2"/> +<property name="appname" value="txnstatus-test2"/> \u0020 <!-- pool1 --> <property name="ora.user1" value="aditya"/> <property name="ora.pwd1" value="aditya"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/build.xml index bab3ae8..8490b8c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/build.xml
@@ -29,14 +29,14 @@ &commonBuild; &testproperties; - + <target name="all" depends="build,setup-jdbc,setup-sql,deploy,runweb,undeploy,cleanup-jdbc,cleanup-sql"/> - + <target name="clean" depends="init-common"> <delete dir="${build.classes.dir}"/> <delete dir="${assemble.dir}"/> </target> - + <target name="compile" depends="clean"> <antcall target="compile-common"> <param name="src" value="ejb"/> @@ -56,7 +56,7 @@ <param name="src" value="servlet"/> </antcall> </target> ---> +--> <!-- <target name="build" depends="compile"> <antcall target="build-ear-war"/> @@ -78,7 +78,7 @@ <delete dir="${build.classes.dir}"/> <mkdir dir="${build.classes.dir}"/> <antcall target="compile-servlet"/> - --> + --> <echo message="my build classes dir is:${build.classes.dir}"/> <delete file="${war.file}"/> <mkdir dir="${build.classes.dir}/tmp"/> @@ -104,7 +104,7 @@ <echo message="created war file ${war.file}"/> <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/> </target> - + <target name="build-ear-war" depends="ejb-jar-common"> <antcall target="package-war-local"> <param name="war.classes" value="${build.classes.dir}"/> @@ -118,7 +118,7 @@ tofile="${assemble.dir}/META-INF/sun-application.xml" failonerror="false"/> <ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}"> - <fileset dir="${assemble.dir}" + <fileset dir="${assemble.dir}" includes="*.jar,*.war,META-INF/sun-application.xml,lib/reporter.jar"/> </ear> </target> @@ -147,8 +147,8 @@ <antcall target="create-jdbc-resource-common" > <param name="jdbc.conpool.name" value="jts-xa-pool2"/> <param name="jdbc.resource.name" value="jdbc/oracleds2"/> - </antcall> - + </antcall> + <antcall target="create-jdbc-oracle-xa-pool" > <param name="poolname" value="jts-xa-pool1"/> <param name="ora.user" value="${ora.user1}"/> @@ -156,13 +156,13 @@ <param name="ora.sid" value="${ora.sid1}"/> <param name="ora.url" value="${ora.url1}"/> </antcall> - + <antcall target="create-jdbc-resource-common" > <param name="jdbc.conpool.name" value="jts-xa-pool1"/> <param name="jdbc.resource.name" value="jdbc/oraclethird"/> </antcall> </target> - + <target name="cleanup-jdbc" > <antcall target="delete-jdbc-resource-common" > <param name="jdbc.resource.name" value="jdbc/oracleds2"/> @@ -171,16 +171,16 @@ <antcall target="delete-jdbc-resource-common" > <param name="jdbc.resource.name" value="jdbc/oraclethird"/> </antcall> - + <antcall target="delete-jdbc-connpool-common" > <param name="jdbc.conpool.name" value="jts-xa-pool2"/> </antcall> - + <antcall target="delete-jdbc-connpool-common" > <param name="jdbc.conpool.name" value="jts-xa-pool1"/> </antcall> </target> - + <target name="setup-sql" > <echo message="Executing sql statement at from ${create.sql.file1}"/> <sql @@ -192,7 +192,7 @@ onerror="continue" print="yes" classpath="${dbdriver.classpath}"/> - + <echo message="Executing sql statement at from ${create.sql.file2}"/> <sql driver="${db.driver}" @@ -217,7 +217,7 @@ onerror="continue" print="yes" classpath="${dbdriver.classpath}"/> - + <echo message="Executing sql statement at from ${drop.sql.file2}"/> <sql driver="${db.driver}" @@ -230,28 +230,28 @@ classpath="${dbdriver.classpath}"/> </target> - + <target name="deploy" depends="init-common"> <antcall target="deploy-common"/> </target> - - + + <target name="undeploy" depends="init-common"> <antcall target="undeploy-common"/> </target> - + <target name="usage"> <antcall target="usage-common"/> </target> - - <!-- + + <!-- Tomcat's GTest tool for webtests --> <target name="runweb" depends="init-common"> - <taskdef name="gtest" classname="org.apache.tomcat.task.GTest" + <taskdef name="gtest" classname="org.apache.tomcat.task.GTest" classpath="${env.APS_HOME}/lib/testdriversecurity.jar:${env.APS_HOME}/lib/commons-logging.jar"/> <property name="wgdir" value="${env.APS_HOME}/devtests/jdbc/transactions/test2"/> - <gtest request="GET /txnstatus-test2/bmservlet HTTP/1.0" + <gtest request="GET /txnstatus-test2/bmservlet HTTP/1.0" debug="9" firstTask="true" lastTest="true" @@ -272,7 +272,7 @@ testCaseName="txnstatus-test2" testCaseDescription="txnstatus-test2" testStrategy="txnstatus-test2"/> - </target> + </target> <target name="create-jdbc-oracle-xa-pool" depends="init-common"> <antcall target="create-jdbc-connpool-common" >
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/ejb/bmsample1.java b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/ejb/bmsample1.java index 78835ac..69f9521 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/ejb/bmsample1.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/ejb/bmsample1.java
@@ -28,6 +28,6 @@ public interface bmsample1 extends EJBObject { public int performDBOps() throws RemoteException; - public int performDBOps2() throws RemoteException; + public int performDBOps2() throws RemoteException; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/ejb/bmsamplebean1.java b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/ejb/bmsamplebean1.java index 90bfeeb..0565d71 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/ejb/bmsamplebean1.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/ejb/bmsamplebean1.java
@@ -25,14 +25,14 @@ import javax.sql.*; import java.sql.*; -public class bmsamplebean1 implements SessionBean +public class bmsamplebean1 implements SessionBean { - EJBContext ejbcontext; -transient javax.sql.DataSource ds,ds2; -transient java.sql.Connection conn = null,conn2=null; + EJBContext ejbcontext; +transient javax.sql.DataSource ds,ds2; +transient java.sql.Connection conn = null,conn2=null; transient Statement stmt = null,stmt2=null; transient ResultSet rs = null,rs2=null; - + public void setSessionContext(jakarta.ejb.SessionContext ctx) { @@ -43,15 +43,15 @@ { } - public void ejbRemove() + public void ejbRemove() { } - public void ejbActivate() + public void ejbActivate() { } - public void ejbPassivate() + public void ejbPassivate() { } @@ -63,21 +63,21 @@ { try { - System.out.println("in method1"); + System.out.println("in method1"); InitialContext ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/oraclethird"); - System.out.println("ds lookup succeeded"); + System.out.println("ds lookup succeeded"); UserTransaction tx =(UserTransaction)m_ctx.getUserTransaction(); - System.out.println("utx succeeded"+tx); + System.out.println("utx succeeded"+tx); conn = ds.getConnection(); System.out.println("Connection succeeded"+conn); - tx.begin(); - System.out.println("txn status :" +tx.getStatus()); + tx.begin(); + System.out.println("txn status :" +tx.getStatus()); //conn = ds.getConnection(); //System.out.println("Connection succeeded"+conn); stmt = conn.createStatement(); - //stmt.executeQuery("delete from status21"); - stmt.executeUpdate("insert into status21 values('method1',3)"); + //stmt.executeQuery("delete from status21"); + stmt.executeUpdate("insert into status21 values('method1',3)"); String query1 = "select * from status21"; rs = stmt.executeQuery(query1); while(rs.next()) @@ -85,15 +85,15 @@ System.out.println("Last Name: " + rs.getString("NAME")); System.out.println("First Name: " + rs.getInt("num")); } - } + } catch (SQLException e) { - System.out.println("SQLException is : " + e); + System.out.println("SQLException is : " + e); return 1; } catch (Exception e) { - System.out.println("Exception is : " + e); + System.out.println("Exception is : " + e); return 1; } @@ -101,42 +101,42 @@ } - public int performDBOps2() - { - try{ - InitialContext ctx = new InitialContext(); - System.out.println("in method2"); - ds2 = (DataSource) ctx.lookup("java:comp/env/jdbc/oracleds2"); - System.out.println("second ds lookup"); - UserTransaction tx =(UserTransaction)m_ctx.getUserTransaction(); - System.out.println("got second tx"+tx); - System.out.println("txn status :" +tx.getStatus()); + public int performDBOps2() + { + try{ + InitialContext ctx = new InitialContext(); + System.out.println("in method2"); + ds2 = (DataSource) ctx.lookup("java:comp/env/jdbc/oracleds2"); + System.out.println("second ds lookup"); + UserTransaction tx =(UserTransaction)m_ctx.getUserTransaction(); + System.out.println("got second tx"+tx); + System.out.println("txn status :" +tx.getStatus()); - conn2 = ds2.getConnection(); - System.out.println("Connection succeeded" +conn2); - stmt2 = conn2.createStatement(); + conn2 = ds2.getConnection(); + System.out.println("Connection succeeded" +conn2); + stmt2 = conn2.createStatement(); // stmt2.executeQuery("delete from status2"); - stmt2.executeUpdate("insert into status2 values('method2')"); - String query1 = "select * from status2"; - rs2 = stmt2.executeQuery(query1); - System.out.println("after rs2"); - while(rs2.next()) - { - System.out.println("Last Name: " + rs2.getString("NAME")); - } + stmt2.executeUpdate("insert into status2 values('method2')"); + String query1 = "select * from status2"; + rs2 = stmt2.executeQuery(query1); + System.out.println("after rs2"); + while(rs2.next()) + { + System.out.println("Last Name: " + rs2.getString("NAME")); + } System.out.println("txn status :" +tx.getStatus()); - // Thread.sleep(100000); - System.out.println("txn status :" +tx.getStatus()); - rs.close(); - rs2.close(); - stmt.close(); - conn.close(); - stmt2.close(); - conn2.close(); - tx.commit(); - } - catch (SQLException e) - { + // Thread.sleep(100000); + System.out.println("txn status :" +tx.getStatus()); + rs.close(); + rs2.close(); + stmt.close(); + conn.close(); + stmt2.close(); + conn2.close(); + tx.commit(); + } + catch (SQLException e) + { try { System.out.println("exception " + e.getMessage()); @@ -144,25 +144,25 @@ System.out.println("error code" +e.getErrorCode()); System.out.println("ql state " +e.getSQLState()); - /* - e=e.getNextException(); + /* + e=e.getNextException(); System.out.println("exception " + e.getMessage()); e.printStackTrace(); System.out.println("error code" +e.getErrorCode()); System.out.println("ql state " +e.getSQLState()); - */ + */ return 1; - }catch(Exception ex) + }catch(Exception ex) { System.out.println("exception " + ex.getMessage()); ex.printStackTrace(); return 1; } } - catch (Exception ex) - { - System.out.println("Exception is : " + ex.getMessage()); + catch (Exception ex) + { + System.out.println("Exception is : " + ex.getMessage()); ex.printStackTrace(); return 1; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/servlet/bmservlet.java b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/servlet/bmservlet.java index d949ae1..0bbc721 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/servlet/bmservlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/transactions/test2/servlet/bmservlet.java
@@ -26,7 +26,7 @@ import javax.sql.*; import com.sun.s1asdev.jdbc.transactions.test2.ejb.*; - + public class bmservlet extends HttpServlet { public void doGet(HttpServletRequest req, HttpServletResponse res) @@ -34,7 +34,7 @@ { defaultAction(req, res); } - + public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { @@ -61,13 +61,13 @@ PrintWriter out = res.getWriter(); Context ctx; Properties p; - + try { - Hashtable env = new Hashtable(1); + Hashtable env = new Hashtable(1); env.put("javax.naming.factory.initial", "com.netscape.server.jndi.RootContextFactory"); - ctx = new InitialContext(env); - //TestUtil.init(p); + ctx = new InitialContext(env); + //TestUtil.init(p); Object objref = ctx.lookup("ejb/bmsamplebean1"); home = (bmsample1home)PortableRemoteObject.narrow(objref, bmsample1home.class); remote = home.create(); @@ -75,10 +75,10 @@ out.println(" the result of invoking the ejb method is " + remote.performDBOps()); out.println("calling M2 ->DB2"); out.println("...... result of invoking the ejb method is " + remote.performDBOps2()); - } + } catch (Exception e) { - System.out.println(" ERROR: " + e); + System.out.println(" ERROR: " + e); } try { @@ -86,17 +86,17 @@ java.sql.Connection conn = null,conn2 = null; java.sql.Statement stmt = null,stmt2 = null; java.sql.ResultSet rs = null,rs2 = null; - ctx = new InitialContext(); - ds = (DataSource)ctx.lookup("java:comp/env/jdbc/oraclethird"); - ds2 = (DataSource)ctx.lookup("java:comp/env/jdbc/oracleds2"); - + ctx = new InitialContext(); + ds = (DataSource)ctx.lookup("java:comp/env/jdbc/oraclethird"); + ds2 = (DataSource)ctx.lookup("java:comp/env/jdbc/oracleds2"); + conn = ds.getConnection(); - conn2 = ds2.getConnection(); - stmt=conn.createStatement(); - stmt2=conn2.createStatement(); - out.println("..........Verifying table contents ...."); - rs=stmt.executeQuery("select * from status21"); - int count=0; + conn2 = ds2.getConnection(); + stmt=conn.createStatement(); + stmt2=conn2.createStatement(); + out.println("..........Verifying table contents ...."); + rs=stmt.executeQuery("select * from status21"); + int count=0; while (rs.next()) {count++; out.println("record = "+rs.getString(1)); @@ -109,26 +109,26 @@ } out.println("Total Records in table1 = "+count); out.println("Total Records in table2 = "+count2); - if ((count==1)&&(count2==1)) + if ((count==1)&&(count2==1)) out.println("Result:FAIL"); else out.println("Result:PASS"); stmt.executeUpdate("delete from status21"); stmt2.executeUpdate("delete from status2"); conn.commit(); - conn2.commit(); + conn2.commit(); rs.close(); out.println("deleted in 1"); out.println("deleted in 2"); - rs2.close(); + rs2.close(); stmt.close(); - stmt2.close(); + stmt2.close(); - conn.close(); - conn2.close(); - }catch(Exception e){} - - + conn.close(); + conn2.close(); + }catch(Exception e){} + + }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/build.properties index c342ea4..9780544 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-transparent_pool_reconfig"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/build.xml index c35193b..49d63a6 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/build.xml
@@ -71,7 +71,7 @@ </antcall> <!--<antcall target="deploy-jdbc-common"/>--> - <!-- Workaround for issue 18783 --> + <!-- Workaround for issue 18783 --> <antcall target="asadmin-common"> <param name="admin.command" value="create-module-config"/> <param name="operand.props" @@ -123,7 +123,7 @@ <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.java:app/ql-jdbc-pool.property.dynamic-reconfiguration-wait-timeout-in-seconds=120"/> </antcall> - + </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/sql/create_pointbase.sql index dd4c5e5..11e61ee 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig-resources-xml/sql/create_pointbase.sql
@@ -1,10 +1,10 @@ - -Drop table customer_stmt_wrapper; - -CREATE TABLE customer_stmt_wrapper ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); + +Drop table customer_stmt_wrapper; + +CREATE TABLE customer_stmt_wrapper ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); INSERT INTO customer_stmt_wrapper VALUES(2, 'pqrs'); \ No newline at end of file
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/build.properties index c342ea4..9780544 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-transparent_pool_reconfig"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/build.xml index 84c5cef..926b2e5 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/build.xml
@@ -68,7 +68,7 @@ </antcall> <antcall target="deploy-jdbc-common"/> - <!-- Workaround for issue 18783 --> + <!-- Workaround for issue 18783 --> <antcall target="asadmin-common"> <param name="admin.command" value="create-module-config"/> <param name="operand.props" @@ -119,7 +119,7 @@ <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.ql-jdbc-pool.property.dynamic-reconfiguration-wait-timeout-in-seconds=120"/> </antcall> - + <antcall target="deploy-common"/> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/sql/create_pointbase.sql index dd4c5e5..11e61ee 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/transparent-pool-reconfig/sql/create_pointbase.sql
@@ -1,10 +1,10 @@ - -Drop table customer_stmt_wrapper; - -CREATE TABLE customer_stmt_wrapper ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); + +Drop table customer_stmt_wrapper; + +CREATE TABLE customer_stmt_wrapper ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); INSERT INTO customer_stmt_wrapper VALUES(2, 'pqrs'); \ No newline at end of file
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txStress/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/txStress/build.properties index 6bc5535..4630aa4 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txStress/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/txStress/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp"/> -<property name="appname" value="${module}-enroller"/> +<property name="appname" value="${module}-enroller"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="default-instance" value="${env.S1AS_HOME}/domains/domain1"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txStress/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/txStress/build.xml index 323ca7e..ab88d38 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txStress/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/txStress/build.xml
@@ -32,17 +32,17 @@ &run; <!-- <target name="all"> - <antcall target="build"/> - <antcall target="setup"/> - <antcall target="autodeploy"/> - <antcall target="run"/> - <antcall target="undeploy"/> - <antcall target="unsetup"/> - <antcall target="restart"/> - <antcall target="setup"/> - <antcall target="deploy"/> - <antcall target="run"/> - <antcall target="undeploy"/> + <antcall target="build"/> + <antcall target="setup"/> + <antcall target="autodeploy"/> + <antcall target="run"/> + <antcall target="undeploy"/> + <antcall target="unsetup"/> + <antcall target="restart"/> + <antcall target="setup"/> + <antcall target="deploy"/> + <antcall target="run"/> + <antcall target="undeploy"/> <antcall target="unsetup"/> </target> --> @@ -56,7 +56,7 @@ <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"/> @@ -68,13 +68,13 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*Student*.class,**/*Enroller*.class,**/*Course*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/Course.class,**/Enroller.class,**/Student.class,**/*Home*.class,**/*Client*.class" /> </antcall> - </target> - + </target> + <target name="setup" depends="init-common"> <antcall target="execute-oracle-common"> <param name="sql.file" value="sql/create_oracle.sql"/> @@ -87,15 +87,15 @@ <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="bmpEnrollerPool"/> <param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB-container"/> - </antcall> + </antcall> <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="bmpEnrollerPool"/> <param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB-application"/> - </antcall> - <antcall target="reconfig-common"/> + </antcall> + <antcall target="reconfig-common"/> </target> - <target name="execute-oracle-common" depends="init-common, check-db" if="oracle"> + <target name="execute-oracle-common" depends="init-common, check-db" if="oracle"> <antcall target="execute-sql-common"> <param name="db.driver" value="${oracle.driver}"/> <param name="db.url" value="${oracle.url}"/> @@ -105,7 +105,7 @@ </antcall> </target> - <target name="deploy-oracle-common" depends="init-common, check-db" if="oracle"> + <target name="deploy-oracle-common" depends="init-common, check-db" if="oracle"> <antcall target="asadmin-common-ignore-fail"> <param name="admin.command" value="create-jdbc-connection-pool @@ -129,25 +129,25 @@ <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="bmpEnrollerPool"/> <param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB"/> - </antcall> + </antcall> </target> - <target name="deploy-pointbase-common" depends="init-common, check-db" unless="oracle"> + <target name="deploy-pointbase-common" depends="init-common, check-db" unless="oracle"> <antcall target="deploy-jdbc-common"> <param name="jdbc.conpool.name" value="bmpEnrollerPool"/> <param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB"/> - </antcall> + </antcall> </target> - <target name="execute-pointbase-common" depends="init-common, check-db" unless="oracle"> + <target name="execute-pointbase-common" depends="init-common, check-db" unless="oracle"> <antcall target="execute-sql-common"/> </target> <target name="deploy" depends="init-common"> <echo message="Deploying via asadmin..."/> <antcall target="deploy-common"/> - </target> + </target> <target name="run" depends="init-common"> <antcall target="runclient-common"/> @@ -172,7 +172,7 @@ <antcall target="undeploy-common"/> <!-- <echo message="SHEETAL : bug during undeployment. The generated dir does not get deleted. Hence forcing deletion as a temporary solution."/> <delete dir="${deployed-apps}/${appname}App_1"/> --> - </target> + </target> <target name="unsetup" depends="init-common"> <antcall target="execute-pointbase-common"> @@ -191,7 +191,7 @@ <param name="jdbc.conpool.name" value="bmpEnrollerPool"/> <param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB"/> </antcall> - </target> + </target> <target name="usage"> <antcall target="usage-common"/> @@ -208,7 +208,7 @@ <target name="autodeploy-ear" depends="init-common"> <echo message="Dropping the app under the autodeploy dir..."/> - <delete file="${autodeploy.dir}/${appname}App.ear_deployed" failonerror="false"/> + <delete file="${autodeploy.dir}/${appname}App.ear_deployed" failonerror="false"/> <copy file="${assemble.dir}/${appname}App.ear" todir="${autodeploy.dir}"/> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txStress/client/EnrollerClient.java b/appserver/tests/appserv-tests/devtests/jdbc/txStress/client/EnrollerClient.java index f5b23b0..871cd4d 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txStress/client/EnrollerClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txStress/client/EnrollerClient.java
@@ -26,80 +26,80 @@ //Stress Client public class EnrollerClient { - private static final int MAXTHREADS= 1; - private static final int MAXCYCLESPERTHREAD=1; - private static ArrayList threadsAL = new ArrayList(); - private static Object lock = new Object(); - - private static SimpleReporterAdapter status = + private static final int MAXTHREADS= 1; + private static final int MAXCYCLESPERTHREAD=1; + private static ArrayList threadsAL = new ArrayList(); + private static Object lock = new Object(); + + private static SimpleReporterAdapter status = new SimpleReporterAdapter("appserv-tests"); public static void main(String[] args) { try { long timeStart = System.currentTimeMillis(); System.out.println("Starting the test"); - status.addDescription("Testing stress cmp roster app."); - for(int i = 0 ; i < MAXTHREADS; i++){ - final int cnt = i; - //create Thrread to execute doTest - Thread t = new Thread(new Runnable(){ - public void run() { - try { - - String threadId = "Thr-" + cnt; + status.addDescription("Testing stress cmp roster app."); + for(int i = 0 ; i < MAXTHREADS; i++){ + final int cnt = i; + //create Thrread to execute doTest + Thread t = new Thread(new Runnable(){ + public void run() { + try { + + String threadId = "Thr-" + cnt; System.out.print(""+cnt); - for(int j=0; j < MAXCYCLESPERTHREAD; j++ ){ - System.out.print("."); - doTest(threadId); - } - } catch (Exception e) { - System.err.println("Caught an exception in Thread: " + e.toString()); - e.printStackTrace(); - } - } - }); - threadsAL.add(t); - t.start(); - } - - //finally join all threads - for(int i=0; i < threadsAL.size(); i++){ - ((Thread)(threadsAL.get(i))).join(); - } - long timeStop = System.currentTimeMillis(); - //Approximately 65 transactions to myRoster per cycle per thread - System.out.println(" " + (double)(MAXTHREADS*MAXCYCLESPERTHREAD*65) + " transactions COMPLETED in " + (long)(timeStop - timeStart) + "ms" ); + for(int j=0; j < MAXCYCLESPERTHREAD; j++ ){ + System.out.print("."); + doTest(threadId); + } + } catch (Exception e) { + System.err.println("Caught an exception in Thread: " + e.toString()); + e.printStackTrace(); + } + } + }); + threadsAL.add(t); + t.start(); + } + + //finally join all threads + for(int i=0; i < threadsAL.size(); i++){ + ((Thread)(threadsAL.get(i))).join(); + } + long timeStop = System.currentTimeMillis(); + //Approximately 65 transactions to myRoster per cycle per thread + System.out.println(" " + (double)(MAXTHREADS*MAXCYCLESPERTHREAD*65) + " transactions COMPLETED in " + (long)(timeStop - timeStart) + "ms" ); if ( checkIfPassed()) { - status.addStatus("Looks it is passed " , status.PASS); + status.addStatus("Looks it is passed " , status.PASS); } else { - status.addStatus("Looks it is passed " , status.FAIL); + status.addStatus("Looks it is passed " , status.FAIL); } status.printSummary("rosterAppID"); System.exit(0); - + } catch (Exception ex) { System.err.println("Caught an exception in main: " + ex.toString()); ex.printStackTrace(); } } - + private static void doTest(String threadId) throws Exception{ Context initial = new InitialContext(); Object objref = initial.lookup("java:comp/env/ejb/SimpleEnroller"); - EnrollerHome home = - (EnrollerHome)PortableRemoteObject.narrow(objref, + EnrollerHome home = + (EnrollerHome)PortableRemoteObject.narrow(objref, EnrollerHome.class); Enroller e = home.create(); for (int i=0; i <MAXCYCLESPERTHREAD; i++) { System.out.println("Result: " + e.doTest(threadId)); - } + } - e.remove(); + e.remove(); } @@ -107,8 +107,8 @@ Context initial = new InitialContext(); Object objref = initial.lookup("java:comp/env/ejb/SimpleEnroller"); - EnrollerHome home = - (EnrollerHome)PortableRemoteObject.narrow(objref, + EnrollerHome home = + (EnrollerHome)PortableRemoteObject.narrow(objref, EnrollerHome.class); Enroller e = home.create(); @@ -117,7 +117,7 @@ System.out.println("Expected Result : 0" ); System.out.println("Actual Result : " + result); - e.remove(); + e.remove(); if (result == 0) { return true;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txStress/ejb/Enroller.java b/appserver/tests/appserv-tests/devtests/jdbc/txStress/ejb/Enroller.java index d39cd75..9f71cda 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txStress/ejb/Enroller.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txStress/ejb/Enroller.java
@@ -20,7 +20,7 @@ import java.rmi.RemoteException; public interface Enroller extends EJBObject { - + public String doTest(String threadId) throws RemoteException;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txStress/ejb/EnrollerBean.java b/appserver/tests/appserv-tests/devtests/jdbc/txStress/ejb/EnrollerBean.java index 3c98e03..4096b5c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txStress/ejb/EnrollerBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txStress/ejb/EnrollerBean.java
@@ -16,7 +16,7 @@ package com.sun.s1peqe.ejb.bmp.enroller.ejb; -import java.rmi.RemoteException; +import java.rmi.RemoteException; import jakarta.ejb.*; import java.sql.*; import javax.sql.*; @@ -25,7 +25,7 @@ import javax.naming.*; public class EnrollerBean implements SessionBean { - + private DataSource ds; private DataSource ds_container; private DataSource ds_app; @@ -57,10 +57,10 @@ test1(id); test2(id); test3(id); - test4(id); + test4(id); test5(id); - test6(id); - //test7(id); + test6(id); + //test7(id); } // Tests a tx and verifies that work is actually committed. @@ -72,7 +72,7 @@ Connection con = ds.getConnection(); for (int i=0; i < 5; i++) { - insertEntry(con, id + i, i, id + ":" + i); + insertEntry(con, id + i, i, id + ":" + i); } con.close(); @@ -113,7 +113,7 @@ Connection con = ds.getConnection(); for (int i=0; i < 5; i++) { - insertEntry(con, id + i, i, id + ":" + i); + insertEntry(con, id + i, i, id + ":" + i); } con.close(); @@ -152,7 +152,7 @@ t.begin(); for (int i=0; i < 5; i++) { - insertEntry(con, id + i, i, id + ":" + i); + insertEntry(con, id + i, i, id + ":" + i); } con.close(); @@ -191,7 +191,7 @@ t.begin(); for (int i=0; i < 5; i++) { - insertEntry(con, id + i, i, id + ":" + i); + insertEntry(con, id + i, i, id + ":" + i); } Connection con1 = ds.getConnection(); @@ -225,7 +225,7 @@ Connection con = ds.getConnection(); for (int i=0; i < 5; i++) { - insertEntry(con, id + i, i, id + ":" + i); + insertEntry(con, id + i, i, id + ":" + i); } Connection con1 = ds.getConnection(); @@ -268,7 +268,7 @@ Connection con = ds.getConnection(); System.out.println("Got conn"); for (int i=0; i < 5; i++) { - insertEntry(con, id + i, i, id + ":" + i); + insertEntry(con, id + i, i, id + ":" + i); } System.out.println("close conn"); con.close(); @@ -330,12 +330,12 @@ Connection con = ds.getConnection(); for (int i=0; i < 5; i++) { - insertEntry(con, id + i, i, id + ":" + i); + insertEntry(con, id + i, i, id + ":" + i); } con.close(); boolean pass = false; - Connection con4 = null; + Connection con4 = null; System.out.println("con4.getConnection"); try { con4 = ds_container.getConnection(); @@ -377,7 +377,7 @@ String selectStatement = "select count(*) " + "from testTx "; - PreparedStatement prepStmt = + PreparedStatement prepStmt = con.prepareStatement(selectStatement); ResultSet rs = prepStmt.executeQuery(); @@ -426,7 +426,7 @@ String insertStatement = "insert into testTx values ( ? , ? , ?)"; - PreparedStatement prepStmt = + PreparedStatement prepStmt = con.prepareStatement(insertStatement); prepStmt.setString(1, key); @@ -437,7 +437,7 @@ prepStmt.close(); } - private void deleteEntry(Connection con, String key, int iterkey) + private void deleteEntry(Connection con, String key, int iterkey) throws SQLException { String deleteStatement = @@ -452,7 +452,7 @@ prepStmt.close(); } - private void updateEntry(Connection con, String key, int iterkey, String value) + private void updateEntry(Connection con, String key, int iterkey, String value) throws SQLException { String deleteStatement = @@ -469,13 +469,13 @@ prepStmt.close(); } - private String selectValue(Connection con, String key, int iterkey) + private String selectValue(Connection con, String key, int iterkey) throws SQLException { String selectStatement = "select value " + "from testTx where key = ? and iterkey = ?"; - PreparedStatement prepStmt = + PreparedStatement prepStmt = con.prepareStatement(selectStatement); prepStmt.setString(1, key);
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txStress/sql/create_oracle.sql b/appserver/tests/appserv-tests/devtests/jdbc/txStress/sql/create_oracle.sql index 917d860..f73ca58 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txStress/sql/create_oracle.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/txStress/sql/create_oracle.sql
@@ -1,9 +1,9 @@ DROP TABLE testTx; -CREATE TABLE testTx +CREATE TABLE testTx ( - key VARCHAR(255) PRIMARY KEY, - iterkey INTEGER , - value VARCHAR(255) + key VARCHAR(255) PRIMARY KEY, + iterkey INTEGER , + value VARCHAR(255) );
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txStress/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/txStress/sql/create_pointbase.sql index f3f8494..44201b0 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txStress/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/txStress/sql/create_pointbase.sql
@@ -1,9 +1,9 @@ DROP TABLE testTx; -CREATE TABLE testTx +CREATE TABLE testTx ( - key varchar(255) constraint pk_key primary key, - iterkey integer , - value varchar(255) + key varchar(255) constraint pk_key primary key, + iterkey integer , + value varchar(255) );
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/build.properties index 8e64bc7..4c2fa37 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-txafternontx"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/build.xml index 32df84d..532c0b1 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/build.xml
@@ -36,7 +36,7 @@ <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"/> @@ -48,32 +48,32 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-txafternontx-pool"/> </antcall> <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="jdbc-txafternontx-pool"/> - <param name="jdbc.resource.name" value="jdbc/txafternontx"/> + <param name="jdbc.resource.name" value="jdbc/txafternontx"/> </antcall> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -82,13 +82,13 @@ <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/txafternontx"/> </antcall> - + <antcall target="delete-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-txafternontx-pool"/> </antcall> - + <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/client/Client.java index 27dec73..ddb93a7 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/client/Client.java
@@ -25,27 +25,27 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "TxAfterNonTx "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "TxAfterNonTx "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); - - stat.addDescription("Running txafternontx testSuite1 "); + + stat.addDescription("Running txafternontx testSuite1 "); SimpleSession simpleSession = simpleSessionHome.create(); if (simpleSession.test1() ) { - stat.addStatus( testSuite + " test1 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test1 : " , stat.FAIL ); - } - - - stat.printSummary(); + stat.addStatus( testSuite + " test1 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test1 : " , stat.FAIL ); + } + + + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/descriptor/ejb-jar.xml index 55e1476..9030b96 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/descriptor/ejb-jar.xml
@@ -62,12 +62,12 @@ <container-transaction> <method> <ejb-name>SimpleSessionEJB</ejb-name> - <method-name>updateDb</method-name> + <method-name>updateDb</method-name> </method> <trans-attribute>RequiresNew</trans-attribute> </container-transaction> --> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/ejb/SimpleSessionBean.java index 80d2028..4ce8ccd 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/ejb/SimpleSessionBean.java
@@ -28,14 +28,14 @@ { private SessionContext ctxt_; - private InitialContext ic_; + private InitialContext ic_; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + try { + ic_ = new InitialContext(); + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { @@ -44,58 +44,58 @@ /** */ public boolean test1() throws Exception { - com.sun.appserv.jdbc.DataSource ds = - (com.sun.appserv.jdbc.DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - boolean passed = false; + com.sun.appserv.jdbc.DataSource ds = + (com.sun.appserv.jdbc.DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + boolean passed = false; System.out.println("getting first tx connection"); - try { - conn1 = ds.getConnection(); - if (conn1.getAutoCommit() == true ) { - throw new SQLException("Before nontx: Connection with wrong autocommit value"); - } - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - + try { + conn1 = ds.getConnection(); + if (conn1.getAutoCommit() == true ) { + throw new SQLException("Before nontx: Connection with wrong autocommit value"); + } + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } + System.out.println("getting nontx connection"); try { - conn1 = ds.getNonTxConnection(); - if (conn1.getAutoCommit() == false ) { - throw new SQLException("NonTX Connection with wrong autocommit value"); - } - } catch( Exception e ) { - e.printStackTrace(); - return false; - } finally { - try {conn1.close();} catch(Exception e) {} - } + conn1 = ds.getNonTxConnection(); + if (conn1.getAutoCommit() == false ) { + throw new SQLException("NonTX Connection with wrong autocommit value"); + } + } catch( Exception e ) { + e.printStackTrace(); + return false; + } finally { + try {conn1.close();} catch(Exception e) {} + } System.out.println("getting second tx connection"); - try { - conn1 = ds.getConnection(); - if (conn1.getAutoCommit() == true ) { - throw new SQLException("After nontx: Connection with wrong autocommit value"); - } - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - - return true; + try { + conn1 = ds.getConnection(); + if (conn1.getAutoCommit() == true ) { + throw new SQLException("After nontx: Connection with wrong autocommit value"); + } + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } } - + + return true; + } + public void ejbLoad() {} public void ejbStore() {} public void ejbRemove() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/create_mysql.sql b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/create_mysql.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/create_mysql.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/create_mysql.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/create_pointbase.sql index 637a7c5..c3b0d5c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/create_pointbase.sql
@@ -1,9 +1,9 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO O_CUSTOMER VALUES (0, 'abcd'); -INSERT INTO O_CUSTOMER VALUES (1, 'pqrs'); +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO O_CUSTOMER VALUES (0, 'abcd'); +INSERT INTO O_CUSTOMER VALUES (1, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontx/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/build.properties index 8e64bc7..4c2fa37 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-txafternontx"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/build.xml index 32df84d..532c0b1 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/build.xml
@@ -36,7 +36,7 @@ <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"/> @@ -48,32 +48,32 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="create-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-txafternontx-pool"/> </antcall> <antcall target="create-jdbc-resource-common"> <param name="jdbc.conpool.name" value="jdbc-txafternontx-pool"/> - <param name="jdbc.resource.name" value="jdbc/txafternontx"/> + <param name="jdbc.resource.name" value="jdbc/txafternontx"/> </antcall> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -82,13 +82,13 @@ <antcall target="delete-jdbc-resource-common"> <param name="jdbc.resource.name" value="jdbc/txafternontx"/> </antcall> - + <antcall target="delete-jdbc-connpool-common"> <param name="jdbc.conpool.name" value="jdbc-txafternontx-pool"/> </antcall> - + <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/client/Client.java index b7988a2..46cf213 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/client/Client.java
@@ -25,27 +25,27 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "TxAfterNonTx-Jndi "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "TxAfterNonTx-Jndi "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); - - stat.addDescription("Running txafternontx testSuite1 "); + + stat.addDescription("Running txafternontx testSuite1 "); SimpleSession simpleSession = simpleSessionHome.create(); if (simpleSession.test1() ) { - stat.addStatus( testSuite + " test1 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test1 : " , stat.FAIL ); - } - - - stat.printSummary(); + stat.addStatus( testSuite + " test1 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test1 : " , stat.FAIL ); + } + + + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/descriptor/ejb-jar.xml index 55e1476..9030b96 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/descriptor/ejb-jar.xml
@@ -62,12 +62,12 @@ <container-transaction> <method> <ejb-name>SimpleSessionEJB</ejb-name> - <method-name>updateDb</method-name> + <method-name>updateDb</method-name> </method> <trans-attribute>RequiresNew</trans-attribute> </container-transaction> --> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/ejb/SimpleSessionBean.java index 2ab67bc..c717a58 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/ejb/SimpleSessionBean.java
@@ -28,18 +28,18 @@ { private SessionContext ctxt_; - private InitialContext ic_; - private InitialContext ic1_; + private InitialContext ic_; + private InitialContext ic1_; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); + try { + ic_ = new InitialContext(); Hashtable ht = new Hashtable(); ht.put("com.sun.enterprise.connectors.jndisuffix", "__nontx"); - ic1_ = new InitialContext(ht); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + ic1_ = new InitialContext(ht); + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { @@ -48,60 +48,60 @@ /** */ public boolean test1() throws Exception { - com.sun.appserv.jdbc.DataSource ds = - (com.sun.appserv.jdbc.DataSource)ic_.lookup("java:comp/env/DataSource"); - com.sun.appserv.jdbc.DataSource ds1 = - (com.sun.appserv.jdbc.DataSource)ic1_.lookup("jdbc/txafternontx"); - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - boolean passed = false; + com.sun.appserv.jdbc.DataSource ds = + (com.sun.appserv.jdbc.DataSource)ic_.lookup("java:comp/env/DataSource"); + com.sun.appserv.jdbc.DataSource ds1 = + (com.sun.appserv.jdbc.DataSource)ic1_.lookup("jdbc/txafternontx"); + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + boolean passed = false; System.out.println("getting first tx connection"); - try { - conn1 = ds.getConnection(); - if (conn1.getAutoCommit() == true ) { - throw new SQLException("Before nontx: Connection with wrong autocommit value"); - } - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - + try { + conn1 = ds.getConnection(); + if (conn1.getAutoCommit() == true ) { + throw new SQLException("Before nontx: Connection with wrong autocommit value"); + } + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } + } + System.out.println("getting nontx connection"); try { - conn1 = ds1.getConnection(); - if (conn1.getAutoCommit() == false ) { - throw new SQLException("NonTX Connection with wrong autocommit value"); - } - } catch( Exception e ) { - e.printStackTrace(); - return false; - } finally { - try {conn1.close();} catch(Exception e) {} - } + conn1 = ds1.getConnection(); + if (conn1.getAutoCommit() == false ) { + throw new SQLException("NonTX Connection with wrong autocommit value"); + } + } catch( Exception e ) { + e.printStackTrace(); + return false; + } finally { + try {conn1.close();} catch(Exception e) {} + } System.out.println("getting second tx connection"); - try { - conn1 = ds.getConnection(); - if (conn1.getAutoCommit() == true ) { - throw new SQLException("After nontx: Connection with wrong autocommit value"); - } - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - - return true; + try { + conn1 = ds.getConnection(); + if (conn1.getAutoCommit() == true ) { + throw new SQLException("After nontx: Connection with wrong autocommit value"); + } + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } } - + + return true; + } + public void ejbLoad() {} public void ejbStore() {} public void ejbRemove() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/create_mysql.sql b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/create_mysql.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/create_mysql.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/create_mysql.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/create_pointbase.sql index 637a7c5..c3b0d5c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/create_pointbase.sql
@@ -1,9 +1,9 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO O_CUSTOMER VALUES (0, 'abcd'); -INSERT INTO O_CUSTOMER VALUES (1, 'pqrs'); +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO O_CUSTOMER VALUES (0, 'abcd'); +INSERT INTO O_CUSTOMER VALUES (1, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/txafternontxjndi/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/build.properties index aad222e..f001d5a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-txisolation"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/build.xml index 07d9d6f..d3e25a3 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/build.xml
@@ -83,7 +83,7 @@ <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${pool.name}.max_connection_usage_count=1"/> </antcall> - + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" @@ -177,7 +177,7 @@ <antcall target="runclient-common"> <param name="appclient.application.args" value="6"/> </antcall> - + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props"
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/client/SimpleBMPClient.java b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/client/SimpleBMPClient.java index 07797d9..24674d0 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/client/SimpleBMPClient.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/client/SimpleBMPClient.java
@@ -38,7 +38,7 @@ javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP simpleBMP = simpleBMPHome.create(); - stat.addDescription("JDBC TX Isolation tests"); + stat.addDescription("JDBC TX Isolation tests"); boolean result = false; String testName = null;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/descriptor/ejb-jar.xml index c0f6588..94b9fdd 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/descriptor/ejb-jar.xml
@@ -38,7 +38,7 @@ <description></description> <use-caller-identity></use-caller-identity> </security-identity> - + <resource-ref> <res-ref-name>DataSource</res-ref-name> <res-type>javax.sql.DataSource</res-type> @@ -46,7 +46,7 @@ <res-sharing-scope>Shareable</res-sharing-scope> </resource-ref> </session> - + </enterprise-beans> <assembly-descriptor>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/ejb/SimpleBMP.java b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/ejb/SimpleBMP.java index 6a3dfed..89733b9 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/ejb/SimpleBMP.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/ejb/SimpleBMP.java
@@ -20,7 +20,7 @@ import java.rmi.*; public interface SimpleBMP extends EJBObject { - + public boolean test1(int i) throws RemoteException; public void modifyIsolation(int i) throws RemoteException;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/ejb/SimpleBMPBean.java index 6991e2a..aab7c79 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txisolation/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txisolation/ejb/SimpleBMPBean.java
@@ -71,7 +71,7 @@ }catch(Exception e){e.printStackTrace();} } } - return result; + return result; } public boolean modifyIsolation(int isolationLevel){
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/build.properties index f7354ae..47c7cf5 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-txlevelswitch"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/build.xml index cd20523..6966b14 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/build.xml
@@ -40,7 +40,7 @@ <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"/> @@ -52,25 +52,25 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> - <param name="ejbjar.classes" + <param name="ejbjar.classes" value="**/*.class" /> - <param name="appclientjar.classes" + <param name="appclientjar.classes" value="**/*.class" /> </antcall> - </target> - + </target> + <target name="deploy" depends="init-common"> <antcall target="deploy-jdbc-common"/> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="runclient-common"/> </target> - + <target name="undeploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/drop_pointbase.sql"/> @@ -78,7 +78,7 @@ <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/client/Client.java index 362cbf4..f7609e3 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/client/Client.java
@@ -25,27 +25,27 @@ import com.sun.ejte.ccl.reporter.SimpleReporterAdapter; public class Client { - + public static void main(String[] args) throws Exception { - - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "txlevelswitch-test1 "; + + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "txlevelswitch-test1 "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/SimpleSessionHome"); - SimpleSessionHome simpleSessionHome = (SimpleSessionHome) + SimpleSessionHome simpleSessionHome = (SimpleSessionHome) javax.rmi.PortableRemoteObject.narrow(objRef, SimpleSessionHome.class); - - stat.addDescription("Running txlevelswitch testSuite1 "); + + stat.addDescription("Running txlevelswitch testSuite1 "); SimpleSession simpleSession = simpleSessionHome.create(); if (simpleSession.test1() ) { - stat.addStatus( testSuite + " test1 : " , stat.PASS ); - } else { - stat.addStatus( testSuite + " test1 : " , stat.FAIL ); - } - - - stat.printSummary(); + stat.addStatus( testSuite + " test1 : " , stat.PASS ); + } else { + stat.addStatus( testSuite + " test1 : " , stat.FAIL ); + } + + + stat.printSummary(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/descriptor/ejb-jar.xml index 89b7dd9..14d5054 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/descriptor/ejb-jar.xml
@@ -61,11 +61,11 @@ <container-transaction> <method> <ejb-name>SimpleSessionEJB</ejb-name> - <method-name>updateDb</method-name> + <method-name>updateDb</method-name> </method> <trans-attribute>RequiresNew</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/ejb/SimpleSessionBean.java b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/ejb/SimpleSessionBean.java index c42c085..cdf67f4 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/ejb/SimpleSessionBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/ejb/SimpleSessionBean.java
@@ -27,14 +27,14 @@ { private SessionContext ctxt_; - private InitialContext ic_; + private InitialContext ic_; public void setSessionContext(SessionContext context) { ctxt_ = context; - try { - ic_ = new InitialContext(); - } catch( NamingException ne ) { - ne.printStackTrace(); - } + try { + ic_ = new InitialContext(); + } catch( NamingException ne ) { + ne.printStackTrace(); + } } public void ejbCreate() throws CreateException { @@ -46,99 +46,99 @@ * did not happen */ public boolean test1() throws Exception { - DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - int keyToCompare = 10; - boolean passed = false; - //clean the database - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeUpdate( "DELETE FROM TXLEVELSWITCH"); - } catch( SQLException e) { - e.printStackTrace(); - return false; - } finally { - if (stmt1 != null) { - try { stmt1.close(); } catch( Exception e1 ) {} - } - if (conn1 != null) { - try { conn1.close(); } catch( Exception e1 ) {} - } - } - - try { - //Call a method with tx=RequiresNew and have it throw - //an exception - updateDb( "TXLEVELSWITCH", keyToCompare ); - } catch( Exception e ) { - if (!( e instanceof EJBException )) { - e.printStackTrace(); - return false; - } else { - System.out.println("Caught expected EJBException"); - } - } - try { - //since our updateDb threw an exception, we should not - //find the inserted value here - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - rs1 = stmt1.executeQuery("SELECT * FROM TXLEVELSWITCH"); - while( rs1.next() ) { - int key = rs1.getInt("c_id"); - if ( key == 10 ) { - System.out.println("update happened successfully. It should have failed"); - return false; - } - } - } catch (Exception e) { - e.printStackTrace(); - return false; - } finally { - if (rs1 != null ) { - try { rs1.close(); } catch( Exception e1 ) {} - } - if ( stmt1 != null ) { - try { stmt1.close(); } catch( Exception e1) {} - } - if ( conn1 != null ) { - try { conn1.close(); } catch( Exception e1) {} - } - } - - return true; + DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + int keyToCompare = 10; + boolean passed = false; + //clean the database + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeUpdate( "DELETE FROM TXLEVELSWITCH"); + } catch( SQLException e) { + e.printStackTrace(); + return false; + } finally { + if (stmt1 != null) { + try { stmt1.close(); } catch( Exception e1 ) {} + } + if (conn1 != null) { + try { conn1.close(); } catch( Exception e1 ) {} + } } - + + try { + //Call a method with tx=RequiresNew and have it throw + //an exception + updateDb( "TXLEVELSWITCH", keyToCompare ); + } catch( Exception e ) { + if (!( e instanceof EJBException )) { + e.printStackTrace(); + return false; + } else { + System.out.println("Caught expected EJBException"); + } + } + try { + //since our updateDb threw an exception, we should not + //find the inserted value here + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + rs1 = stmt1.executeQuery("SELECT * FROM TXLEVELSWITCH"); + while( rs1.next() ) { + int key = rs1.getInt("c_id"); + if ( key == 10 ) { + System.out.println("update happened successfully. It should have failed"); + return false; + } + } + } catch (Exception e) { + e.printStackTrace(); + return false; + } finally { + if (rs1 != null ) { + try { rs1.close(); } catch( Exception e1 ) {} + } + if ( stmt1 != null ) { + try { stmt1.close(); } catch( Exception e1) {} + } + if ( conn1 != null ) { + try { conn1.close(); } catch( Exception e1) {} + } + } + + return true; + } + private void updateDb( String table, int keyToInsert ) throws Exception { DataSource ds = (DataSource)ic_.lookup("java:comp/env/DataSource"); - Connection conn1 = null; - Statement stmt1 = null; - ResultSet rs1 = null; - boolean passed = true; - try { - conn1 = ds.getConnection(); - stmt1 = conn1.createStatement(); - stmt1.executeUpdate("INSERT INTO " +table+" VALUES (" - + keyToInsert+", 'ABCD')"); + Connection conn1 = null; + Statement stmt1 = null; + ResultSet rs1 = null; + boolean passed = true; + try { + conn1 = ds.getConnection(); + stmt1 = conn1.createStatement(); + stmt1.executeUpdate("INSERT INTO " +table+" VALUES (" + + keyToInsert+", 'ABCD')"); throw new Exception("Rollback the tx"); - } catch( SQLException sqle ) { - throw sqle; - } catch (Exception e) { - throw new EJBException( e ); - } finally { - if (rs1 != null ) { - try { rs1.close(); } catch( Exception e1 ) {} - } - if ( stmt1 != null ) { - try { stmt1.close(); } catch( Exception e1) {} - } - if ( conn1 != null ) { - try { conn1.close(); } catch( Exception e1) {} - } - } + } catch( SQLException sqle ) { + throw sqle; + } catch (Exception e) { + throw new EJBException( e ); + } finally { + if (rs1 != null ) { + try { rs1.close(); } catch( Exception e1 ) {} + } + if ( stmt1 != null ) { + try { stmt1.close(); } catch( Exception e1) {} + } + if ( conn1 != null ) { + try { conn1.close(); } catch( Exception e1) {} + } + } } @@ -152,80 +152,80 @@ * changeover is indeed successful */ public boolean test2() throws Exception { - System.out.println("************IN TEST 2*************"); - InitialContext ic = new InitialContext(); - DataSource ds1 = (DataSource)ic.lookup("java:comp/env/DataSource1"); - DataSource ds2 = (DataSource)ic.lookup("java:comp/env/DataSource2"); - Connection conn1 = null; - Connection conn2 = null; - Statement stmt1 = null; - Statement stmt2 = null; - ResultSet rs1 = null; - ResultSet rs2 = null; - boolean passed = true; - try { - System.out.println("Before getConnection 1"); - conn1 = ds1.getConnection(); - System.out.println("After getConnection 1"); - System.out.println("Before getConnection 2"); - conn2 = ds2.getConnection(); - System.out.println("After getConnection 2"); - - System.out.println("Before createStatement 1"); - stmt1 = conn1.createStatement(); - System.out.println("After createStatement 1"); - System.out.println("Before createStatement 2"); - stmt2 = conn2.createStatement(); - System.out.println("After createStatement 2"); - - System.out.println("executing statement 1"); + System.out.println("************IN TEST 2*************"); + InitialContext ic = new InitialContext(); + DataSource ds1 = (DataSource)ic.lookup("java:comp/env/DataSource1"); + DataSource ds2 = (DataSource)ic.lookup("java:comp/env/DataSource2"); + Connection conn1 = null; + Connection conn2 = null; + Statement stmt1 = null; + Statement stmt2 = null; + ResultSet rs1 = null; + ResultSet rs2 = null; + boolean passed = true; + try { + System.out.println("Before getConnection 1"); + conn1 = ds1.getConnection(); + System.out.println("After getConnection 1"); + System.out.println("Before getConnection 2"); + conn2 = ds2.getConnection(); + System.out.println("After getConnection 2"); - try { - rs1 = stmt1.executeQuery("SELECT * FROM TXLEVELSWITCH"); + System.out.println("Before createStatement 1"); + stmt1 = conn1.createStatement(); + System.out.println("After createStatement 1"); + System.out.println("Before createStatement 2"); + stmt2 = conn2.createStatement(); + System.out.println("After createStatement 2"); + + System.out.println("executing statement 1"); + + try { + rs1 = stmt1.executeQuery("SELECT * FROM TXLEVELSWITCH"); } catch( Exception e2 ) { - System.out.println("Exception for first query :" + e2.getMessage() ); - } finally { - passed = false; + System.out.println("Exception for first query :" + e2.getMessage() ); + } finally { + passed = false; } - - System.out.println("executing statement 2"); - try { - rs2 = stmt2.executeQuery("SELECT * FROM TXLEVELSWITCH2"); - } catch( Exception e2) { - System.out.println("Exception for second query :" + e2.getMessage() ); - } finally { - passed = false; - } - System.out.println("finished executing statements"); - passed = !(rs1.next() & rs2.next()); - } catch (Exception e) { - passed = true; - System.out.println("final exception : " + e.getMessage() ); - throw new EJBException(e); - } finally { - if (rs1 != null ) { - try { rs1.close(); } catch( Exception e1 ) {} - } + System.out.println("executing statement 2"); + try { + rs2 = stmt2.executeQuery("SELECT * FROM TXLEVELSWITCH2"); + } catch( Exception e2) { + System.out.println("Exception for second query :" + e2.getMessage() ); + } finally { + passed = false; + } - if (rs2 != null ) { - try { rs2.close(); } catch( Exception e1 ) {} - } + System.out.println("finished executing statements"); + passed = !(rs1.next() & rs2.next()); + } catch (Exception e) { + passed = true; + System.out.println("final exception : " + e.getMessage() ); + throw new EJBException(e); + } finally { + if (rs1 != null ) { + try { rs1.close(); } catch( Exception e1 ) {} + } - if ( stmt1 != null ) { - try { stmt1.close(); } catch( Exception e1) {} - } - if ( stmt2 != null ) { - try { stmt2.close(); } catch( Exception e1) {} - } - if ( conn1 != null ) { - try { conn1.close(); } catch( Exception e1) {} - } - if ( conn2 != null ) { - try { conn2.close(); } catch( Exception e1) {} - } - } - return passed; + if (rs2 != null ) { + try { rs2.close(); } catch( Exception e1 ) {} + } + + if ( stmt1 != null ) { + try { stmt1.close(); } catch( Exception e1) {} + } + if ( stmt2 != null ) { + try { stmt2.close(); } catch( Exception e1) {} + } + if ( conn1 != null ) { + try { conn1.close(); } catch( Exception e1) {} + } + if ( conn2 != null ) { + try { conn2.close(); } catch( Exception e1) {} + } + } + return passed; } public void ejbLoad() {} public void ejbStore() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/sql/create_pointbase.sql index b227cac..42d5a16 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/sql/create_pointbase.sql
@@ -1,9 +1,9 @@ -Drop table TXLEVELSWITCH; - -CREATE TABLE TXLEVELSWITCH ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO TXLEVELSWITCH VALUES(1, 'wxyz'); -INSERT INTO TXLEVELSWITCH VALUES(2, 'pqrs'); +Drop table TXLEVELSWITCH; + +CREATE TABLE TXLEVELSWITCH ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO TXLEVELSWITCH VALUES(1, 'wxyz'); +INSERT INTO TXLEVELSWITCH VALUES(2, 'pqrs');
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/sql/drop_pointbase.sql index 0c1242f..d11a115 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/txlevelswitch/sql/drop_pointbase.sql
@@ -1,2 +1,2 @@ -Drop table TXLEVELSWITCH; -Drop table TXLEVELSWITCH2; +Drop table TXLEVELSWITCH; +Drop table TXLEVELSWITCH2;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/build.properties index a8dd641..000b72e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/build.properties
@@ -15,18 +15,18 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-txpassthrough"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/build.xml index 9925449..313177a 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/build.xml
@@ -32,14 +32,14 @@ &testproperties; &jdbcCommon; &jdbcCommonProps; - + <target name="all" depends="clean,build,deploy,run,undeploy"/> - + <target name="clean" depends="init-common"> <delete dir="${build.classes.dir}"/> <delete dir="${assemble.dir}"/> </target> - + <target name="compile" depends="clean"> <antcall target="compile-common"> <param name="src" value="ejb"/> @@ -63,23 +63,23 @@ <antcall target="deploy-jdbc-common"/> <antcall target="deploy-common"/> </target> - - + + <target name="undeploy" depends="init-common"> <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> </target> - - + + <target name="run"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create.sql"/> - </antcall> + </antcall> <antcall target="runclient-common"/> </target> - + <target name="usage"> <antcall target="usage-common"/> </target> - + </project>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/client/Client.java index 4f06b7c..28fc8e6 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/client/Client.java
@@ -28,24 +28,24 @@ public static void main(String[] args) throws Exception { - SimpleReporterAdapter stat = new SimpleReporterAdapter(); - String testSuite = "TxPassThrough "; + SimpleReporterAdapter stat = new SimpleReporterAdapter(); + String testSuite = "TxPassThrough "; InitialContext ic = new InitialContext(); Object objRef = ic.lookup("java:comp/env/ejb/NoTxConnTestEJB"); - NoTxConnTestHome home = (NoTxConnTestHome) + NoTxConnTestHome home = (NoTxConnTestHome) javax.rmi.PortableRemoteObject.narrow(objRef, NoTxConnTestHome.class); NoTxConnTest bean = home.create(); - stat.addDescription("TX Pass Through tests "); + stat.addDescription("TX Pass Through tests "); if ( bean.test1() ) { - stat.addStatus(testSuite+" test1 : ", stat.PASS); - } else { - stat.addStatus(testSuite+" test1 : ", stat.FAIL); - } - stat.printSummary(); - - + stat.addStatus(testSuite+" test1 : ", stat.PASS); + } else { + stat.addStatus(testSuite+" test1 : ", stat.FAIL); + } + stat.printSummary(); + + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/descriptor/sun-ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/descriptor/sun-ejb-jar.xml index 6c6c63a..786dfb9 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/descriptor/sun-ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/descriptor/sun-ejb-jar.xml
@@ -24,44 +24,44 @@ <jndi-name>ejb/NoTxConnTestEJB</jndi-name> <ejb-ref> <ejb-ref-name>ejb/SecondEJB</ejb-ref-name> - <jndi-name>ejb/SecondEJB</jndi-name> + <jndi-name>ejb/SecondEJB</jndi-name> </ejb-ref> <resource-ref> <res-ref-name>jdbc/txpassthrough</res-ref-name> <jndi-name>jdbc/s1qeDB</jndi-name> - <default-resource-principal> - <name>pbpublic</name> - <password>pbpublic</password> - </default-resource-principal> + <default-resource-principal> + <name>pbpublic</name> + <password>pbpublic</password> + </default-resource-principal> </resource-ref> - </ejb> + </ejb> <ejb> <ejb-name>SecondEJB</ejb-name> <jndi-name>ejb/SecondEJB</jndi-name> <ejb-ref> <ejb-ref-name>ejb/ThirdEJB</ejb-ref-name> - <jndi-name>ejb/ThirdEJB</jndi-name> + <jndi-name>ejb/ThirdEJB</jndi-name> </ejb-ref> <resource-ref> <res-ref-name>jdbc/txpassthrough</res-ref-name> <jndi-name>jdbc/s1qeDB</jndi-name> - <default-resource-principal> - <name>pbpublic</name> - <password>pbpublic</password> - </default-resource-principal> + <default-resource-principal> + <name>pbpublic</name> + <password>pbpublic</password> + </default-resource-principal> </resource-ref> - </ejb> + </ejb> <ejb> <ejb-name>ThirdEJB</ejb-name> <jndi-name>ejb/ThirdEJB</jndi-name> <resource-ref> <res-ref-name>jdbc/txpassthrough</res-ref-name> <jndi-name>jdbc/s1qeDB</jndi-name> - <default-resource-principal> - <name>pbpublic</name> - <password>pbpublic</password> - </default-resource-principal> + <default-resource-principal> + <name>pbpublic</name> + <password>pbpublic</password> + </default-resource-principal> </resource-ref> - </ejb> + </ejb> </enterprise-beans> </sun-ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/NoTxConnTestBean.java b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/NoTxConnTestBean.java index 7405512..c284c70 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/NoTxConnTestBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/NoTxConnTestBean.java
@@ -30,7 +30,7 @@ private EJBContext ejbcontext; private transient jakarta.ejb.SessionContext m_ctx = null; transient javax.sql.DataSource ds; - + public void setSessionContext(jakarta.ejb.SessionContext ctx) { m_ctx = ctx; @@ -45,10 +45,10 @@ public void ejbPassivate() {} public boolean test1() { - System.out.println(" @@@@ Entering Bean 1 @@@@ "); - Connection conn = null; - Statement stmt = null; - ResultSet rs = null; + System.out.println(" @@@@ Entering Bean 1 @@@@ "); + Connection conn = null; + Statement stmt = null; + ResultSet rs = null; try { @@ -60,14 +60,14 @@ rs = stmt.executeQuery(query1); Object o = ctx.lookup("java:comp/env/ejb/SecondEJB"); - SecondHome home = (SecondHome) - javax.rmi.PortableRemoteObject.narrow(o, SecondHome.class ); - Second bean = home.create(); - return bean.test1(); + SecondHome home = (SecondHome) + javax.rmi.PortableRemoteObject.narrow(o, SecondHome.class ); + Second bean = home.create(); + return bean.test1(); } catch (Exception e) { - System.out.println("Caught Exception in 1st Bean---"); - e.printStackTrace(); - return false; + System.out.println("Caught Exception in 1st Bean---"); + e.printStackTrace(); + return false; } finally { if (rs != null ) { try { rs.close(); } catch( Exception e1) {} @@ -78,9 +78,9 @@ if (conn != null ) { try {conn.close();} catch( Exception e1) {} } - System.out.println(" @@@@ Exiting Bean 1 @@@@ "); - - } + System.out.println(" @@@@ Exiting Bean 1 @@@@ "); + + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/SecondBean.java b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/SecondBean.java index 55ed061..127709c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/SecondBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/SecondBean.java
@@ -30,7 +30,7 @@ private EJBContext ejbcontext; private transient jakarta.ejb.SessionContext m_ctx = null; transient javax.sql.DataSource ds; - + public void setSessionContext(jakarta.ejb.SessionContext ctx) { m_ctx = ctx; @@ -45,30 +45,30 @@ public void ejbPassivate() {} public boolean test1() { - System.out.println(" @@@@ Entering Bean2 @@@@ "); - Connection conn = null; - Statement stmt = null; - ResultSet rs = null; + System.out.println(" @@@@ Entering Bean2 @@@@ "); + Connection conn = null; + Statement stmt = null; + ResultSet rs = null; try { InitialContext ctx = new InitialContext(); - /* + /* ds = (javax.sql.DataSource) ctx.lookup("java:comp/env/jdbc/txpassthrough"); conn = ds.getConnection("dbuser", "dbpassword"); stmt = conn.createStatement(); String query1 = "SELECT * FROM ONLYGETCONNECTION"; rs = stmt.executeQuery(query1); - */ + */ Object o = ctx.lookup("java:comp/env/ejb/ThirdEJB"); - ThirdHome t = (ThirdHome) - javax.rmi.PortableRemoteObject.narrow( o, ThirdHome.class ); - Third bean = t.create(); - return bean.test1(); + ThirdHome t = (ThirdHome) + javax.rmi.PortableRemoteObject.narrow( o, ThirdHome.class ); + Third bean = t.create(); + return bean.test1(); } catch (Exception e) { - System.out.println("Caught Exception in 2nd Bean---"); - e.printStackTrace(); - return false; + System.out.println("Caught Exception in 2nd Bean---"); + e.printStackTrace(); + return false; } finally { if (rs != null ) { try { rs.close(); } catch( Exception e1) {} @@ -79,9 +79,9 @@ if (conn != null ) { try {conn.close();} catch( Exception e1) {} } - System.out.println(" @@@@ Exiting Bean 2 @@@@"); - - } + System.out.println(" @@@@ Exiting Bean 2 @@@@"); + + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/ThirdBean.java b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/ThirdBean.java index 2cbd2b2..27eb386 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/ThirdBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/ejb/ThirdBean.java
@@ -30,7 +30,7 @@ private EJBContext ejbcontext; private transient jakarta.ejb.SessionContext m_ctx = null; transient javax.sql.DataSource ds; - + public void setSessionContext(jakarta.ejb.SessionContext ctx) { m_ctx = ctx; @@ -45,10 +45,10 @@ public void ejbPassivate() {} public boolean test1() { - System.out.println(" @@@@ Entering Bean 3 @@@@"); - Connection conn = null; - Statement stmt = null; - ResultSet rs = null; + System.out.println(" @@@@ Entering Bean 3 @@@@"); + Connection conn = null; + Statement stmt = null; + ResultSet rs = null; try { @@ -56,13 +56,13 @@ ds = (javax.sql.DataSource) ctx.lookup("java:comp/env/jdbc/txpassthrough"); conn = ds.getConnection("dbuser", "dbpassword"); stmt = conn.createStatement(); - String query1 = "SELECT * FROM ONLYGETCONNECTION"; + String query1 = "SELECT * FROM ONLYGETCONNECTION"; rs = stmt.executeQuery(query1); - return true; + return true; } catch (Exception e) { - System.out.println("Caught Exception in 3rd Bean---"); - e.printStackTrace(); - return false; + System.out.println("Caught Exception in 3rd Bean---"); + e.printStackTrace(); + return false; } finally { if (rs != null ) { try { rs.close(); } catch( Exception e1) {} @@ -73,8 +73,8 @@ if (conn != null ) { try {conn.close();} catch( Exception e1) {} } - System.out.println(" @@@@ Exiting Bean 3 @@@@"); - } + System.out.println(" @@@@ Exiting Bean 3 @@@@"); + } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/sql/create.sql b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/sql/create.sql index c58a6e3..ae9f569 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/sql/create.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/txpassthrough/sql/create.sql
@@ -1,5 +1,5 @@ DROP TABLE ONLYGETCONNECTION; CREATE TABLE ONLYGETCONNECTION( - name char(20), + name char(20), num integer );
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/SetDerbyAuthentication.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/SetDerbyAuthentication.java index d13182b..93f94fd 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/SetDerbyAuthentication.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/SetDerbyAuthentication.java
@@ -28,12 +28,12 @@ * @author shalini */ public class SetDerbyAuthentication { - + private static String DATABASES_HOME = "/tmp/jdbc_devtests/databases"; private static String RECONFIG_DB_NAME = DATABASES_HOME + "/reconfig-db"; private static String SAMPLE_DB_NAME = DATABASES_HOME + "/sample-db"; private static String SUN_APPSERV_SAMPLES_DB = DATABASES_HOME + "/sun-appserv-samples"; - + public static void main(String[] args) { setCommonDBAuthentication(); setReconfigDBAuthentication(); @@ -45,30 +45,30 @@ Connection con = null; ResultSet rs = null; try { - DataSource ds = initializeDataSource(); - con = (Connection) ds.getConnection(); - stmt = con.createStatement(); - //Execute CallableStatement to enable authentication - stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + - "'derby.connection.requireAuthentication', 'true')"); - rs = stmt.executeQuery( - "VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY(" + - "'derby.connection.requireAuthentication')"); - rs.next(); - System.out.println("Authentication set to " + rs.getString(1)); + DataSource ds = initializeDataSource(); + con = (Connection) ds.getConnection(); + stmt = con.createStatement(); + //Execute CallableStatement to enable authentication + stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + + "'derby.connection.requireAuthentication', 'true')"); + rs = stmt.executeQuery( + "VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY(" + + "'derby.connection.requireAuthentication')"); + rs.next(); + System.out.println("Authentication set to " + rs.getString(1)); - //Setting Usernames and passwords - stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + - "'derby.user.dbuser', 'dbpassword')"); - stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + - "'derby.user.DBUSER', 'DBPASSWORD')"); - stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + - "'derby.user.APP', 'APP')"); - stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + - "'derby.user.DERBYUSER', 'DERBYPASSWORD')"); + //Setting Usernames and passwords + stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + + "'derby.user.dbuser', 'dbpassword')"); + stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + + "'derby.user.DBUSER', 'DBPASSWORD')"); + stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + + "'derby.user.APP', 'APP')"); + stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + + "'derby.user.DERBYUSER', 'DERBYPASSWORD')"); } catch(Exception ex) { ex.printStackTrace(); - } finally { + } finally { try { if(rs != null) { rs.close(); @@ -90,35 +90,35 @@ } } catch (Exception e) { e.printStackTrace(); - } - } + } + } } - + private static void setReconfigDBAuthentication() { Statement stmt = null; Connection con = null; - ResultSet rs = null; + ResultSet rs = null; try { - DataSource ds = initializeReconfigDataSource(); - con = (Connection) ds.getConnection(); - stmt = con.createStatement(); - //Execute CallableStatement to enable authentication - stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + - "'derby.connection.requireAuthentication', 'true')"); - rs = stmt.executeQuery( - "VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY(" + - "'derby.connection.requireAuthentication')"); - rs.next(); - System.out.println("Authentication set to " + rs.getString(1)); + DataSource ds = initializeReconfigDataSource(); + con = (Connection) ds.getConnection(); + stmt = con.createStatement(); + //Execute CallableStatement to enable authentication + stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + + "'derby.connection.requireAuthentication', 'true')"); + rs = stmt.executeQuery( + "VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY(" + + "'derby.connection.requireAuthentication')"); + rs.next(); + System.out.println("Authentication set to " + rs.getString(1)); - //Setting Usernames and passwords - stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + - "'derby.user.ruser', 'rpassword')"); - stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + - "'derby.user.RUSER', 'RPASSWORD')"); + //Setting Usernames and passwords + stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + + "'derby.user.ruser', 'rpassword')"); + stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + + "'derby.user.RUSER', 'RPASSWORD')"); } catch(Exception ex) { ex.printStackTrace(); - } finally { + } finally { try { if(rs != null) { rs.close(); @@ -140,36 +140,36 @@ } } catch (Exception e) { e.printStackTrace(); - } - + } + } } - + private static void setSampleDBAuthentication() { Statement stmt = null; Connection con = null; - ResultSet rs = null; + ResultSet rs = null; try { - DataSource ds = initializeSampleDataSource(); - con = (Connection) ds.getConnection(); - stmt = con.createStatement(); - //Execute CallableStatement to enable authentication - stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + - "'derby.connection.requireAuthentication', 'true')"); - rs = stmt.executeQuery( - "VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY(" + - "'derby.connection.requireAuthentication')"); - rs.next(); - System.out.println("Authentication set to " + rs.getString(1)); + DataSource ds = initializeSampleDataSource(); + con = (Connection) ds.getConnection(); + stmt = con.createStatement(); + //Execute CallableStatement to enable authentication + stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + + "'derby.connection.requireAuthentication', 'true')"); + rs = stmt.executeQuery( + "VALUES SYSCS_UTIL.SYSCS_GET_DATABASE_PROPERTY(" + + "'derby.connection.requireAuthentication')"); + rs.next(); + System.out.println("Authentication set to " + rs.getString(1)); - //Setting Usernames and passwords - stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + - "'derby.user.APP', 'APP')"); - stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + - "'derby.user.app', 'app')"); + //Setting Usernames and passwords + stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + + "'derby.user.APP', 'APP')"); + stmt.executeUpdate("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY(" + + "'derby.user.app', 'app')"); } catch(Exception ex) { ex.printStackTrace(); - } finally { + } finally { try { if(rs != null) { rs.close(); @@ -191,8 +191,8 @@ } } catch (Exception e) { e.printStackTrace(); - } - + } + } } @@ -205,11 +205,11 @@ Connection con = null; Connection con1 = null; try { - DataSource ds = initializeReconfigDataSource(); + DataSource ds = initializeReconfigDataSource(); DataSource ds1 = initializeSampleDataSource(); - con = (Connection) ds.getConnection(); + con = (Connection) ds.getConnection(); con1 = (Connection) ds1.getConnection(); - stmt = con.createStatement(); + stmt = con.createStatement(); stmt1 = con1.createStatement(); String query = "create table " + reconfigTable + "(" + columnName + " char(50))"; stmt.executeUpdate(query); @@ -218,7 +218,7 @@ System.out.println("Created tables : reconfigTestTable and sampleTable"); } catch(Exception ex) { ex.printStackTrace(); - } finally { + } finally { try { if (stmt != null) { stmt.close(); @@ -239,22 +239,22 @@ } } catch (Exception e) { e.printStackTrace(); - } - } - + } + } + } - + /** * Sets the EmbeddedDataSource properties corresponding to the pool configuration * created for running the JDBC reconfig devtests. */ private static org.apache.derby.jdbc.EmbeddedDataSource initializeReconfigDataSource() { - EmbeddedDataSource ds = new EmbeddedDataSource(); - ds.setUser("ruser"); - ds.setPassword("rpassword"); - ds.setDatabaseName(RECONFIG_DB_NAME); - ds.setConnectionAttributes("create=true"); - return ds; + EmbeddedDataSource ds = new EmbeddedDataSource(); + ds.setUser("ruser"); + ds.setPassword("rpassword"); + ds.setDatabaseName(RECONFIG_DB_NAME); + ds.setConnectionAttributes("create=true"); + return ds; } /** @@ -262,24 +262,24 @@ * created for running the JDBC reconfig devtests. */ private static org.apache.derby.jdbc.EmbeddedDataSource initializeSampleDataSource() { - EmbeddedDataSource ds = new EmbeddedDataSource(); - ds.setUser("APP"); - ds.setPassword("APP"); - ds.setDatabaseName(SAMPLE_DB_NAME); - ds.setConnectionAttributes("create=true"); - return ds; + EmbeddedDataSource ds = new EmbeddedDataSource(); + ds.setUser("APP"); + ds.setPassword("APP"); + ds.setDatabaseName(SAMPLE_DB_NAME); + ds.setConnectionAttributes("create=true"); + return ds; } - + /** * Sets the EmbeddedDataSource properties corresponding to the pool configuration * created for running the JDBC devtests. */ private static org.apache.derby.jdbc.EmbeddedDataSource initializeDataSource() { - EmbeddedDataSource ds = new EmbeddedDataSource(); - ds.setUser("APP"); - ds.setPassword("APP"); - ds.setDatabaseName(SUN_APPSERV_SAMPLES_DB); - ds.setConnectionAttributes("create=true"); - return ds; + EmbeddedDataSource ds = new EmbeddedDataSource(); + ds.setUser("APP"); + ds.setPassword("APP"); + ds.setDatabaseName(SUN_APPSERV_SAMPLES_DB); + ds.setConnectionAttributes("create=true"); + return ds; } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/build.properties index 85f4d14..5c0e74e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/build.properties
@@ -15,17 +15,17 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="autocommit"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> <property name="web.xml" value="descriptor/web.xml"/> <property name="sun-web.xml" value="descriptor/sun-web.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/build.xml index 831df8f..805fba2 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/build.xml
@@ -41,7 +41,7 @@ <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"/> @@ -55,50 +55,50 @@ </target> <target name="build" depends="compile"> - <property name="hasWebclient" value="true"/> + <property name="hasWebclient" value="true"/> <antcall target="webclient-war-common"> <param name="hasWebclient" value="yes"/> <param name="webclient.war.classes" value="**/*.class"/> </antcall> <antcall target="ejb-jar-common"> - <param name="ejbjar.classes" value="**/*.class"/> - </antcall> + <param name="ejbjar.classes" value="**/*.class"/> + </antcall> - <delete file="${assemble.dir}/${appname}.ear"/> + <delete file="${assemble.dir}/${appname}.ear"/> <mkdir dir="${assemble.dir}"/> <mkdir dir="${build.classes.dir}/META-INF"/> - <ear earfile="${assemble.dir}/${appname}App.ear" - appxml="${application.xml}"> - <fileset dir="${assemble.dir}"> - <include name="*.jar"/> - <include name="*.war"/> - </fileset> - </ear> - </target> - + <ear earfile="${assemble.dir}/${appname}App.ear" + appxml="${application.xml}"> + <fileset dir="${assemble.dir}"> + <include name="*.jar"/> + <include name="*.war"/> + </fileset> + </ear> + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> - - <antcall target="setup"/> + + <antcall target="setup"/> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="run-test-1"/> </target> - + <target name="run-test-1" depends="init-common"> <antcall target="runwebclient-common"> - <param name="testsuite.id" value="web-to-ejb (ear based)"/> - </antcall> + <param name="testsuite.id" value="web-to-ejb (ear based)"/> + </antcall> </target> <target name="undeploy" depends="init-common"> @@ -108,7 +108,7 @@ <antcall target="unsetup"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/> @@ -118,12 +118,12 @@ <antcall target="deploy-jdbc-common"> <param name="jdbc.conpool.name" value="jdbc-autocommit-pool"/> - <param name="jdbc.resource.name" value="jdbc/autocommit"/> + <param name="jdbc.resource.name" value="jdbc/autocommit"/> </antcall> - + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> - <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-autocommit-pool.steady_pool_size=2"/> + <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-autocommit-pool.steady_pool_size=2"/> </antcall> <antcall target="asadmin-common"> @@ -131,7 +131,7 @@ <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.jdbc-autocommit-pool.max_pool_size=2"/> </antcall> - + </target> <target name="unsetup">
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/descriptor/ejb-jar.xml index b5bced4..a1a150a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/descriptor/ejb-jar.xml
@@ -55,7 +55,7 @@ <method-name>*</method-name> </method> <trans-attribute>Required</trans-attribute> - </container-transaction> + </container-transaction> <container-transaction> <method> <ejb-name>SimpleBMPEJB</ejb-name> @@ -64,6 +64,6 @@ <trans-attribute>NotSupported</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/ejb/SimpleBMPBean.java index 50f1766..c780d78 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/ejb/SimpleBMPBean.java
@@ -30,67 +30,67 @@ protected DataSource ds; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } /* Get a single connection and close it */ public boolean test1() { Connection conn = null; boolean passed = true; - try { - conn = ds.getConnection(); - passed = !conn.getAutoCommit(); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - return passed; + try { + conn = ds.getConnection(); + passed = !conn.getAutoCommit(); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } + + return passed; } public boolean test2() { Connection conn1 = null; Connection conn2 = null; - boolean passed = true; + boolean passed = true; - try { - conn1 = ds.getConnection(); - conn2 = ds.getConnection(); + try { + conn1 = ds.getConnection(); + conn2 = ds.getConnection(); - passed = conn1.getAutoCommit() & conn2.getAutoCommit(); - } catch( Exception e ) { - passed = false; - } finally { - if (conn1 != null ) { - try { - conn1.close(); - } catch( Exception ei) {} - } - if (conn2 != null ) { - try { - conn2.close(); - } catch( Exception ei) {} - } - } - - return passed; + passed = conn1.getAutoCommit() & conn2.getAutoCommit(); + } catch( Exception e ) { + passed = false; + } finally { + if (conn1 != null ) { + try { + conn1.close(); + } catch( Exception ei) {} + } + if (conn2 != null ) { + try { + conn2.close(); + } catch( Exception ei) {} + } } - + + return passed; + } + public void ejbLoad() {} public void ejbStore() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/servlet/SimpleServlet.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/servlet/SimpleServlet.java index 9253de6..436ff69 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/servlet/SimpleServlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/servlet/SimpleServlet.java
@@ -56,27 +56,27 @@ SimpleBMP bean = simpleBMPHome.create(); if ( bean.test1() ) { - System.out.println("Autocommit : test1 : PASS"); - out.println("TEST:PASS"); - } else { - System.out.println("Autocommit : test1 : FAIL"); + System.out.println("Autocommit : test1 : PASS"); + out.println("TEST:PASS"); + } else { + System.out.println("Autocommit : test1 : FAIL"); out.println("TEST:FAIL"); - } - if ( bean.test2() ) { - System.out.println("Autocommit : test2 : PASS"); - out.println("TEST:PASS"); - } else { - System.out.println("Autocommit : test2 : FAIL"); + } + if ( bean.test2() ) { + System.out.println("Autocommit : test2 : PASS"); + out.println("TEST:PASS"); + } else { + System.out.println("Autocommit : test2 : FAIL"); out.println("TEST:FAIL"); - } + } - } catch(NamingException ne) { - ne.printStackTrace(); - } catch(CreateException e) { - e.printStackTrace(); + } catch(NamingException ne) { + ne.printStackTrace(); + } catch(CreateException e) { + e.printStackTrace(); } finally { - out.println("END_OF_TEST"); - out.flush(); - } + out.println("END_OF_TEST"); + out.flush(); + } } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/autocommit/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/build.xml index 59a9a5e..bc249bc 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/build.xml
@@ -19,12 +19,12 @@ --> <!ENTITY commonSetup SYSTEM "./../../../config/properties.xml"> - <!ENTITY commonBuild SYSTEM "./../../../config/common.xml"> - <!ENTITY jdbcCommon SYSTEM "./../JdbcCommon.xml"> - <!ENTITY jdbcCommonProperties SYSTEM "./../JdbcCommon.properties"> - <!ENTITY reporting SYSTEM "./../report.xml"> - <!ENTITY eeCommon SYSTEM "./../config/ee-common.xml"> - <!ENTITY eeCommonProperties SYSTEM "./../config/ee-properties.xml"> + <!ENTITY commonBuild SYSTEM "./../../../config/common.xml"> + <!ENTITY jdbcCommon SYSTEM "./../JdbcCommon.xml"> + <!ENTITY jdbcCommonProperties SYSTEM "./../JdbcCommon.properties"> + <!ENTITY reporting SYSTEM "./../report.xml"> + <!ENTITY eeCommon SYSTEM "./../config/ee-common.xml"> + <!ENTITY eeCommonProperties SYSTEM "./../config/ee-properties.xml"> ]> <project name="jdbc" default="usage" basedir="."> @@ -49,15 +49,15 @@ <delete> <fileset dir="." includes="*.output"/> </delete> - <record name="jdbc.output" action="start"/> - <antcall target="contauth"/> - <antcall target="autocommit"/> - <antcall target="maxconnectionusage"/> + <record name="jdbc.output" action="start"/> + <antcall target="contauth"/> + <antcall target="autocommit"/> + <antcall target="maxconnectionusage"/> <antcall target="multipleusercredentials"/> - <antcall target="statementtimeout"/> - <antcall target="connleaktracing"/> - <antcall target="conncreationretry"/> - <antcall target="resEnableDisable"/> + <antcall target="statementtimeout"/> + <antcall target="connleaktracing"/> + <antcall target="conncreationretry"/> + <antcall target="resEnableDisable"/> <record name="jdbc.output" action="stop"/> </target> @@ -69,63 +69,63 @@ <fileset dir="." includes="*.output"/> </delete> <record name="jdbc.output" action="start"/> - <antcall target="contauth"/> - <antcall target="autocommit"/> - <antcall target="maxconnectionusage"/> + <antcall target="contauth"/> + <antcall target="autocommit"/> + <antcall target="maxconnectionusage"/> <antcall target="multipleusercredentials"/> - <antcall target="statementtimeout"/> - <antcall target="connleaktracing"/> - <antcall target="conncreationretry"/> - <antcall target="resEnableDisable"/> + <antcall target="statementtimeout"/> + <antcall target="connleaktracing"/> + <antcall target="conncreationretry"/> + <antcall target="resEnableDisable"/> <record name="jdbc.output" action="stop"/> </target> <target name="contauth"> <record name="contauth/contauth.output" action="start"/> <ant dir="contauth" target="all"/> - <record name="contauth/contauth.output" action="stop"/> + <record name="contauth/contauth.output" action="stop"/> </target> <target name="autocommit"> - <record name="autocommit/autocommit.output" action="start"/> - <ant dir="autocommit" target="all"/> - <record name="autocommit/autocommit.output" action="stop"/> + <record name="autocommit/autocommit.output" action="start"/> + <ant dir="autocommit" target="all"/> + <record name="autocommit/autocommit.output" action="stop"/> </target> <target name="maxconnectionusage"> <record name="maxconnectionusage/maxconnectionusage.output" action="start"/> <ant dir="maxconnectionusage" target="all"/> - <record name="maxconnectionusage/maxconnectionusage.output" action="stop"/> + <record name="maxconnectionusage/maxconnectionusage.output" action="stop"/> </target> - + <target name="multipleusercredentials"> - <record name="multipleusercredentials/multipleusercredentials.output" action="start"/> - <ant dir="multipleusercredentials" target="all"/> - <record name="multipleusercredentials/multipleusercredentials.output" action="stop"/> + <record name="multipleusercredentials/multipleusercredentials.output" action="start"/> + <ant dir="multipleusercredentials" target="all"/> + <record name="multipleusercredentials/multipleusercredentials.output" action="stop"/> </target> - + <target name="statementtimeout"> - <record name="statementtimeout/statementtimeout.output" action="start"/> - <ant dir="statementtimeout" target="all"/> - <record name="statementtimeout/statementtimeout.output" action="stop"/> + <record name="statementtimeout/statementtimeout.output" action="start"/> + <ant dir="statementtimeout" target="all"/> + <record name="statementtimeout/statementtimeout.output" action="stop"/> </target> <target name="connleaktracing"> <record name="connleaktracing/connleaktracing.output" action="start"/> <ant dir="connleaktracing" target="all"/> - <record name="connleaktracing/connleaktracing.output" action="stop"/> + <record name="connleaktracing/connleaktracing.output" action="stop"/> </target> <target name="conncreationretry"> - <record name="conncreationretry/conncreationretry.output" action="start"/> - <ant dir="conncreationretry" target="all"/> - <record name="conncreationretry/conncreationretry.output" action="stop"/> + <record name="conncreationretry/conncreationretry.output" action="start"/> + <ant dir="conncreationretry" target="all"/> + <record name="conncreationretry/conncreationretry.output" action="stop"/> </target> <target name="resEnableDisable"> <record name="resEnableDisable/resenabledisable.output" action="start"/> <ant dir="resEnableDisable" target="all"/> - <record name="resEnableDisable/resenabledisable.output" action="stop"/> + <record name="resEnableDisable/resenabledisable.output" action="stop"/> </target> <target name="usage"> <echo>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/build.properties index 1f4eae9..22312b7 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/build.properties
@@ -15,17 +15,17 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-connectioncreationretry"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> <property name="web.xml" value="descriptor/web.xml"/> <property name="sun-web.xml" value="descriptor/sun-web.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="poolname" value="jdbc-connectioncreationretry"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/build.xml index d0ab872..01339a5 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/build.xml
@@ -19,11 +19,11 @@ --> <!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml"> - <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> + <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> <!ENTITY testproperties SYSTEM "./build.properties"> - <!ENTITY run SYSTEM "./../../../../config/run.xml"> - <!ENTITY eeSetup SYSTEM "./../../config/ee-common.xml"> - <!ENTITY eeProperties SYSTEM "./../../config/ee-properties.xml"> + <!ENTITY run SYSTEM "./../../../../config/run.xml"> + <!ENTITY eeSetup SYSTEM "./../../config/ee-common.xml"> + <!ENTITY eeProperties SYSTEM "./../../config/ee-properties.xml"> ]> <project name="mix" default="usage" basedir="."> @@ -57,28 +57,28 @@ </target> <target name="build" depends="compile"> - <property name="hasWebclient" value="true"/> + <property name="hasWebclient" value="true"/> <antcall target="webclient-war-common"> <param name="hasWebclient" value="yes"/> <param name="webclient.war.classes" value="**/*.class"/> </antcall> <antcall target="ejb-jar-common"> - <param name="ejbjar.classes" value="**/*.class"/> - </antcall> + <param name="ejbjar.classes" value="**/*.class"/> + </antcall> - <delete file="${assemble.dir}/${appname}.ear"/> + <delete file="${assemble.dir}/${appname}.ear"/> <mkdir dir="${assemble.dir}"/> <mkdir dir="${build.classes.dir}/META-INF"/> - <ear earfile="${assemble.dir}/${appname}App.ear" - appxml="${application.xml}"> - <fileset dir="${assemble.dir}"> - <include name="*.jar"/> - <include name="*.war"/> - </fileset> - </ear> + <ear earfile="${assemble.dir}/${appname}App.ear" + appxml="${application.xml}"> + <fileset dir="${assemble.dir}"> + <include name="*.jar"/> + <include name="*.war"/> + </fileset> + </ear> </target> <target name="deploy" depends="init-common"> @@ -92,20 +92,20 @@ <target name="run" depends="init-common"> <antcall target="stop-derby"/> - <parallel> - <antcall target="run-test-1"/> - <sequential> - <sleep seconds="15"/> - <antcall target="start-derby"/> - </sequential> - </parallel> + <parallel> + <antcall target="run-test-1"/> + <sequential> + <sleep seconds="15"/> + <antcall target="start-derby"/> + </sequential> + </parallel> </target> <target name="run-test-1" depends="init-common"> <antcall target="runwebclient-common"> - <param name="testsuite.id" value="web-to-ejb (ear based)"/> - </antcall> + <param name="testsuite.id" value="web-to-ejb (ear based)"/> + </antcall> </target> <target name="undeploy" depends="init-common">
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/ejb/SimpleBMPBean.java index cd1d898..5d1b466 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/ejb/SimpleBMPBean.java
@@ -41,7 +41,7 @@ } - + /* Get a single connection and close it */ public boolean test1(){ Connection conn = null;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/servlet/SimpleServlet.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/servlet/SimpleServlet.java index d722609..3c05e5d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/servlet/SimpleServlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/servlet/SimpleServlet.java
@@ -56,20 +56,20 @@ SimpleBMP convalBMP = simpleBMPHome.create(); if (convalBMP.test1()) { - System.out.println("Connection Creation Retry : test1 : PASS"); - out.println("TEST:PASS"); + System.out.println("Connection Creation Retry : test1 : PASS"); + out.println("TEST:PASS"); } else { - System.out.println("Connection Creation Retry : test1 : FAIL"); + System.out.println("Connection Creation Retry : test1 : FAIL"); out.println("TEST:FAIL"); } - } catch(NamingException ne) { - ne.printStackTrace(); - } catch(CreateException e) { - e.printStackTrace(); + } catch(NamingException ne) { + ne.printStackTrace(); + } catch(CreateException e) { + e.printStackTrace(); } finally { - out.println("END_OF_TEST"); - out.flush(); - } + out.println("END_OF_TEST"); + out.flush(); + } } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/conncreationretry/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/build.properties index 25a3797..02c0ccb 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/build.properties
@@ -15,21 +15,21 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-connectionleaktracing"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> <property name="web.xml" value="descriptor/web.xml"/> <property name="sun-web.xml" value="descriptor/sun-web.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="poolname" value="jdbc-connectionleaktracing"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/build.xml index 2de7124..75cd13c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/build.xml
@@ -19,9 +19,9 @@ --> <!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml"> - <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> + <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> <!ENTITY testproperties SYSTEM "./build.properties"> - <!ENTITY run SYSTEM "./../../config/run.xml"> + <!ENTITY run SYSTEM "./../../config/run.xml"> ]> <project name="mix" default="usage" basedir="."> @@ -54,12 +54,12 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> <param name="ejbjar.classes" - value="**/ejb/*.class"/> + value="**/ejb/*.class"/> <param name="appclientjar.classes" - value="**/client/*.class"/> - <param name="war.classes" - value="**/servlet/*.class"/> - <param name="hasWebclient" value="true"/> + value="**/client/*.class"/> + <param name="war.classes" + value="**/servlet/*.class"/> + <param name="hasWebclient" value="true"/> </antcall> <javac srcdir="." @@ -88,8 +88,8 @@ <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> <antcall target="delete-jdbc-stuff"/> - <antcall target="undeploy-common"/> - <delete file="client/WebTest.class"/> + <antcall target="undeploy-common"/> + <delete file="client/WebTest.class"/> </target> <target name="usage"> @@ -129,7 +129,7 @@ <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${poolname}.connection_leak_reclaim=true"/> </antcall> - <antcall target="asadmin-common"> + <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" value="${resources.dottedname.prefix}.jdbc-connection-pool.${poolname}.non_transactional_connections=true"/> @@ -160,6 +160,6 @@ </target> - + </project>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/descriptor/ejb-jar.xml index 1b46293..9a64b42 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/descriptor/ejb-jar.xml
@@ -31,16 +31,16 @@ <ejb-name>SimpleBMPEJB</ejb-name> <local-home>com.sun.s1asdev.jdbc.connectionleaktracing.ejb.SimpleBMPHome</local-home> <local>com.sun.s1asdev.jdbc.connectionleaktracing.ejb.SimpleBMP</local> - <ejb-class>com.sun.s1asdev.jdbc.connectionleaktracing.ejb.SimpleBMPBean</ejb-class> - <session-type>Stateless</session-type> - <transaction-type>Container</transaction-type> - <!--<persistence-type>Bean</persistence-type> + <ejb-class>com.sun.s1asdev.jdbc.connectionleaktracing.ejb.SimpleBMPBean</ejb-class> + <session-type>Stateless</session-type> + <transaction-type>Container</transaction-type> + <!--<persistence-type>Bean</persistence-type> <prim-key-class>java.lang.Integer</prim-key-class> <reentrant>False</reentrant> <security-identity> <description></description> <use-caller-identity></use-caller-identity> - </security-identity>--> + </security-identity>--> <resource-ref> <res-ref-name>DataSource</res-ref-name> <res-type>javax.sql.DataSource</res-type>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/ejb/SimpleBMPBean.java index 98a69ed..dd98a7d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/ejb/SimpleBMPBean.java
@@ -28,7 +28,7 @@ private transient jakarta.ejb.SessionContext m_ctx = null; public void setSessionContext(SessionContext context) { - m_ctx = context; + m_ctx = context; } public Integer ejbCreate() throws CreateException { @@ -36,7 +36,7 @@ } - + /* Get a single connection and close it */ public boolean test1() { Connection conn = null;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/servlet/SimpleServlet.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/servlet/SimpleServlet.java index 88496a6..9a49ae2 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/servlet/SimpleServlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/servlet/SimpleServlet.java
@@ -56,24 +56,24 @@ //stat.addDescription("Running serializable connector test "); SimpleBMP bean = simpleBMPHome.create(); - for(int i=0; i<3; i++){ + for(int i=0; i<3; i++){ if(!bean.test1()){ - //stat.addStatus("jdbc-connectionleakttracing : test ", stat.FAIL); + //stat.addStatus("jdbc-connectionleakttracing : test ", stat.FAIL); out.println("TEST:FAIL"); - break; - } - Thread.sleep(20000); - } - out.println("TEST:PASS"); - } catch(NamingException ne) { - ne.printStackTrace(); - } catch(CreateException e) { - e.printStackTrace(); - } catch(java.lang.InterruptedException ie) { - ie.printStackTrace(); + break; + } + Thread.sleep(20000); + } + out.println("TEST:PASS"); + } catch(NamingException ne) { + ne.printStackTrace(); + } catch(CreateException e) { + e.printStackTrace(); + } catch(java.lang.InterruptedException ie) { + ie.printStackTrace(); } finally { - out.println("END_OF_TEST"); - out.flush(); - } + out.println("END_OF_TEST"); + out.flush(); + } } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/connleaktracing/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/build.properties index 1575c6c..af7e3b7 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/build.properties
@@ -15,17 +15,17 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="contauth"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> <property name="web.xml" value="descriptor/web.xml"/> <property name="sun-web.xml" value="descriptor/sun-web.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="contextroot" value="/contauth/servlet"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/build.xml index 1cfe10b..afb8ab8 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/build.xml
@@ -41,7 +41,7 @@ <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"/> @@ -56,30 +56,30 @@ </target> <target name="build" depends="compile"> - <property name="hasWebclient" value="true"/> + <property name="hasWebclient" value="true"/> <antcall target="webclient-war-common"> <param name="hasWebclient" value="yes"/> <param name="webclient.war.classes" value="**/*.class"/> </antcall> <antcall target="ejb-jar-common"> - <param name="ejbjar.classes" value="**/*.class"/> - </antcall> + <param name="ejbjar.classes" value="**/*.class"/> + </antcall> - <delete file="${assemble.dir}/${appname}.ear"/> + <delete file="${assemble.dir}/${appname}.ear"/> <mkdir dir="${assemble.dir}"/> <mkdir dir="${build.classes.dir}/META-INF"/> - <ear earfile="${assemble.dir}/${appname}App.ear" - appxml="${application.xml}"> - <fileset dir="${assemble.dir}"> - <include name="*.jar"/> - <include name="*.war"/> - </fileset> - </ear> - </target> - + <ear earfile="${assemble.dir}/${appname}App.ear" + appxml="${application.xml}"> + <fileset dir="${assemble.dir}"> + <include name="*.jar"/> + <include name="*.war"/> + </fileset> + </ear> + </target> + <target name="deploy" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> @@ -87,17 +87,17 @@ <antcall target="deploy-jdbc-common"/> <antcall target="deploy-common"/> </target> - + <target name="run" depends="init-common"> <antcall target="execute-sql-common"> <param name="sql.file" value="sql/create_pointbase.sql"/> </antcall> <antcall target="run-test-1"/> </target> - + <target name="run-test-1" depends="init-common"> <antcall target="runwebclient-common"> - <param name="testsuite.id" value="web-to-ejb (ear based)"/> + <param name="testsuite.id" value="web-to-ejb (ear based)"/> </antcall> </target> @@ -108,7 +108,7 @@ <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> - </target> + </target> <target name="usage"> <antcall target="usage-common"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/descriptor/ejb-jar.xml index 7e6bc30..576512b 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/descriptor/ejb-jar.xml
@@ -50,13 +50,13 @@ <assembly-descriptor> <container-transaction> - <method> + <method> <ejb-name>SimpleBMPEJB</ejb-name> <method-name>*</method-name> </method> <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> - + </ejb-jar>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/ejb/SimpleBMPBean.java index 5ceec41..52d9900 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/ejb/SimpleBMPBean.java
@@ -30,58 +30,58 @@ protected DataSource ds; public void setEntityContext(EntityContext entityContext) { - Context context = null; - try { - context = new InitialContext(); - ds = (DataSource) context.lookup("java:comp/env/DataSource"); - } catch (NamingException e) { - throw new EJBException("cant find datasource"); - } + Context context = null; + try { + context = new InitialContext(); + ds = (DataSource) context.lookup("java:comp/env/DataSource"); + } catch (NamingException e) { + throw new EJBException("cant find datasource"); + } System.out.println("[**SimpleBMPBean**] Done with setEntityContext...."); } public Integer ejbCreate() throws CreateException { - return new Integer(1); + return new Integer(1); } public boolean test1() { //container auth + user/pwd specified - should pass - Connection conn = null; - boolean passed = true; - try { - conn = ds.getConnection("DBUSER", "DBPASSWORD" ); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } - - - return passed; + Connection conn = null; + boolean passed = true; + try { + conn = ds.getConnection("DBUSER", "DBPASSWORD" ); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } } - + + + return passed; + } + public boolean test2() { //container auth + user/pwd NOT specified - should pass - Connection conn = null; - boolean passed = true; - try { - conn = ds.getConnection(); - } catch (Exception e) { - passed = false; - } finally { - if ( conn != null ) { - try { - conn.close(); - } catch( Exception e1) {} - } - } + Connection conn = null; + boolean passed = true; + try { + conn = ds.getConnection(); + } catch (Exception e) { + passed = false; + } finally { + if ( conn != null ) { + try { + conn.close(); + } catch( Exception e1) {} + } + } - - return passed; + + return passed; } public void ejbLoad() {}
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/servlet/SimpleServlet.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/servlet/SimpleServlet.java index 58208c2..e5b62aa 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/servlet/SimpleServlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/servlet/SimpleServlet.java
@@ -56,29 +56,29 @@ SimpleBMP bean = simpleBMPHome.create(); if ( bean.test1() ) { - System.out.println("Contauth : test1 : PASS"); - out.println("TEST:PASS"); - } else { - System.out.println("Contauth : test1 : FAIL"); + System.out.println("Contauth : test1 : PASS"); + out.println("TEST:PASS"); + } else { + System.out.println("Contauth : test1 : FAIL"); out.println("TEST:FAIL"); - } - if ( bean.test2() ) { - System.out.println("Contauth : test2 : PASS"); - out.println("TEST:PASS"); - } else { - System.out.println("Contauth : test2 : FAIL"); + } + if ( bean.test2() ) { + System.out.println("Contauth : test2 : PASS"); + out.println("TEST:PASS"); + } else { + System.out.println("Contauth : test2 : FAIL"); out.println("TEST:FAIL"); - } + } - } catch(NamingException ne) { - ne.printStackTrace(); - } catch(CreateException e) { - e.printStackTrace(); - } /*catch(java.lang.InterruptedException ie) { - ie.printStackTrace(); + } catch(NamingException ne) { + ne.printStackTrace(); + } catch(CreateException e) { + e.printStackTrace(); + } /*catch(java.lang.InterruptedException ie) { + ie.printStackTrace(); } */finally { - out.println("END_OF_TEST"); - out.flush(); - } + out.println("END_OF_TEST"); + out.flush(); + } } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/contauth/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/embedded/setup-jdbc-dev-tests-embedded.sh b/appserver/tests/appserv-tests/devtests/jdbc/v3/embedded/setup-jdbc-dev-tests-embedded.sh index a0390e0..9975beb 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/embedded/setup-jdbc-dev-tests-embedded.sh +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/embedded/setup-jdbc-dev-tests-embedded.sh
@@ -89,7 +89,7 @@ #Create Pool/Resource for lazy-connection-associationtest echo Creating Pool/Resource Lazy connection association test -./bin/asadmin create-jdbc-connection-pool --maxwait=10 --datasourceclassname=org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource --restype=javax.sql.ConnectionPoolDataSource --lazyconnectionenlistment=true --lazyconnectionassociation=true --property="password=APP:user=APP:databaseName=sun-appserv-samples:connectionAttributes=\;create\\=true" jdbc-lazy-assoc-test-pool +./bin/asadmin create-jdbc-connection-pool --maxwait=10 --datasourceclassname=org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource --restype=javax.sql.ConnectionPoolDataSource --lazyconnectionenlistment=true --lazyconnectionassociation=true --property="password=APP:user=APP:databaseName=sun-appserv-samples:connectionAttributes=\;create\\=true" jdbc-lazy-assoc-test-pool ./bin/asadmin create-jdbc-resource --connectionpoolid=jdbc-lazy-assoc-test-pool jdbc/jdbc-lazy-assoc-test-resource echo "\n"
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/embedded/setup-jdbc-reconfig-dev-tests_embedded.sh b/appserver/tests/appserv-tests/devtests/jdbc/v3/embedded/setup-jdbc-reconfig-dev-tests_embedded.sh index fd08b2f..83e7abd 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/embedded/setup-jdbc-reconfig-dev-tests_embedded.sh +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/embedded/setup-jdbc-reconfig-dev-tests_embedded.sh
@@ -50,7 +50,7 @@ echo create resource jdbc/jdbc-reconfig-test-resource-1 ./bin/asadmin create-jdbc-resource --connectionpoolid=jdbc-reconfig-test-pool-1 jdbc/jdbc-reconfig-test-resource-1 -echo create pool jdbc-reconfig-test-pool-2 +echo create pool jdbc-reconfig-test-pool-2 ./bin/asadmin create-jdbc-connection-pool --datasourceclassname=org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource --restype=javax.sql.ConnectionPoolDataSource --property="Password=rpassword:User=ruser:DatabaseName=$databaseshome/reconfig-db:serverName=localhost" jdbc-reconfig-test-pool-2 echo create resource jdbc/jdbc-reconfig-test-resource-2 @@ -79,7 +79,7 @@ ./bin/asadmin set resources.jdbc-connection-pool.jdbc-dev-test-pool.max-wait-time-in-millis=1000 echo "\nGET http://localhost:8080/v3_jdbc_dev_tests/ReconfigTestServlet?maxPoolSize=40\&throwException=true\&testId=1 \n" -GET http://localhost:8080/v3_jdbc_dev_tests/ReconfigTestServlet?maxPoolSize=40\&throwException=true\&testId=1 > $reconfigResult +GET http://localhost:8080/v3_jdbc_dev_tests/ReconfigTestServlet?maxPoolSize=40\&throwException=true\&testId=1 > $reconfigResult echo "\n" #asadmin set max-pool-size to 10 before running test for the second time
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/build.properties index bd49867..6800108 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/build.properties
@@ -15,17 +15,17 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="maxconnectionusage"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> <property name="web.xml" value="descriptor/web.xml"/> <property name="sun-web.xml" value="descriptor/sun-web.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/build.xml index bea526d..62d0e91 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/build.xml
@@ -19,11 +19,11 @@ --> <!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml"> - <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> + <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> <!ENTITY testproperties SYSTEM "./build.properties"> - <!ENTITY run SYSTEM "./../../../../config/run.xml"> - <!ENTITY eeSetup SYSTEM "./../../config/ee-common.xml"> - <!ENTITY eeProperties SYSTEM "./../../config/ee-properties.xml"> + <!ENTITY run SYSTEM "./../../../../config/run.xml"> + <!ENTITY eeSetup SYSTEM "./../../config/ee-common.xml"> + <!ENTITY eeProperties SYSTEM "./../../config/ee-properties.xml"> ]> <project name="mix" default="usage" basedir="."> @@ -51,28 +51,28 @@ </target> <target name="build" depends="compile"> - <property name="hasWebclient" value="true"/> + <property name="hasWebclient" value="true"/> <antcall target="webclient-war-common"> <param name="hasWebclient" value="yes"/> <param name="webclient.war.classes" value="**/*.class"/> </antcall> <antcall target="ejb-jar-common"> - <param name="ejbjar.classes" value="**/*.class"/> - </antcall> + <param name="ejbjar.classes" value="**/*.class"/> + </antcall> - <delete file="${assemble.dir}/${appname}.ear"/> + <delete file="${assemble.dir}/${appname}.ear"/> <mkdir dir="${assemble.dir}"/> <mkdir dir="${build.classes.dir}/META-INF"/> - <ear earfile="${assemble.dir}/${appname}App.ear" - appxml="${application.xml}"> - <fileset dir="${assemble.dir}"> - <include name="*.jar"/> - <include name="*.war"/> - </fileset> - </ear> + <ear earfile="${assemble.dir}/${appname}App.ear" + appxml="${application.xml}"> + <fileset dir="${assemble.dir}"> + <include name="*.jar"/> + <include name="*.war"/> + </fileset> + </ear> </target> <target name="deploy" depends="init-common"> @@ -93,7 +93,7 @@ <target name="run-test-1" depends="init-common"> <antcall target="runwebclient-common"> - <param name="testsuite.id" value="web-to-ejb (ear based)"/> + <param name="testsuite.id" value="web-to-ejb (ear based)"/> </antcall> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/descriptor/application.xml index 8d5bae6..7f29733 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/descriptor/application.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/descriptor/application.xml
@@ -28,10 +28,10 @@ <ejb>maxconnectionusage-ejb.jar</ejb> </module> <module> - <web> - <web-uri>maxconnectionusage-web.war</web-uri> - <context-root>maxconnectionusage</context-root> - </web> + <web> + <web-uri>maxconnectionusage-web.war</web-uri> + <context-root>maxconnectionusage</context-root> + </web> </module> </application>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/servlet/SimpleServlet.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/servlet/SimpleServlet.java index e19f64e..50589c0 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/servlet/SimpleServlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/servlet/SimpleServlet.java
@@ -57,7 +57,7 @@ if (simpleBMP.test1(false)) { System.out.println(" Max Connection Usage - (local-TxNotSupported): PASS"); - out.println("TEST:PASS"); + out.println("TEST:PASS"); } else { System.out.println(" Max Connection Usage - (local-TxNotSupported): FAIL"); out.println("TEST:FAIL"); @@ -67,7 +67,7 @@ boolean status = connectionSharingTest(simpleBMP, useXA, 21112); if (status) { System.out.println(" Max Connection Usage - (local-Tx-Sharing) : PASS"); - out.println("TEST:PASS"); + out.println("TEST:PASS"); } else { System.out.println(" Max Connection Usage - (local-Tx-Sharing) : FAIL"); out.println("TEST:FAIL"); @@ -76,20 +76,20 @@ if (simpleBMP.test1(true)) { System.out.println(" Max Connection Usage - (XA-TxNotSupported) : PASS"); - out.println("TEST:PASS"); + out.println("TEST:PASS"); } else { System.out.println(" Max Connection Usage - (XA-TxNotSupported) : FAIL"); out.println("TEST:FAIL"); } - } catch(NamingException ne) { - ne.printStackTrace(); - } catch(CreateException e) { - e.printStackTrace(); + } catch(NamingException ne) { + ne.printStackTrace(); + } catch(CreateException e) { + e.printStackTrace(); } finally { - out.println("END_OF_TEST"); - out.flush(); - } + out.println("END_OF_TEST"); + out.flush(); + } } private boolean connectionSharingTest(SimpleBMP simpleBMP, boolean useXA, int value) {//throws RemoteException {
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/sql/create_pointbase.sql index 51b0735..396c566 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table max_connection_usage; - -CREATE TABLE max_connection_usage ( - id integer not null, - value char(16) -); - +Drop table max_connection_usage; + +CREATE TABLE max_connection_usage ( + id integer not null, + value char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/sql/drop_pointbase.sql index 4e577a3..b3c8b97 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/maxconnectionusage/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table max_connection_usage; +Drop table max_connection_usage;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/build.properties index 03e0094..132c2c3 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/build.properties
@@ -15,21 +15,21 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-multipleusercredentials"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> <property name="web.xml" value="descriptor/web.xml"/> <property name="sun-web.xml" value="descriptor/sun-web.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="contextroot" value="/jdbc-multipleusercredentials/servlet"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/build.xml index 344dd98..cceb421 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/build.xml
@@ -19,13 +19,13 @@ --> <!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml"> - <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> + <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> <!ENTITY testproperties SYSTEM "./build.properties"> - <!ENTITY run SYSTEM "./../../../../config/run.xml"> - <!ENTITY jdbcCommon SYSTEM "./../../JdbcCommon.xml"> - <!ENTITY jdbcCommonProps SYSTEM "./../../JdbcCommon.properties"> - <!ENTITY eeSetup SYSTEM "./../../config/ee-common.xml"> - <!ENTITY eeProperties SYSTEM "./../../config/ee-properties.xml"> + <!ENTITY run SYSTEM "./../../../../config/run.xml"> + <!ENTITY jdbcCommon SYSTEM "./../../JdbcCommon.xml"> + <!ENTITY jdbcCommonProps SYSTEM "./../../JdbcCommon.properties"> + <!ENTITY eeSetup SYSTEM "./../../config/ee-common.xml"> + <!ENTITY eeProperties SYSTEM "./../../config/ee-properties.xml"> ]> <project name="mix" default="usage" basedir="."> @@ -57,12 +57,12 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> <param name="ejbjar.classes" - value="**/ejb/*.class"/> + value="**/ejb/*.class"/> <param name="appclientjar.classes" - value="**/client/*.class"/> - <param name="war.classes" - value="**/servlet/*.class"/> - <param name="hasWebclient" value="true"/> + value="**/client/*.class"/> + <param name="war.classes" + value="**/servlet/*.class"/> + <param name="hasWebclient" value="true"/> </antcall> <javac srcdir="." @@ -121,7 +121,7 @@ <antcall target="undeploy-common"/> <antcall target="undeploy-jdbc-common"/> - <delete file="client/WebTest.class"/> + <delete file="client/WebTest.class"/> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/descriptor/application.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/descriptor/application.xml index 84e9203..ab327cb 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/descriptor/application.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/descriptor/application.xml
@@ -28,9 +28,9 @@ <ejb>jdbc-multipleusercredentials-ejb.jar</ejb> </module> <module> - <web> - <web-uri>jdbc-multipleusercredentials-web.war</web-uri> - <context-root>jdbc-multipleusercredentials</context-root> + <web> + <web-uri>jdbc-multipleusercredentials-web.war</web-uri> + <context-root>jdbc-multipleusercredentials</context-root> </web> </module> </application>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/servlet/SimpleServlet.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/servlet/SimpleServlet.java index 64120ba..998379c 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/servlet/SimpleServlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/servlet/SimpleServlet.java
@@ -69,20 +69,20 @@ } } if(passed){ - System.out.println("Multiple User credentials test : test1 : PASS"); + System.out.println("Multiple User credentials test : test1 : PASS"); out.println("TEST:PASS"); - } else { - System.out.println("Multiple User credentials test : test1 : FAIL"); + } else { + System.out.println("Multiple User credentials test : test1 : FAIL"); out.println("TEST:FAIL"); - } + } - } catch(NamingException ne) { - ne.printStackTrace(); - } catch(CreateException e) { - e.printStackTrace(); + } catch(NamingException ne) { + ne.printStackTrace(); + } catch(CreateException e) { + e.printStackTrace(); } finally { - out.println("END_OF_TEST"); - out.flush(); - } + out.println("END_OF_TEST"); + out.flush(); + } } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/sql/create_pointbase.sql index 87073ca..a71dd8a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/multipleusercredentials/sql/create_pointbase.sql
@@ -1,8 +1,8 @@ -CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY( - 'derby.user.derby', - 'derby') ; - -CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY( - 'derby.user.javadb', - 'javadb') ; - +CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY( + 'derby.user.derby', + 'derby') ; + +CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY( + 'derby.user.javadb', + 'javadb') ; +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/osgi-jdbc-test/src/main/java/org/glassfish/osgijdbc_test/JDBCActivator.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/osgi-jdbc-test/src/main/java/org/glassfish/osgijdbc_test/JDBCActivator.java index 043fbcb..245940a 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/osgi-jdbc-test/src/main/java/org/glassfish/osgijdbc_test/JDBCActivator.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/osgi-jdbc-test/src/main/java/org/glassfish/osgijdbc_test/JDBCActivator.java
@@ -41,7 +41,7 @@ private void test(){ testJdbcResources(null); - + testJdbcResources("(osgi.jdbc.driver.class=oracle.jdbc.pool.OracleDataSource)"); testJdbcResources("(osgi.jdbc.driver.class=org.apache.derby.jdbc.EmbeddedXADataSource)"); testJdbcResources("(osgi.jdbc.driver.class=org.apache.derby.jdbc.ClientDataSource)"); @@ -59,7 +59,7 @@ testJdbcResources("(&(jndi-name=jdbc/oracle_type4_resource)(osgi.jdbc.driver.class=org.apache.derby.jdbc.ClientDataSource))"); - + } private void testJdbcResources(String filter) {
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/build.properties index 120da35..f9b209f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/build.properties
@@ -15,21 +15,21 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="resEnableDisable"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> <property name="web.xml" value="descriptor/web.xml"/> <property name="sun-web.xml" value="descriptor/sun-web.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="poolname" value="jdbc-resEnableDisable"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/build.xml index a1fd96c..4f06551 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/build.xml
@@ -51,12 +51,12 @@ <target name="build" depends="compile"> <antcall target="build-ear-common"> <param name="ejbjar.classes" - value="**/ejb/*.class"/> + value="**/ejb/*.class"/> <param name="appclientjar.classes" - value="**/client/*.class"/> - <param name="war.classes" - value="**/servlet/*.class"/> - <param name="hasWebclient" value="true"/> + value="**/client/*.class"/> + <param name="war.classes" + value="**/servlet/*.class"/> + <param name="hasWebclient" value="true"/> </antcall> <javac srcdir="." @@ -85,8 +85,8 @@ <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> <antcall target="delete-jdbc-stuff"/> - <antcall target="undeploy-common"/> - <delete file="client/WebTest.class"/> + <antcall target="undeploy-common"/> + <delete file="client/WebTest.class"/> </target> <target name="usage"> @@ -124,8 +124,8 @@ <java classname="client.WebTest"> <arg value="${http.host}"/> <arg value="${http.port}"/> - <arg value="${contextroot}"/> - <arg value="${TEST.FAIL}"/> + <arg value="${contextroot}"/> + <arg value="${TEST.FAIL}"/> <classpath> <pathelement location="${env.APS_HOME}/lib/reporter.jar"/> <pathelement location="."/> @@ -139,8 +139,8 @@ <java classname="client.WebTest"> <arg value="${http.host}"/> <arg value="${http.port}"/> - <arg value="${contextroot}"/> - <arg value="${TEST.PASS}"/> + <arg value="${contextroot}"/> + <arg value="${TEST.PASS}"/> <classpath> <pathelement location="${env.APS_HOME}/lib/reporter.jar"/> <pathelement location="."/> @@ -149,13 +149,13 @@ <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" - value="servers.server.server.resource-ref.${resourcename}.enabled=false"/> + value="servers.server.server.resource-ref.${resourcename}.enabled=false"/> </antcall> <java classname="client.WebTest"> <arg value="${http.host}"/> <arg value="${http.port}"/> - <arg value="${contextroot}"/> - <arg value="${TEST.FAIL}"/> + <arg value="${contextroot}"/> + <arg value="${TEST.FAIL}"/> <classpath> <pathelement location="${env.APS_HOME}/lib/reporter.jar"/> <pathelement location="."/> @@ -164,13 +164,13 @@ <antcall target="asadmin-common"> <param name="admin.command" value="set"/> <param name="operand.props" - value="servers.server.server.resource-ref.${resourcename}.enabled=true"/> + value="servers.server.server.resource-ref.${resourcename}.enabled=true"/> </antcall> <java classname="client.WebTest"> <arg value="${http.host}"/> <arg value="${http.port}"/> - <arg value="${contextroot}"/> - <arg value="${TEST.PASS}"/> + <arg value="${contextroot}"/> + <arg value="${TEST.PASS}"/> <classpath> <pathelement location="${env.APS_HOME}/lib/reporter.jar"/> <pathelement location="."/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/client/WebTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/client/WebTest.java index fdfdf3f..62fec5f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/client/WebTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/client/WebTest.java
@@ -43,8 +43,8 @@ } private static void goGet(String host, int port, - String result, String contextPath, - String testStatus) { + String result, String contextPath, + String testStatus) { try { long time = System.currentTimeMillis(); @@ -75,12 +75,12 @@ if (status.equalsIgnoreCase("PASS")) { stat.addStatus(TEST_NAME, stat.PASS); } else { - if("FAIL".equalsIgnoreCase(testStatus)) { - //Test is supposed to fail hence passed - stat.addStatus(TEST_NAME, stat.PASS); - } else { + if("FAIL".equalsIgnoreCase(testStatus)) { + //Test is supposed to fail hence passed + stat.addStatus(TEST_NAME, stat.PASS); + } else { stat.addStatus(TEST_NAME, stat.FAIL); - } + } } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/descriptor/ejb-jar.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/descriptor/ejb-jar.xml index 27bbbbf..78de1a3 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/descriptor/ejb-jar.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/descriptor/ejb-jar.xml
@@ -31,16 +31,16 @@ <ejb-name>SimpleBMPEJB</ejb-name> <local-home>com.sun.s1asdev.jdbc.resenabledisable.ejb.SimpleBMPHome</local-home> <local>com.sun.s1asdev.jdbc.resenabledisable.ejb.SimpleBMP</local> - <ejb-class>com.sun.s1asdev.jdbc.resenabledisable.ejb.SimpleBMPBean</ejb-class> - <session-type>Stateless</session-type> - <transaction-type>Container</transaction-type> - <!--<persistence-type>Bean</persistence-type> + <ejb-class>com.sun.s1asdev.jdbc.resenabledisable.ejb.SimpleBMPBean</ejb-class> + <session-type>Stateless</session-type> + <transaction-type>Container</transaction-type> + <!--<persistence-type>Bean</persistence-type> <prim-key-class>java.lang.Integer</prim-key-class> <reentrant>False</reentrant> <security-identity> <description></description> <use-caller-identity></use-caller-identity> - </security-identity>--> + </security-identity>--> <resource-ref> <res-ref-name>DataSource</res-ref-name> <res-type>javax.sql.DataSource</res-type>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/ejb/SimpleBMPBean.java index 90a86a1..0b831cb 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/ejb/SimpleBMPBean.java
@@ -28,7 +28,7 @@ private transient jakarta.ejb.SessionContext m_ctx = null; public void setSessionContext(SessionContext context) { - m_ctx = context; + m_ctx = context; } public Integer ejbCreate() throws CreateException { @@ -36,7 +36,7 @@ } - + /* Get a single connection and close it */ public boolean test1() { Connection conn = null; @@ -57,14 +57,14 @@ //e.printStackTrace(); passed = false; } finally { - if(conn != null) { + if(conn != null) { try { - conn.close(); - } catch(Exception ex) { - System.out.println("Exception in closing connection"); - } + conn.close(); + } catch(Exception ex) { + System.out.println("Exception in closing connection"); + } } - } + } return passed; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/servlet/SimpleServlet.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/servlet/SimpleServlet.java index f67de5b..738221e 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/servlet/SimpleServlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/servlet/SimpleServlet.java
@@ -56,20 +56,20 @@ //stat.addDescription("Running serializable connector test "); SimpleBMP bean = simpleBMPHome.create(); - for(int i=0; i<3; i++){ + for(int i=0; i<3; i++){ if(!bean.test1()){ out.println("TEST:FAIL"); - break; - } - } - out.println("TEST:PASS"); - } catch(NamingException ne) { - ne.printStackTrace(); - } catch(CreateException e) { - e.printStackTrace(); + break; + } + } + out.println("TEST:PASS"); + } catch(NamingException ne) { + ne.printStackTrace(); + } catch(CreateException e) { + e.printStackTrace(); } finally { - out.println("END_OF_TEST"); - out.flush(); - } + out.println("END_OF_TEST"); + out.flush(); + } } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/sql/drop_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/resEnableDisable/sql/drop_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/setup-jdbc-dev-tests.sh b/appserver/tests/appserv-tests/devtests/jdbc/v3/setup-jdbc-dev-tests.sh index 5726241..ba9d520 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/setup-jdbc-dev-tests.sh +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/setup-jdbc-dev-tests.sh
@@ -92,7 +92,7 @@ #Create Pool/Resource for lazy-connection-associationtest echo Creating Pool/Resource Lazy connection association test -./bin/asadmin create-jdbc-connection-pool --maxwait=10 --datasourceclassname=org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource --restype=javax.sql.ConnectionPoolDataSource --lazyconnectionenlistment=true --lazyconnectionassociation=true --property="password=APP:user=APP:databaseName=sun-appserv-samples:connectionAttributes=\;create\\=true" jdbc-lazy-assoc-test-pool +./bin/asadmin create-jdbc-connection-pool --maxwait=10 --datasourceclassname=org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource --restype=javax.sql.ConnectionPoolDataSource --lazyconnectionenlistment=true --lazyconnectionassociation=true --property="password=APP:user=APP:databaseName=sun-appserv-samples:connectionAttributes=\;create\\=true" jdbc-lazy-assoc-test-pool ./bin/asadmin create-jdbc-resource --connectionpoolid=jdbc-lazy-assoc-test-pool jdbc/jdbc-lazy-assoc-test-resource echo "\n" @@ -150,7 +150,7 @@ ./bin/asadmin start-domain echo "\n" -sleep 5 +sleep 5 wget http://localhost:8080/v3_jdbc_dev_tests/TestResultServlet -O $testResult1 wget http://localhost:8080/v3_jdbc_dev_tests/TestResultServlet?testName=lazy-assoc -O $testResult2
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/setup-jdbc-reconfig-dev-tests.sh b/appserver/tests/appserv-tests/devtests/jdbc/v3/setup-jdbc-reconfig-dev-tests.sh index 89f474f..3d2cd47 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/setup-jdbc-reconfig-dev-tests.sh +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/setup-jdbc-reconfig-dev-tests.sh
@@ -33,7 +33,7 @@ cd $v3home echo "Starting domain..." ./bin/asadmin start-domain -sleep 10 +sleep 10 echo "\n" echo "*******************************************************************************************************************\n" @@ -52,7 +52,7 @@ echo create resource jdbc/jdbc-reconfig-test-resource-1 ./bin/asadmin create-jdbc-resource --connectionpoolid=jdbc-reconfig-test-pool-1 jdbc/jdbc-reconfig-test-resource-1 -echo create pool jdbc-reconfig-test-pool-2 +echo create pool jdbc-reconfig-test-pool-2 ./bin/asadmin create-jdbc-connection-pool --datasourceclassname=org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource --restype=javax.sql.ConnectionPoolDataSource --property="Password=rpassword:User=ruser:DatabaseName=$databaseshome/reconfig-db:serverName=localhost" jdbc-reconfig-test-pool-2 echo create resource jdbc/jdbc-reconfig-test-resource-2 @@ -81,7 +81,7 @@ ./bin/asadmin set resources.jdbc-connection-pool.jdbc-dev-test-pool.max-wait-time-in-millis=1000 echo "\nGET http://localhost:8080/v3_jdbc_dev_tests/ReconfigTestServlet?maxPoolSize=40\&throwException=true\&testId=1 \n" -GET http://localhost:8080/v3_jdbc_dev_tests/ReconfigTestServlet?maxPoolSize=40\&throwException=true\&testId=1 > $reconfigResult +GET http://localhost:8080/v3_jdbc_dev_tests/ReconfigTestServlet?maxPoolSize=40\&throwException=true\&testId=1 > $reconfigResult echo "\n" #asadmin set max-pool-size to 10 before running test for the second time
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/build.properties index 34eb966..4a6a27a 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/build.properties
@@ -15,17 +15,17 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="ejb-bmp-statementtimeout"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> <property name="web.xml" value="descriptor/web.xml"/> <property name="sun-web.xml" value="descriptor/sun-web.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="appclient.application.args" value="12"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/build.xml index fcc58e8..e9cdf6c 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/build.xml
@@ -19,11 +19,11 @@ --> <!ENTITY commonSetup SYSTEM "./../../../../config/properties.xml"> - <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> + <!ENTITY commonBuild SYSTEM "./../../../../config/common.xml"> <!ENTITY testproperties SYSTEM "./build.properties"> - <!ENTITY run SYSTEM "./../../../../config/run.xml"> - <!ENTITY eeSetup SYSTEM "./../../config/ee-common.xml"> - <!ENTITY eeProperties SYSTEM "./../../config/ee-properties.xml"> + <!ENTITY run SYSTEM "./../../../../config/run.xml"> + <!ENTITY eeSetup SYSTEM "./../../config/ee-common.xml"> + <!ENTITY eeProperties SYSTEM "./../../config/ee-properties.xml"> ]> <project name="mix" default="usage" basedir="."> @@ -56,28 +56,28 @@ </target> <target name="build" depends="compile"> - <property name="hasWebclient" value="true"/> + <property name="hasWebclient" value="true"/> <antcall target="webclient-war-common"> <param name="hasWebclient" value="yes"/> <param name="webclient.war.classes" value="**/*.class"/> </antcall> <antcall target="ejb-jar-common"> - <param name="ejbjar.classes" value="**/*.class"/> - </antcall> + <param name="ejbjar.classes" value="**/*.class"/> + </antcall> - <delete file="${assemble.dir}/${appname}.ear"/> + <delete file="${assemble.dir}/${appname}.ear"/> <mkdir dir="${assemble.dir}"/> <mkdir dir="${build.classes.dir}/META-INF"/> - <ear earfile="${assemble.dir}/${appname}App.ear" - appxml="${application.xml}"> - <fileset dir="${assemble.dir}"> - <include name="*.jar"/> - <include name="*.war"/> - </fileset> - </ear> + <ear earfile="${assemble.dir}/${appname}App.ear" + appxml="${application.xml}"> + <fileset dir="${assemble.dir}"> + <include name="*.jar"/> + <include name="*.war"/> + </fileset> + </ear> </target> <target name="deploy" depends="init-common"> @@ -92,7 +92,7 @@ value="${resources.dottedname.prefix}.jdbc-connection-pool.ql-jdbc-pool.statement_timeout_in_seconds=30"/> </antcall> - <!--<antcall target="create-persistence-resource-common"/>--> + <!--<antcall target="create-persistence-resource-common"/>--> <antcall target="deploy-common"/> </target> @@ -105,8 +105,8 @@ <target name="run-test-1" depends="init-common"> <antcall target="runwebclient-common"> - <param name="testsuite.id" value="web-to-ejb (ear based)"/> - </antcall> + <param name="testsuite.id" value="web-to-ejb (ear based)"/> + </antcall> </target> <target name="undeploy" depends="init-common"> @@ -114,7 +114,7 @@ <param name="sql.file" value="sql/drop_pointbase.sql"/> </antcall> - <!--<antcall target="delete-persistence-resource-common"/>--> + <!--<antcall target="delete-persistence-resource-common"/>--> <antcall target="undeploy-jdbc-common"/> <antcall target="undeploy-common"/> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/servlet/SimpleServlet.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/servlet/SimpleServlet.java index 69f1171..d807e47 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/servlet/SimpleServlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/servlet/SimpleServlet.java
@@ -56,36 +56,36 @@ SimpleBMP simpleBMP = simpleBMPHome.create(); if (simpleBMP.statementTest()) { - System.out.println("Statement Timeout test : statementTest : PASS"); - out.println("TEST:PASS"); + System.out.println("Statement Timeout test : statementTest : PASS"); + out.println("TEST:PASS"); } else { - System.out.println("Statement Timeout test : statementTest : FAIL"); + System.out.println("Statement Timeout test : statementTest : FAIL"); out.println("TEST:FAIL"); } if (simpleBMP.preparedStatementTest()) { - System.out.println("Statement Timeout test : preparedStatementTest : PASS"); - out.println("TEST:PASS"); + System.out.println("Statement Timeout test : preparedStatementTest : PASS"); + out.println("TEST:PASS"); } else { - System.out.println("Statement Timeout test : preparedStatementTest : FAIL"); + System.out.println("Statement Timeout test : preparedStatementTest : FAIL"); out.println("TEST:FAIL"); } if (simpleBMP.callableStatementTest()) { - System.out.println("Statement Timeout test : callableStatementTest : PASS"); - out.println("TEST:PASS"); + System.out.println("Statement Timeout test : callableStatementTest : PASS"); + out.println("TEST:PASS"); } else { - System.out.println("Statement Timeout test : callableStatementTest : FAIL"); + System.out.println("Statement Timeout test : callableStatementTest : FAIL"); out.println("TEST:FAIL"); } - } catch(NamingException ne) { - ne.printStackTrace(); - } catch(CreateException e) { - e.printStackTrace(); + } catch(NamingException ne) { + ne.printStackTrace(); + } catch(CreateException e) { + e.printStackTrace(); } finally { - out.println("END_OF_TEST"); - out.flush(); - } + out.println("END_OF_TEST"); + out.flush(); + } } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/sql/create_pointbase.sql index dd4c5e5..11e61ee 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/statementtimeout/sql/create_pointbase.sql
@@ -1,10 +1,10 @@ - -Drop table customer_stmt_wrapper; - -CREATE TABLE customer_stmt_wrapper ( - c_id integer not null, - c_phone char(16) -); - -INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); + +Drop table customer_stmt_wrapper; + +CREATE TABLE customer_stmt_wrapper ( + c_id integer not null, + c_phone char(16) +); + +INSERT INTO customer_stmt_wrapper VALUES(1, 'wxyz'); INSERT INTO customer_stmt_wrapper VALUES(2, 'pqrs'); \ No newline at end of file
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/unsetup-jdbc-dev-tests.sh b/appserver/tests/appserv-tests/devtests/jdbc/v3/unsetup-jdbc-dev-tests.sh index 3659c26..4727b0f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/unsetup-jdbc-dev-tests.sh +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/unsetup-jdbc-dev-tests.sh
@@ -20,7 +20,7 @@ cd $v3home echo Starting the domain ... -./bin/asadmin start-domain +./bin/asadmin start-domain echo undeploying application ..... ./bin/asadmin undeploy v3_jdbc_dev_tests
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/build.xml index d61dd4a..3b43098 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/build.xml
@@ -25,27 +25,27 @@ <import file="nbproject/build-impl.xml"/> <!-- - There exist several targets which are by default empty and which can be - used for execution of your tasks. These targets are usually executed - before and after some main targets. They are: + There exist several targets which are by default empty and which can be + used for execution of your tasks. These targets are usually executed + before and after some main targets. They are: - -pre-init: called before initialization of project properties - -post-init: called after initialization of project properties - -pre-compile: called before javac compilation - -post-compile: called after javac compilation + -pre-init: called before initialization of project properties + -post-init: called after initialization of project properties + -pre-compile: called before javac compilation + -post-compile: called after javac compilation -pre-compile-single: called before javac compilation of single file -post-compile-single: called after javac compilation of single file -pre-compile-test: called before javac compilation of JUnit tests -post-compile-test: called after javac compilation of JUnit tests -pre-compile-test-single: called before javac compilation of single JUnit test -post-compile-test-single: called after javac compilation of single JUunit test - -pre-dist: called before archive building - -post-dist: called after archive building - -post-clean: called after cleaning build products + -pre-dist: called before archive building + -post-dist: called after archive building + -post-clean: called after cleaning build products -pre-run-deploy: called before deploying -post-run-deploy: called after deploying - Example of pluging an obfuscator after the compilation could look like + Example of pluging an obfuscator after the compilation could look like <target name="-post-compile"> <obfuscate> @@ -53,21 +53,21 @@ </obfuscate> </target> - For list of available properties check the imported - nbproject/build-impl.xml file. + For list of available properties check the imported + nbproject/build-impl.xml file. Other way how to customize the build is by overriding existing main targets. - The target of interest are: + The target of interest are: init-macrodef-javac: defines macro for javac compilation init-macrodef-junit: defines macro for junit execution init-macrodef-debug: defines macro for class debugging do-dist: archive building - run: execution of project - javadoc-build: javadoc generation + run: execution of project + javadoc-build: javadoc generation - Example of overriding the target for project execution could look like + Example of overriding the target for project execution could look like <target name="run" depends="<PROJNAME>-impl.jar"> <exec dir="bin" executable="launcher.exe"> @@ -75,10 +75,10 @@ </exec> </target> - Notice that overridden target depends on jar target and not only on - compile target as regular run target does. Again, for list of available - properties which you can use check the target you are overriding in - nbproject/build-impl.xml file. + Notice that overridden target depends on jar target and not only on + compile target as regular run target does. Again, for list of available + properties which you can use check the target you are overriding in + nbproject/build-impl.xml file. --> </project>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/nbproject/ant-deploy.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/nbproject/ant-deploy.xml index abc5d3c..70c8a74 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/nbproject/ant-deploy.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/nbproject/ant-deploy.xml
@@ -25,7 +25,7 @@ <tempfile prefix="sjsas" property="sjsas.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! --> <echo message="AS_ADMIN_PASSWORD=${sjsas.password}" file="${sjsas.password.file}"/> </target> - + <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present"> <tempfile prefix="sjsas" property="temp.sun.web" destdir="${java.io.tmpdir}"/> <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/> @@ -39,7 +39,7 @@ <replacevalue><![CDATA[--> <sun-web-app]]></replacevalue> </replace> <xmlproperty file="${temp.sun.web}" validate="false"> - </xmlproperty> + </xmlproperty> <delete file="${temp.sun.web}"/> <property name="deploy.ant.client.url" value="${sjsas.url}${sun-web-app.context-root}"/> </target>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/nbproject/build-impl.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/nbproject/build-impl.xml index ebc0de5..31e0e91 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/nbproject/build-impl.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/nbproject/build-impl.xml
@@ -686,7 +686,7 @@ </target> <target depends="init,javadoc-build,javadoc-browse" description="Build Javadoc." name="javadoc"/> <!-- - + JUNIT COMPILATION SECTION --> <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test"> @@ -728,7 +728,7 @@ </target> <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/> <!-- - + JUNIT EXECUTION SECTION --> <target depends="init" if="have.tests" name="-pre-test-run"> @@ -755,7 +755,7 @@ </target> <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/> <!-- - + JUNIT DEBUGGING SECTION --> <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test"> @@ -781,7 +781,7 @@ </target> <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/> <!-- - + CLEANUP SECTION --> <target depends="init" if="no.dist.ear.dir" name="deps-clean" unless="no.deps"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/TestResultServlet.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/TestResultServlet.java index 9e92406..9f87fe9 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/TestResultServlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/TestResultServlet.java
@@ -124,7 +124,7 @@ buf.append("<td>"); buf.append(entry.getValue()); buf.append("</td></tr>"); - } + } //Run Application Authentication Test Map<String, Boolean> mapAppAuth = @@ -172,7 +172,7 @@ buf.append("<td>"); buf.append(entry.getValue()); buf.append("</td></tr>"); - } + } //Run SimpleXADS test @@ -198,7 +198,7 @@ buf.append(entry.getValue()); buf.append("</td></tr>"); } - } + } //Order of test is important : lazy enlist has to be before connection leak tracing Map<String, Boolean> mapDoubleResourceReference = @@ -363,7 +363,7 @@ processRequest(request, response); } - /** + /** * Handles the HTTP <code>POST</code> method. * @param request servlet request * @param response servlet response @@ -373,7 +373,7 @@ processRequest(request, response); } - /** + /** * Returns a short description of the servlet. */ public String getServletInfo() {
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ApplicationAuthTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ApplicationAuthTest.java index 17b72ae..5d745bb 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ApplicationAuthTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ApplicationAuthTest.java
@@ -25,7 +25,7 @@ /** * Tests Application Authentication - * + * * @author shalini */ public class ApplicationAuthTest implements SimpleTest { @@ -68,7 +68,7 @@ } catch (Exception e) { resultsMap.put("app-auth-wrong-credentials", false); } - + try { if (testTwiceWithCredentials(ds, out)) { resultsMap.put("app-auth-twice-with-credentials", true); @@ -90,12 +90,12 @@ } HtmlUtil.printHR(out); - return resultsMap; + return resultsMap; } /** - * Tests application authentication by ensuring that connection with - * the same username is returned when got from 2 different credentials - + * Tests application authentication by ensuring that connection with + * the same username is returned when got from 2 different credentials - * first one being the right one. * @param ds * @param out @@ -122,7 +122,7 @@ HtmlUtil.printException(ex, out); return result; } - + try { out.println("<br> Getting the NonTx Connection for \"APP\" ..."); conn2 = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection( @@ -131,7 +131,7 @@ if (conn2.getMetaData().getUserName().equals("APP")) { out.println("<br> UserName matches the right credentials"); passed2 = true; - } + } } catch (Exception ex2) { HtmlUtil.printException(ex2, out); } @@ -150,11 +150,11 @@ } catch (Exception e1) { HtmlUtil.printException(e1, out); } - } + } } result = passed1 && passed2; out.println("<br> Test result : " + result); - return result; + return result; } /** @@ -234,7 +234,7 @@ } /** - * Tests application authentication when right username/password are + * Tests application authentication when right username/password are * specified. * @param ds * @param out
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/AssocWithThreadTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/AssocWithThreadTest.java index a30256e..e0f67bd 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/AssocWithThreadTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/AssocWithThreadTest.java
@@ -38,7 +38,7 @@ */ public class AssocWithThreadTest implements SimpleTest{ - + Map<String, Boolean> resultsMap = new HashMap<String, Boolean>(); public Map<String, Boolean> runTest(DataSource ds1, PrintWriter out) { @@ -53,10 +53,10 @@ } return resultsMap; } - + private boolean testAssocWithThread(DataSource ds1, PrintWriter out) throws SystemException { - + HtmlUtil.printHR(out); out.println("<h4> Assoc-with-thread test </h4>"); @@ -74,10 +74,10 @@ }else{ return false; } - + } - + private String test1(DataSource ds1, PrintWriter out) throws SystemException { String result = null; Connection con = null;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ConnectionLeakTracingTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ConnectionLeakTracingTest.java index 3f6f294..079a8da 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ConnectionLeakTracingTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ConnectionLeakTracingTest.java
@@ -28,23 +28,23 @@ /** * Tests Connection Leak tracing/ Leak reclaim. - * - * Assumes that steady-pool-size=1, max-pool-size=1, + * + * Assumes that steady-pool-size=1, max-pool-size=1, * connection-leak-timeout-in-seconds = 10, connection-leak-reclaim = true * attributes are set in the pool configuration. * @author shalini */ public class ConnectionLeakTracingTest implements SimpleTest { - Map<String, Boolean> resultsMap = new HashMap<String, Boolean>(); - + Map<String, Boolean> resultsMap = new HashMap<String, Boolean>(); + public Map<String, Boolean> runTest(DataSource ds, PrintWriter out) { //create CUSTOMER table needed for this test String tableName = "CUSTOMER"; createTables(ds, out, tableName); - + out.println("<h4> Connection Leak Tracing Test </h4>"); - + for(int i=0; i<3; i++) { try { out.println("<br> Trial " + i); @@ -63,15 +63,15 @@ } out.println("<br> Test result : true"); resultsMap.put("conn-leak-tracing-test1", true); - + //Delete the CUSTOMER table created. TablesUtil.deleteTables(ds, out, tableName); - + HtmlUtil.printHR(out); return resultsMap; } - private boolean connLeakTracingTest1(DataSource ds, PrintWriter out, + private boolean connLeakTracingTest1(DataSource ds, PrintWriter out, String tableName) { Connection conn = null; boolean passed = true; @@ -116,7 +116,7 @@ } catch (Exception e) { HtmlUtil.printException(e, out); } - } + } } private void emptyTable(Connection conn, String tableName) throws SQLException { @@ -129,7 +129,7 @@ Statement stmt = conn.createStatement(); stmt.executeUpdate("INSERT into " + tableName + " values (1, 'abcd')"); - stmt.close(); + stmt.close(); } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ConnectionSharingTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ConnectionSharingTest.java index caf3f9d..c3d5427 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ConnectionSharingTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ConnectionSharingTest.java
@@ -33,7 +33,7 @@ */ public class ConnectionSharingTest implements SimpleTest{ - + Map<String, Boolean> resultsMap = new HashMap<String, Boolean>(); public Map<String, Boolean> runTest(DataSource ds1, PrintWriter out) { @@ -51,7 +51,7 @@ return resultsMap; } - + private boolean testConnectionSharing(DataSource ds1, PrintWriter out) throws SystemException { boolean result = false; Connection con = null; @@ -109,7 +109,7 @@ } catch (Exception e) { HtmlUtil.printException(e, out); } - + out.println("<br> Test result : " + result); return result; }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ContainerAuthTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ContainerAuthTest.java index 41f00e0..e92d08d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ContainerAuthTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/ContainerAuthTest.java
@@ -30,7 +30,7 @@ public class ContainerAuthTest implements SimpleTest { Map<String, Boolean> resultsMap = new HashMap<String, Boolean>(); - + public Map<String, Boolean> runTest(DataSource ds, PrintWriter out) { try { if (testContAuthUserPass(ds, out)) { @@ -52,7 +52,7 @@ } HtmlUtil.printHR(out); - return resultsMap; + return resultsMap; } /**
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/LazyConnectionAssociationTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/LazyConnectionAssociationTest.java index 29f7847..14ccc18 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/LazyConnectionAssociationTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/LazyConnectionAssociationTest.java
@@ -54,9 +54,9 @@ * @param i * @param ds */ - private void acquireConnections(int count, DataSource ds, PrintWriter out) + private void acquireConnections(int count, DataSource ds, PrintWriter out) throws Exception{ - + for(int i=0; i<count ; i++){ ds.getConnection(); }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/LeakTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/LeakTest.java index cd461fb..8e2ac2f 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/LeakTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/LeakTest.java
@@ -29,7 +29,7 @@ */ public class LeakTest implements SimpleTest{ - + Map<String, Boolean> resultsMap = new HashMap<String, Boolean>(); public Map<String, Boolean> runTest(DataSource ds1, PrintWriter out) {
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MarkConnectionAsBadTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MarkConnectionAsBadTest.java index a1a6a6c..5df51e0 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MarkConnectionAsBadTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MarkConnectionAsBadTest.java
@@ -73,7 +73,7 @@ try { conn[i] = ds.getConnection(); physicalConnections.add(ds1.getConnection(conn[i])); - + } catch (Exception e) { HtmlUtil.printException(e, out); result = false; @@ -136,7 +136,7 @@ try { conn[i] = ds.getConnection(); physicalConnections.add(ds1.getConnection(conn[i])); - + } catch (Exception e) { HtmlUtil.printException(e, out); result = false;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MaxConnectionUsageTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MaxConnectionUsageTest.java index 22bd2d7..7392acf 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MaxConnectionUsageTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MaxConnectionUsageTest.java
@@ -27,19 +27,19 @@ import org.glassfish.jdbc.devtests.v3.util.TablesUtil; /** - * Devtest to test if application server removes a connection from pool + * Devtest to test if application server removes a connection from pool * after using it for "maxconnectionusage" times. - * - * Assumes that steady-pool-size = 1, max-pool-size = 1, + * + * Assumes that steady-pool-size = 1, max-pool-size = 1, * max-connection-usage-count = 10 attributes are set on the pool. - * + * * @author shalini */ public class MaxConnectionUsageTest implements SimpleTest { Map<String, Boolean> resultsMap = new HashMap<String, Boolean>(); - + /** - * Tests max-connection-usage assuming pool size = 1 and + * Tests max-connection-usage assuming pool size = 1 and * DataSource is of type : javax.sql.DataSource * @param ds * @param out @@ -67,27 +67,27 @@ } catch (Exception e) { resultsMap.put("max-conn-usage-connection-sharing-test", false); } - + TablesUtil.deleteTables(ds, out, tableName); HtmlUtil.printHR(out); - return resultsMap; + return resultsMap; } /** * Assuming pool has only one connection, calling maxConnUsageTest2(...) and * maxConnUsageTest3(...) 5 times each will ensure that "maxconnectionsusage=10" - * is met. + * is met. * Further call to maxConnUsageTest2(...) will return a different connection - * + * * If they are different, connection was dropped and created and test passes. - * + * * @param ds * @param out * @param value * @param tableName * @return boolean status */ - private boolean connectionSharingTest(DataSource ds, PrintWriter out, + private boolean connectionSharingTest(DataSource ds, PrintWriter out, int value, String tableName) { String[] results = new String[10]; out.println("<h4> Max Connection Usage - Connection Sharing Test </h4>"); @@ -96,7 +96,7 @@ if(i % 2 == 0) { results[i] = maxConnUsageTest2(ds, out, value, tableName); } else { - results[i] = maxConnUsageTest3(ds, out, (i/2)+1, value, + results[i] = maxConnUsageTest3(ds, out, (i/2)+1, value, tableName); } } @@ -110,10 +110,10 @@ break; } } - + out.println("<br> Further call to maxConnUsageTest2"); String tmpResult2 = maxConnUsageTest2(ds, out, value, tableName); - + if(!tmpResult2.equalsIgnoreCase(tmpResult1) && status) { status = true; } else { @@ -129,7 +129,7 @@ /** * Creates table needed for the Max Connection Usage devtest. - * + * * @param ds * @param out * @param tableName @@ -167,7 +167,7 @@ /** * Tests if the first and last physical connections are different. * Assuming maxconnectionusage property is 10 and connectionSharing ON, the - * physical connections con-1 and con-11 must be different. + * physical connections con-1 and con-11 must be different. * @param ds * @param out * @return boolean result @@ -218,7 +218,7 @@ * @param tableName * @return physicalConnectionString */ - private String maxConnUsageTest2(DataSource ds, PrintWriter out, int value, + private String maxConnUsageTest2(DataSource ds, PrintWriter out, int value, String tableName) { Connection physicalConnection = null; Connection conn = null; @@ -228,7 +228,7 @@ try { conn = ds1.getConnection(); stmt = conn.createStatement(); - stmt.executeUpdate("insert into " + tableName + " values (" + + stmt.executeUpdate("insert into " + tableName + " values (" + value + ",'" + value + "')"); physicalConnection = ds1.getConnection(conn); physicalConnectionString = physicalConnection.toString(); @@ -243,7 +243,7 @@ } catch (Exception e) { HtmlUtil.printException(e, out); } - + try { if(conn != null) { conn.close(); @@ -256,7 +256,7 @@ } /** - * Returns the physical connection's ID after testing if the entries inserted + * Returns the physical connection's ID after testing if the entries inserted * using maxConnUsageTest2(....) method are persisted. * @param ds * @param out @@ -265,7 +265,7 @@ * @param tableName * @return physicalConnectionString */ - private String maxConnUsageTest3(DataSource ds, PrintWriter out, int count, + private String maxConnUsageTest3(DataSource ds, PrintWriter out, int count, int value, String tableName) { Connection physicalConnection = null; Connection conn = null; @@ -281,7 +281,7 @@ if(count == resultCount) { physicalConnection = ds1.getConnection(conn); } else { - out.println("Expected count [" + count + + out.println("Expected count [" + count + "] does not match [" + resultCount + "]"); break; } @@ -297,15 +297,15 @@ } catch(Exception ex) { HtmlUtil.printException(ex, out); } - + try { if(stmt != null) { stmt.close(); - } + } } catch (Exception ex) { HtmlUtil.printException(ex, out); } - + try { if(conn != null) { conn.close(); @@ -316,5 +316,5 @@ } return physicalConnection.toString(); } - + }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MultipleConnectionCloseTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MultipleConnectionCloseTest.java index 6c4bd74..7976ac6 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MultipleConnectionCloseTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MultipleConnectionCloseTest.java
@@ -63,7 +63,7 @@ Connection conn1 = null; boolean passed = true; //clean the database - out.println("<h4> Multiple close connection - Test1 </h4>"); + out.println("<h4> Multiple close connection - Test1 </h4>"); try { conn1 = ds1.getConnection(); @@ -93,7 +93,7 @@ String columnName = "name"; TablesUtil.createTables(ds1, out, tableName, columnName); - out.println("<h4> Multiple close connection - Test2 </h4>"); + out.println("<h4> Multiple close connection - Test2 </h4>"); try { conn1 = ds1.getConnection(); stmt = conn1.createStatement();
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MultipleUserCredentialsTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MultipleUserCredentialsTest.java index f893119..74ea659 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MultipleUserCredentialsTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/MultipleUserCredentialsTest.java
@@ -26,7 +26,7 @@ /** * Tests if Connection pool tries to evict (expel) some free connections - * if a new connection cannot fit in the pool. Assumes max-pool-size = 32, + * if a new connection cannot fit in the pool. Assumes max-pool-size = 32, * steady-pool-size = 8, pool-resize-quantity = 2, match-connections = true. * @author shalini @@ -34,7 +34,7 @@ public class MultipleUserCredentialsTest implements SimpleTest { Map<String, Boolean> resultsMap = new HashMap<String, Boolean>(); - + public Map<String, Boolean> runTest(DataSource ds, PrintWriter out) { try { if (testMultipleUserCredentials(ds, out)) { @@ -46,12 +46,12 @@ resultsMap.put("jdbc-multiple-user-credentials", false); } - HtmlUtil.printHR(out); - return resultsMap; + HtmlUtil.printHR(out); + return resultsMap; } /** - * Tests if unmatched free connections are purged and new connections are + * Tests if unmatched free connections are purged and new connections are * provided even if the user credentials don't match. * @param ds * @param out @@ -62,7 +62,7 @@ Connection conns2[] = new Connection[16]; boolean passed = true; out.println("<h4> Multiple User Credentials Test</h4>"); - + //First user acquires 16 connections out.println("<br> Getting 16 connections as DBUSER..."); for(int i=0; i<conns1.length; i++) { @@ -84,7 +84,7 @@ passed = false; } } - + //All connections are returned to the pool out.println("<br> Closing all the connections acquired by DBUSER"); for(int i=0; i<conns1.length; i++) { @@ -106,7 +106,7 @@ } } - //Request from third and fourth user + //Request from third and fourth user out.println("<br> Getting subsequent connections for APP and DERBYUSER"); try { Connection conn3 = ds.getConnection("APP", "APP");
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/NoTxConnTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/NoTxConnTest.java index c606ab3..f018810 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/NoTxConnTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/NoTxConnTest.java
@@ -35,7 +35,7 @@ public class NoTxConnTest implements SimpleTest { Map<String, Boolean> resultsMap = new HashMap<String, Boolean>(); - + public Map<String, Boolean> runTest(DataSource ds, PrintWriter out) { /*try { if (testNoTxConnTest1(ds, out)) { @@ -58,7 +58,7 @@ } HtmlUtil.printHR(out); - return resultsMap; + return resultsMap; } private boolean testNoTxConnTest1(DataSource ds, PrintWriter out) { @@ -74,8 +74,8 @@ String content = "method1"; String columnName = "name"; TablesUtil.createTables(ds, out, tableName, columnName); - - out.println("<h4> NoTxConn Test1 </h4>"); + + out.println("<h4> NoTxConn Test1 </h4>"); UserTransaction tx = null; try { out.println("<br>"); @@ -95,7 +95,7 @@ noTxConn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection(); out.println("<br>Got noTx connection - noTxConn : " + noTxConn); stmt = conn.createStatement(); - stmt.executeUpdate("INSERT INTO " + tableName + " VALUES('" + + stmt.executeUpdate("INSERT INTO " + tableName + " VALUES('" + content + "')"); stmt2 = noTxConn.createStatement(); @@ -146,10 +146,10 @@ HtmlUtil.printException(e1, out); } } - + TablesUtil.deleteTables(ds, out, tableName); out.println("<br> Test result : " + result); - return result; + return result; } } @@ -162,7 +162,7 @@ jakarta.transaction.UserTransaction tx = null; try { out.println("<br>Starting test ..."); - + InitialContext ctx = new InitialContext(); tx =(UserTransaction)ctx.lookup("java:comp/UserTransaction"); @@ -183,7 +183,7 @@ noTxConn = ((com.sun.appserv.jdbc.DataSource)ds).getNonTxConnection(); out.println("<br>Autocommit of noTxConn => " + noTxConn.getAutoCommit()); if (noTxConn.getAutoCommit() == false ) { - result = false; + result = false; } noTxConn.close(); }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/StatementTimeoutTest.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/StatementTimeoutTest.java index e0bffc7..f8bccfa 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/StatementTimeoutTest.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/StatementTimeoutTest.java
@@ -30,22 +30,22 @@ /** * Tests if statement-timeout (query-timeout) is being set on all types of - * statements created in an application : Statement, PreparedStatement, + * statements created in an application : Statement, PreparedStatement, * CallableStatement. - * + * * Assumes that statement-timeout attribute is set on the pool to 30. - * + * * @author shalini */ public class StatementTimeoutTest implements SimpleTest { Map<String, Boolean> resultsMap = new HashMap<String, Boolean>(); public Map<String, Boolean> runTest(DataSource ds, PrintWriter out) { - + //Create required tables and insert entry into them String tableName = "CUSTOMER"; String columnName = "name"; - TablesUtil.createTables(ds, out, tableName, columnName); + TablesUtil.createTables(ds, out, tableName, columnName); TablesUtil.insertEntry(ds, out, tableName, "abcd"); TablesUtil.insertEntry(ds, out, tableName, "pqrs"); @@ -58,7 +58,7 @@ } catch (Exception e) { resultsMap.put("statement-test", false); } - + try { if (preparedStatementTest(ds, out, tableName)) { resultsMap.put("prepared-statement-test", true); @@ -85,14 +85,14 @@ } /** - * Tests if statement-timeout is being set on a CallableStatement created + * Tests if statement-timeout is being set on a CallableStatement created * in the application. * @param ds * @param out * @param tableName * @return boolean result */ - private boolean callableStatementTest(DataSource ds, PrintWriter out, + private boolean callableStatementTest(DataSource ds, PrintWriter out, String tableName) { boolean result = false; Connection conFromDS = null; @@ -103,7 +103,7 @@ conFromDS = ds.getConnection(); out.print("<br> Preparing a CallableStatement"); stmt = conFromDS.prepareCall("select * from " + tableName); - + out.println("<br> getQueryTimeout() on the statement"); if(stmt.getQueryTimeout() == 30) { out.println("<br> Timeout = 30"); @@ -128,7 +128,7 @@ } out.println("<br> Test result : " + result); return result; - } + } } /** @@ -139,19 +139,19 @@ * @param tableName * @return boolean result */ - private boolean preparedStatementTest(DataSource ds, PrintWriter out, + private boolean preparedStatementTest(DataSource ds, PrintWriter out, String tableName) { boolean result = false; Connection conFromDS = null; PreparedStatement stmt = null; out.println("<h4> Prepared Statement Test </h4>"); - + try { out.println("<br> Getting a connection..."); conFromDS = ds.getConnection(); out.println("<br>Creating a PreparedStatement query"); stmt = conFromDS.prepareStatement("select * from " + tableName); - + out.println("<br>getQueryTimeout() on the statement"); if(stmt.getQueryTimeout() == 30) { out.println("<br>Timeout = 30"); @@ -176,7 +176,7 @@ } out.println("<br> Test result : " + result); return result; - } + } } /** @@ -196,7 +196,7 @@ conFromDS = ds.getConnection(); out.print("<br>Creating a Statement"); stmt = conFromDS.createStatement(); - + out.println("<br> Getting the queryTimeout on the statement"); if(stmt.getQueryTimeout() == 30) { out.println("<br>Timeout = 30");
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/reconfig/ReconfigTestServlet.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/reconfig/ReconfigTestServlet.java index 1fc748a..ac7a33d 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/reconfig/ReconfigTestServlet.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/reconfig/ReconfigTestServlet.java
@@ -37,7 +37,7 @@ public class ReconfigTestServlet extends HttpServlet { @Resource(name = "jdbc/jdbc-dev-test-resource", mappedName = "jdbc/jdbc-dev-test-resource") DataSource ds; - + @Resource(name = "jdbc/jdbc-reconfig-test-resource-1", mappedName = "jdbc/jdbc-reconfig-test-resource-1") DataSource dsReconfig1; @@ -46,13 +46,13 @@ @Resource(name = "jdbc/res1", mappedName = "jdbc/res1") DataSource dsRes1; - + @Override protected void doGet(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException { processRequest(arg0, arg1); } - /** + /** * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods. * @param request servlet request * @param response servlet response @@ -92,7 +92,7 @@ mapReconfig = reconfigTest.resourceAttributeChangeTest(dsReconfig2, out, throwException); break; case 4: //Resource attribute change test with another datasource - + out.println("<h1>Reconfig Resource Attribute Test with DS : dsRes1</h1>"); mapReconfig = reconfigTest.resourceAttributeChangeTest(dsRes1, out, throwException); break; @@ -118,7 +118,7 @@ } } - /** + /** * Returns a short description of the servlet. */ public String getServletInfo() { @@ -126,7 +126,7 @@ "JDBC Resource"; } - /** + /** * Handles the HTTP <code>POST</code> method. * @param request servlet request * @param response servlet response
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/reconfig/ReconfigTestUtil.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/reconfig/ReconfigTestUtil.java index 333281f..c63767a 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/reconfig/ReconfigTestUtil.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/test/reconfig/ReconfigTestUtil.java
@@ -38,7 +38,7 @@ public class ReconfigTestUtil { Map<String, Boolean> resultsMap = new HashMap<String, Boolean>(); - Map<String, Boolean> poolPropertyChangeTest(DataSource ds, PrintWriter out, + Map<String, Boolean> poolPropertyChangeTest(DataSource ds, PrintWriter out, boolean throwException) { //Tests the property change of jdbc connection pool by asadmin set command. try { @@ -49,11 +49,11 @@ } } catch (Exception e) { resultsMap.put("pool-property-change-test", false); - } + } return resultsMap; } - Map<String, Boolean> resourceAttributeChangeTest(DataSource ds, PrintWriter out, + Map<String, Boolean> resourceAttributeChangeTest(DataSource ds, PrintWriter out, boolean throwException) { //Tests the attribute set of jdbc resource by asadmin set command. try { @@ -64,8 +64,8 @@ } } catch (Exception e) { resultsMap.put("resource-change-wrong-table-test", false); - } - + } + try { if(testJDBCResourceChangeCorrectTable(ds, out, !throwException)) { resultsMap.put("resource-change-correct-table-test", true); @@ -77,8 +77,8 @@ } return resultsMap; } - - Map<String, Boolean> poolAttributeChangeTest(DataSource ds, PrintWriter out, + + Map<String, Boolean> poolAttributeChangeTest(DataSource ds, PrintWriter out, int maxPoolSize, boolean throwException) { //Tests the attribute set by asadmin set command. try { @@ -93,7 +93,7 @@ return resultsMap; } - private boolean testJDBCResourceChange(DataSource ds, PrintWriter out, + private boolean testJDBCResourceChange(DataSource ds, PrintWriter out, boolean throwException) throws SystemException { HtmlUtil.printHR(out); out.println("<h4> Reconfig test : tablename : reconfigTestTable (reconfig-db)</h4>"); @@ -120,12 +120,12 @@ } finally { try { con.close(); } catch ( Exception e ) {} } - + HtmlUtil.printHR(out); return passed; } - private boolean testJDBCResourceChangeCorrectTable(DataSource ds, PrintWriter out, + private boolean testJDBCResourceChangeCorrectTable(DataSource ds, PrintWriter out, boolean throwException) throws SystemException { HtmlUtil.printHR(out); out.println("<h4> Reconfig test : tableName : sampleTable (sample-db) </h4>"); @@ -152,13 +152,13 @@ } finally { try { con.close(); } catch ( Exception e ) {} } - + HtmlUtil.printHR(out); - return passed; + return passed; } - - public boolean testMaxPoolSize(DataSource ds, PrintWriter out, - int maxPoolSize, boolean throwException) + + public boolean testMaxPoolSize(DataSource ds, PrintWriter out, + int maxPoolSize, boolean throwException) throws SystemException { HtmlUtil.printHR(out); out.println("\n<h4> Reconfig - Attribute max-pool-size test </h4>"); @@ -205,7 +205,7 @@ return passed; } - private boolean testPropertyChange(DataSource ds, PrintWriter out, + private boolean testPropertyChange(DataSource ds, PrintWriter out, boolean throwException) throws SystemException { HtmlUtil.printHR(out); out.println("\n<h4> Reconfig - Pool property change test </h4>"); @@ -225,9 +225,9 @@ passed = false; } } finally { - try { con.close(); } catch ( Exception e ) {} + try { con.close(); } catch ( Exception e ) {} } HtmlUtil.printHR(out); - return passed; + return passed; } }
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/util/HtmlUtil.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/util/HtmlUtil.java index 4a50e50..6b56f42 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/util/HtmlUtil.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/util/HtmlUtil.java
@@ -37,7 +37,7 @@ out.println(element.toString() + "<br>"); } } - + /** * Prints a horizontal ruler. * @param out
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/util/TablesUtil.java b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/util/TablesUtil.java index c8d9221..9efb916 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/util/TablesUtil.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/src/java/org/glassfish/jdbc/devtests/v3/util/TablesUtil.java
@@ -65,7 +65,7 @@ } } } - + /** * Deletes tables used by JDBC devtests. * @param ds1 @@ -114,7 +114,7 @@ try { con = ds.getConnection(); stmt = con.createStatement(); - stmt.executeUpdate("INSERT INTO " + tableName + " VALUES('" + + stmt.executeUpdate("INSERT INTO " + tableName + " VALUES('" + content + "')"); } catch (SQLException ex) { HtmlUtil.printException(ex, out); @@ -137,7 +137,7 @@ } /** - * Verifies table content by getting the number of rows in it, used by the + * Verifies table content by getting the number of rows in it, used by the * JDBC devtests. Returns a true if there are any rows in the table. * @param ds1 * @param out
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/web/WEB-INF/sun-web.xml b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/web/WEB-INF/sun-web.xml index 3f940d6..9d3b3ad 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/web/WEB-INF/sun-web.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/v3/v3_jdbc_dev_tests/web/WEB-INF/sun-web.xml
@@ -30,6 +30,6 @@ </resource-ref> <resource-ref> <res-ref-name>jdbc/jdbc-multiple-user-test-resource</res-ref-name> - <jndi-name>jdbc/jdbc-multiple-user-test-resource</jndi-name> + <jndi-name>jdbc/jdbc-multiple-user-test-resource</jndi-name> </resource-ref> </sun-web-app>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/build.properties b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/build.properties index 244097f..d774e38 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/build.properties +++ b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/build.properties
@@ -15,19 +15,19 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + <property name="module" value="jdbc-validateatmostonceperiod"/> -<property name="appname" value="${module}"/> +<property name="appname" value="${module}"/> \u0020 <property name="application.xml" value="descriptor/application.xml"/> <property name="sun-application.xml" value="descriptor/sun-application.xml"/> <property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/> <property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/> -<property name="application-client.xml" - value="descriptor/application-client.xml"/> -<property name="sun-application-client.xml" - value="descriptor/sun-application-client.xml"/> -<property name="appclientjar.files" value="${build.classes.dir}"/> +<property name="application-client.xml"\u0020 + value="descriptor/application-client.xml"/> +<property name="sun-application-client.xml"\u0020 + value="descriptor/sun-application-client.xml"/> +<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020 <property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> <property name="app.type" value="application"/> <property name="poolname" value="jdbc-validateatmostonceperiod"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/build.xml b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/build.xml index 7c7ee7a..d6f4af6 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/build.xml +++ b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/build.xml
@@ -98,8 +98,8 @@ <param name="appclient.application.args" value="1"/> </antcall> - <antcall target="stop-derby"/> - <antcall target="start-derby"/> + <antcall target="stop-derby"/> + <antcall target="start-derby"/> <antcall target="runclient-common"> <param name="appclient.application.args" value="2"/> @@ -111,8 +111,8 @@ value="${resources.dottedname.prefix}.jdbc-connection-pool.${poolname}.validate_atmost_once_period_in_seconds=60"/> </antcall> - <antcall target="stop-derby"/> - <antcall target="start-derby"/> + <antcall target="stop-derby"/> + <antcall target="start-derby"/> <antcall target="runclient-common"> <param name="appclient.application.args" value="3"/>
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/client/Client.java b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/client/Client.java index 0327133..82766a8 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/client/Client.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/client/Client.java
@@ -36,7 +36,7 @@ javax.rmi.PortableRemoteObject.narrow(objRef, SimpleBMPHome.class); SimpleBMP convalBMP = convalBMPHome.create(); - stat.addDescription("JDBC Validate Atmost Once Period Tests"); + stat.addDescription("JDBC Validate Atmost Once Period Tests"); if (args != null && args.length > 0) { String param = args[0];
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/ejb/SimpleBMPBean.java b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/ejb/SimpleBMPBean.java index 61bea23..e0df733 100644 --- a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/ejb/SimpleBMPBean.java +++ b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/ejb/SimpleBMPBean.java
@@ -41,7 +41,7 @@ } - + /* Get a single connection and close it */ public boolean test1() { Connection conn = null;
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/sql/create_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/sql/create_pointbase.sql index e4914f6..f256076 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/sql/create_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/sql/create_pointbase.sql
@@ -1,7 +1,7 @@ -Drop table O_Customer; - -CREATE TABLE O_Customer ( - c_id integer not null, - c_phone char(16) -); - +Drop table O_Customer; + +CREATE TABLE O_Customer ( + c_id integer not null, + c_phone char(16) +); +
diff --git a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/sql/drop_pointbase.sql b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/sql/drop_pointbase.sql index 70d1fcc..d854b95 100755 --- a/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/sql/drop_pointbase.sql +++ b/appserver/tests/appserv-tests/devtests/jdbc/validateatmostonceperiod/sql/drop_pointbase.sql
@@ -1 +1 @@ -Drop table O_Customer; +Drop table O_Customer;