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/v2-tests/appserv-tests/build.xml b/appserver/tests/v2-tests/appserv-tests/build.xml
index 2378ddc..c116719 100644
--- a/appserver/tests/v2-tests/appserv-tests/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/build.xml
@@ -35,7 +35,7 @@
&run;
&mail;
- <target name="all">
+ <target name="all">
<antcall target="sqetests"/>
</target>
@@ -68,8 +68,8 @@
<ant dir="sqetests" target="run-eesqe-target"/>
<antcall target="stopee"/>
<antcall target="stopDerby"/>
- <antcall target="create-report"/>
- <antcall target="mail"/>
+ <antcall target="create-report"/>
+ <antcall target="mail"/>
<antcall target="report-java"/>
<record name="runtest.output" action="stop"/>
<record name="appserv-tests.log" action="stop"/>
@@ -118,7 +118,7 @@
Executing web/subclassing [Total :3]
===========================================
</echo>
-
+
</target>
<target name="sqetests">
@@ -130,11 +130,11 @@
<target name="setupMQ" depends="setup-mq-common" />
<target name="usage">
- <echo>
- Usage:
- ant sqetests (Executes all sqetests tests)
- ant all (Executes all sqetests)
+ <echo>
+ Usage:
+ ant sqetests (Executes all sqetests tests)
+ ant all (Executes all sqetests)
ant show-list (Lists all test suites)
- </echo>
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/build.properties b/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/build.properties
index 7a2969e..5802e4d 100644
--- a/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/build.properties
@@ -14,7 +14,7 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-
+
admin.domain=domain1
install.dir=c:/sun/glassfish
diff --git a/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/build.xml b/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/build.xml
index da0d3a1..c94d071 100644
--- a/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/build.xml
@@ -19,7 +19,7 @@
<project name="adminweb" default="default" basedir=".">
<property file="build.properties"/>
-
+
<description>Builds, tests, and runs the GlassFish Admin GUI</description>
<!-- <import file="nbproject/build-impl.xml"/>-->
@@ -44,13 +44,13 @@
<path id="path2testng">
<pathelement location="../lib/testng-5.0-jdk15.jar"/>
</path>
-
-
+
+
<path id="class.path">
<fileset dir="${install.dir}/lib">
<include name="**/*.jar"/>
- </fileset>
+ </fileset>
<pathelement location="classes"/>
</path>
@@ -60,7 +60,7 @@
</fileset>-->
<fileset dir="../../lib">
<include name="**/*.jar"/>
- </fileset>
+ </fileset>
<pathelement location="./classes/test"/>
</path>
@@ -68,7 +68,7 @@
<taskdef name="testng"
classpathref="path2testng"
classname="org.testng.TestNGAntTask"/>
-
+
<!-- Generate the TestNG report -->
<target name="report">
@@ -97,26 +97,26 @@
<target name="start">
<echo message="Starting Selenium Server"/>
- <java jar="../../lib/selenium/selenium-server.jar" fork="true">
+ <java jar="../../lib/selenium/selenium-server.jar" fork="true">
<arg line="-interactive"/>
</java>
-
+
</target>
-<target name="run">
-
- <echo message="=============Starting Selenium TestNG test at \n ${basedir} ============"/>
-
+<target name="run">
+
+ <echo message="=============Starting Selenium TestNG test at \n ${basedir} ============"/>
+
<mkdir dir="../test-output"/>
<testng outputdir="../test-output"
classpathref="test.classpath" groups="">
<classfileset dir="classes/test" includes="**/SeleniumTest.class"/>
<!--<xmlfileset dir="../../../" includes="testng.xml"/>-->
</testng>
-
+
<!--<antcall target="-post-test-run"/> -->
-
-</target>
+
+</target>
<target name="stop">
<get taskname="selenium-shutdown"
@@ -134,11 +134,11 @@
<target name="_start-selenium">
<java jar="../lib/selenium/${selenium-srvr-jar}" fork="true" spawn="true" />
<antcall target="_run-ua-tests" />
- <get dest="${testreportdir}/results.txt"
+ <get dest="${testreportdir}/results.txt"
src="${selenium-srvr-loc}/selenium-server/driver/?cmd=shutDown" />
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/src/test/SeleniumTest.java b/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/src/test/SeleniumTest.java
index 8402e11..2ad6db8 100644
--- a/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/src/test/SeleniumTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/src/test/SeleniumTest.java
@@ -21,33 +21,33 @@
import org.openqa.selenium.server.SeleniumServer;
public class SeleniumTest {
-
+
private DefaultSelenium selenium;
-
+
//@Parameters({"selen-svr-addr","brwsr-path","aut-addr"})
@BeforeClass
private void init() throws Exception {
System.out.println("Starting Selenium Launcher--->");
selenium = new DefaultSelenium("localhost",
SeleniumServer.getDefaultPort(), "*iexplore", "http://localhost:4848");
-
-
-
+
+
+
/* selenium = new DefaultSelenium(selenSrvrAddr,
SeleniumServer.getDefaultPort(), bpath, appPath);*/
-
-
+
+
/*selClient = new DefaultSelenium("localhost", 4444,
"*firefox", "http://localhost:" + PORT);*/
-
+
selenium.start();
}
-
+
@Test
public void test1(){
Assert.assertTrue(true,"Pass");
}
-
+
@Test
@Parameters({"aut-addr"})
public void testLoginScreen() throws Exception {
@@ -62,14 +62,14 @@
selenium.waitForPageToLoad("30000");
//verifyTrue(selenium.isTextPresent("JRuby"));
//verifyEquals("glassfish: GlassFish Community", selenium.getTitle());
-
-
+
+
//Assert.assertEquals("", selenium.getText("//img[@alt='GlassFish V2']"));
-
+
selenium.open("/login.jsf");
selenium.waitForPageToLoad("30000");
//selenium.type("Login.username", "admin");
- selenium.type("j_username", "admin");
+ selenium.type("j_username", "admin");
//selenium.waitForPageToLoad("30000");
//selenium.type("Login.password", "adminadmin");
selenium.type("j_password", "adminadmin");
@@ -80,14 +80,14 @@
e.printStackTrace();
throw new Exception(e);
}
-
-
+
+
}
-
+
@AfterClass
private void stop() throws Exception {
selenium.stop();
- }
-
-
+ }
+
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/testng.xml b/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/testng.xml
index de1696f..885aaa1 100644
--- a/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/testng.xml
+++ b/appserver/tests/v2-tests/appserv-tests/community/adminweb/basic/testng.xml
@@ -17,20 +17,20 @@
-->
<suite name="User Acceptance Tests" verbose="1" >
-
+
<!-- required for DbUnit fixture -->
- <parameter name="seed-path" value="test/conf/gt15-seed.xml"/>
+ <parameter name="seed-path" value="test/conf/gt15-seed.xml"/>
<parameter name="db-driver" value="org.hsqldb.jdbcDriver"/>
<parameter name="db-url" value="jdbc:hsqldb:hsql://127.0.0.1"/>
<parameter name="db-user" value="sa"/>
<parameter name="db-psswrd" value=""/>
-
- <!-- required for Selenium fixture -->
- <parameter name="selen-svr-addr" value="localhost"/>
- <parameter name="aut-addr" value="http://localhost:8080/gt15/"/>
- <test name="GT15 CRUDs- Firefox" >
-
+ <!-- required for Selenium fixture -->
+ <parameter name="selen-svr-addr" value="localhost"/>
+ <parameter name="aut-addr" value="http://localhost:8080/gt15/"/>
+
+ <test name="GT15 CRUDs- Firefox" >
+
<parameter name="brwsr-path" value="*firefox"/>
<packages>
@@ -39,13 +39,13 @@
</packages>
</test>
- <test name="GT15 CRUDs- IE" >
-
+ <test name="GT15 CRUDs- IE" >
+
<parameter name="brwsr-path" value="*iexplore"/>
<packages>
<package name="test.com.acme.gt15.Web.selenium" />
<package name="test.com.acme.gt15.Web.selenium.fixtures" />
- </packages>
+ </packages>
</test>
</suite>
diff --git a/appserver/tests/v2-tests/appserv-tests/community/build.xml b/appserver/tests/v2-tests/appserv-tests/community/build.xml
index 971f7ed..3076333 100644
--- a/appserver/tests/v2-tests/appserv-tests/community/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/community/build.xml
@@ -19,7 +19,7 @@
<project name="gf-community" default="default" basedir=".">
<property file="build.properties"/>
-
+
<path id="path2testng">
<pathelement location="lib/testng-5.0-jdk15.jar"/>
</path>
@@ -28,7 +28,7 @@
<path id="class.path">
<fileset dir="${install.dir}/lib">
<include name="**/*.jar"/>
- </fileset>
+ </fileset>
<pathelement location="classes"/>
</path>
<path id="test.classpath">
@@ -37,14 +37,14 @@
</fileset>
<fileset dir="./lib">
<include name="**/*.jar"/>
- </fileset>
+ </fileset>
<pathelement location="${test.class.output}"/>
</path>
<taskdef name="testng"
classpathref="path2testng"
classname="org.testng.TestNGAntTask"/>
-
+
<description>Builds, tests, and runs the project Hello JSP Application</description>
<!-- <import file="nbproject/build-impl.xml"/>-->
@@ -52,24 +52,24 @@
<echo message="Hello Community"/>
</target>
-<target name="build">
- <ant dir="web/helloworld" target="build"/>
+<target name="build">
+ <ant dir="web/helloworld" target="build"/>
<ant dir="ejb30/hello" target="build"/>
<ant dir="adminweb/basic" target="build"/>
</target>
-<target name="compile-tests">
- <ant dir="web/helloworld" target="compile-tests" inheritAll="false"/>
+<target name="compile-tests">
+ <ant dir="web/helloworld" target="compile-tests" inheritAll="false"/>
<ant dir="ejb30/session/hello" target="compile-tests" inheritAll="false"/>
</target>
-<!--<target name="run">
- <ant dir="web/helloworld" target="run"/>
+<!--<target name="run">
+ <ant dir="web/helloworld" target="run"/>
</target>-->
-
+
<target name="deploy" >
- <ant dir="web/helloworld" target="deploy" inheritAll="false"/>
+ <ant dir="web/helloworld" target="deploy" inheritAll="false"/>
<ant dir="ejb30/hello" target="deploy" inheritAll="false"/>
<!-- <ant dir="adminweb/basic" target="deploy"/>-->
</target>
@@ -80,34 +80,34 @@
</target>
<!--<target name="run">
- <ant dir="web/helloworld" target="run"/>
+ <ant dir="web/helloworld" target="run"/>
<ant dir="ejb30/hello" target="run"/>
<ant dir="adminweb/basic" target="run"/>
</target>-->
-
+
<!--<target name="dist">
<echo message="Save EAR/WAR/JAR file"/>
- <ant dir="web/helloworld" target="dist"/>
+ <ant dir="web/helloworld" target="dist"/>
</target>-->
-<target name="run">
- <echo message="=============Starting TestNG functional tests ============"/>
- <mkdir dir="${test.report}"/>
+<target name="run">
+ <echo message="=============Starting TestNG functional tests ============"/>
+ <mkdir dir="${test.report}"/>
<testng outputdir="${test.report}"
classpathref="test.classpath">
<jvmarg value="-Djava.compiler=NONE"/>
<sysproperty key="basedir" value="${basedir}"/>
- <!--<classfileset dir="classes/test" includes="**/SeleniumTest.class"/>-->
+ <!--<classfileset dir="classes/test" includes="**/SeleniumTest.class"/>-->
<xmlfileset dir="." includes="testng.xml"/>
</testng>
-
+
<!--<antcall target="-post-test-run"/> -->
-
-</target>
+
+</target>
<!-- Generate the TestNG report -->
-<target name="report">
+<target name="report">
<junitreport todir="${test.report}">
<fileset dir=".">
<include name="**/test-output/**/*.xml"/>
@@ -137,6 +137,6 @@
</zip>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/community/ejb30/session/hello/build.xml b/appserver/tests/v2-tests/appserv-tests/community/ejb30/session/hello/build.xml
index 51ebcc5..eb2d573 100644
--- a/appserver/tests/v2-tests/appserv-tests/community/ejb30/session/hello/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/community/ejb30/session/hello/build.xml
@@ -19,7 +19,7 @@
<project name="ejb30-session-hello" default="default" basedir=".">
<property file="build.properties"/>
-
+
<description>Builds, tests, and runs the project Hello JSP Application</description>
<!-- <import file="nbproject/build-impl.xml"/>-->
@@ -44,13 +44,13 @@
<path id="path2testng">
<pathelement location="testng-5.0-jdk15.jar"/>
</path>
-
-
+
+
<path id="class.path">
<fileset dir="${install.dir}/lib">
<include name="**/*.jar"/>
- </fileset>
+ </fileset>
<pathelement location="classes"/>
</path>
@@ -67,7 +67,7 @@
<!-- TestNG class fileset -->
-<target name="build">
+<target name="build">
<delete dir="classes"/>
<mkdir dir="classes/app"/>
<javac debug="true"
@@ -76,20 +76,20 @@
classpathref="class.path"
srcdir="src/ejb"
destdir="classes/app"/>
-
+
<delete dir="dist" failonerror="false"/>
-
+
<mkdir dir="dist"/>
-
-
- <jar destfile="dist/${ejbjar.file}">
+
+
+ <jar destfile="dist/${ejbjar.file}">
<fileset dir="classes/app">
<include name="**/*.class"/>
</fileset>
- <metainf dir="descriptor">
- <include name="*.xml"/>
+ <metainf dir="descriptor">
+ <include name="*.xml"/>
</metainf>
- </jar>
+ </jar>
<echo message="======================================================="/>
<echo message="Packaged Archive at ./dist/${ejbjar.file}"/>
<echo message="======================================================="/>
@@ -98,7 +98,7 @@
<taskdef name="testng"
classpathref="path2testng"
classname="org.testng.TestNGAntTask"/>
-
+
<!-- Generate the TestNG report -->
<target name="report">
@@ -125,9 +125,9 @@
/>
</target>
-<target name="run">
-
- <echo message="=============Starting TestNG test at \n ${basedir} ============"/>
+<target name="run">
+
+ <echo message="=============Starting TestNG test at \n ${basedir} ============"/>
<mkdir dir="../../test-output"/>
<testng outputdir="../../../test-output"
classpathref="test.classpath" groups="">
@@ -135,7 +135,7 @@
<!--<xmlfileset dir="../../../" includes="testng.xml"/>-->
</testng>
</target>
-
+
<target name="deploy" depends="sun-taskdef">
<echo message="${sun.appserver.antjar}"/>
@@ -149,7 +149,7 @@
passwordfile="${install.dir}/pass.txt"
host="${admin.host}"
port="${admin.port}"
- asinstalldir="${install.dir}" />
+ asinstalldir="${install.dir}" />
</target>
<target name="dist">
@@ -159,13 +159,13 @@
<target name="_start-selenium">
<java jar="../lib/selenium/${selenium-srvr-jar}" fork="true" spawn="true" />
<antcall target="_run-ua-tests" />
- <get dest="${testreportdir}/results.txt"
+ <get dest="${testreportdir}/results.txt"
src="${selenium-srvr-loc}/selenium-server/driver/?cmd=shutDown" />
</target>
<target name="run">
<taskdef classpathref="build.classpath" resource="testngtasks" />
- <testng outputDir="${testreportdir}"
+ <testng outputDir="${testreportdir}"
classpath="${testclassesdir};${classesdir}" haltonfailure="true">
<xmlfileset dir="." includes="testng.xml" />
<classpath>
@@ -173,7 +173,7 @@
</classpath>
</testng>
</target>
-
-
+
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/community/testng.xml b/appserver/tests/v2-tests/appserv-tests/community/testng.xml
index c91a4e5..2e60ddf 100644
--- a/appserver/tests/v2-tests/appserv-tests/community/testng.xml
+++ b/appserver/tests/v2-tests/appserv-tests/community/testng.xml
@@ -30,6 +30,6 @@
<classes>
<class name="ejb30.session.hello.test.TestClient" />
</classes>
- </test>
+ </test>
</suite>
diff --git a/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/build.xml b/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/build.xml
index 3998574..a95d7d0 100644
--- a/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/build.xml
@@ -19,32 +19,32 @@
<project name="hello-jsp" default="default" basedir=".">
<property file="build.properties"/>
-
+
<description>Builds, tests, and runs the project Hello JSP Application</description>
<!-- <import file="nbproject/build-impl.xml"/>-->
<path id="sun.appserver.antjar">
<fileset dir="${install.dir}/lib">
<include name="**/*.jar"/>
- </fileset>
+ </fileset>
</path>
<target name="sun-taskdef">
<taskdef name="sun-appserv-deploy"
- classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask">
- <classpath refid="sun.appserver.antjar" />
+ classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask">
+ <classpath refid="sun.appserver.antjar" />
</taskdef>
- <taskdef name="sun-appserv-undeploy"
+ <taskdef name="sun-appserv-undeploy"
classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.UndeployTask">
- <classpath refid="sun.appserver.antjar" />
+ <classpath refid="sun.appserver.antjar" />
</taskdef>
</target>
<path id="class.path">
<fileset dir="${install.dir}/lib">
<include name="**/*.jar"/>
- </fileset>
+ </fileset>
<pathelement location="${class.output}/app"/>
</path>
@@ -65,7 +65,7 @@
includes="**/*.class">
</fileset>
-<target name="build">
+<target name="build">
<delete dir="${class.output}/app"/>
<delete dir="${dist.dir}"/>
<mkdir dir="${class.output}/app"/>
@@ -84,13 +84,13 @@
<!--<lib dir="thirdparty/libs">
<exclude name="jdbc1.jar"/>
</lib>-->
- <classes dir="${class.output}/app">
- <include name="**/Hello.class"/>
+ <classes dir="${class.output}/app">
+ <include name="**/Hello.class"/>
</classes>
<!--<zipfileset dir="src/graphics/images/gifs"
prefix="images"/>-->
- <!--<webinf dir="metadata">
- <include name="**/*.xml"/>
+ <!--<webinf dir="metadata">
+ <include name="**/*.xml"/>
</webinf>-->
</war>
<copy file="${dist.dir}/${war.file}" tofile="./${war.file}"/>
@@ -106,7 +106,7 @@
<taskdef name="testng"
classpathref="path2testng"
classname="org.testng.TestNGAntTask"/>
-
+
<!-- Generate the TestNG report -->
<target name="report">
@@ -122,7 +122,7 @@
</target>
<target name="compile-tests"
description="compile the test ng example" depends="">
-
+
<mkdir dir="${test.class.output}"/>
<javac debug="true"
fork="true"
@@ -133,8 +133,8 @@
/>
</target>
-<target name="run">
- <echo message="=============Starting TestNG test at ${class.output}/test ============"/>
+<target name="run">
+ <echo message="=============Starting TestNG test at ${class.output}/test ============"/>
<mkdir dir="${result.output}"/>
<testng outputdir="${result.output}"
suitename="V3 TestSuite"
@@ -149,15 +149,15 @@
</target>
<target name="stop">
-
+
</target>
<target name="deploy">
<antcall target="deploy-v2"/>
<antcall target="deploy-v3"/>
</target>
-
-<target name="deploy-v2" depends="sun-taskdef" unless="v3">
+
+<target name="deploy-v2" depends="sun-taskdef" unless="v3">
<sun-appserv-deploy file="${dist.dir}/${war.file}"
name="helloworld"
@@ -170,25 +170,25 @@
host="${admin.host}"
port="${admin.port}"
asinstalldir="${install.dir}" />
-</target>
+</target>
<target name="deploy-v3" if="v3">
<echo message="deploying in v3 mode"/>
<echo message="./${war.file}"/>
<copy file="${dist.dir}/${war.file}" todir="${glassfish.home}/domains/domain1/autodeploy"/>
<!--<get src="http://localhost:8080/_asadmin/deploy?path=${war.file}" dest="test.html"/>-->
-
+
</target>
-
-<target name="undeploy" depends="sun-taskdef">
+
+<target name="undeploy" depends="sun-taskdef">
<sun-appserv-undeploy file="${dist.dir}/${war.file}"
- name="helloworld"
+ name="helloworld"
user="${admin.user}"
passwordfile="${install.dir}/pass.txt"
host="${admin.host}"
port="${admin.port}"
- asinstalldir="${install.dir}" />
+ asinstalldir="${install.dir}" />
</target>
<target name="source">
@@ -204,5 +204,5 @@
</zip>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/src/myapp/java/Hello.java b/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/src/myapp/java/Hello.java
index c6164dc..e7e359d 100644
--- a/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/src/myapp/java/Hello.java
+++ b/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/src/myapp/java/Hello.java
@@ -51,43 +51,43 @@
HttpServletResponse response)
throws IOException, ServletException {
- response.setContentType("text/html");
- PrintWriter writer = response.getWriter();
+ response.setContentType("text/html");
+ PrintWriter writer = response.getWriter();
- writer.println("<html>");
- writer.println("<head>");
- writer.println("<title>Sample Application Servlet Page</title>");
- writer.println("</head>");
- writer.println("<body bgcolor=white>");
+ writer.println("<html>");
+ writer.println("<head>");
+ writer.println("<title>Sample Application Servlet Page</title>");
+ writer.println("</head>");
+ writer.println("<body bgcolor=white>");
- writer.println("<table border=\"0\">");
- writer.println("<tr>");
- writer.println("<td>");
- //writer.println("<img src=\"images/tomcat.gif\">");
- writer.println("</td>");
- writer.println("<td>");
- writer.println("<h1>Sample Application Servlet</h1>");
- writer.println("This is the output of a servlet that is part of");
- writer.println("the Hello, World application. It displays the");
- writer.println("request headers from the request we are currently");
- writer.println("processing.");
- writer.println("</td>");
- writer.println("</tr>");
- writer.println("</table>");
+ writer.println("<table border=\"0\">");
+ writer.println("<tr>");
+ writer.println("<td>");
+ //writer.println("<img src=\"images/tomcat.gif\">");
+ writer.println("</td>");
+ writer.println("<td>");
+ writer.println("<h1>Sample Application Servlet</h1>");
+ writer.println("This is the output of a servlet that is part of");
+ writer.println("the Hello, World application. It displays the");
+ writer.println("request headers from the request we are currently");
+ writer.println("processing.");
+ writer.println("</td>");
+ writer.println("</tr>");
+ writer.println("</table>");
- writer.println("<table border=\"0\" width=\"100%\">");
- Enumeration names = request.getHeaderNames();
- while (names.hasMoreElements()) {
- String name = (String) names.nextElement();
- writer.println("<tr>");
- writer.println(" <th align=\"right\">" + name + ":</th>");
- writer.println(" <td>" + request.getHeader(name) + "</td>");
- writer.println("</tr>");
- }
- writer.println("</table>");
+ writer.println("<table border=\"0\" width=\"100%\">");
+ Enumeration names = request.getHeaderNames();
+ while (names.hasMoreElements()) {
+ String name = (String) names.nextElement();
+ writer.println("<tr>");
+ writer.println(" <th align=\"right\">" + name + ":</th>");
+ writer.println(" <td>" + request.getHeader(name) + "</td>");
+ writer.println("</tr>");
+ }
+ writer.println("</table>");
- writer.println("</body>");
- writer.println("</html>");
+ writer.println("</body>");
+ writer.println("</html>");
}
diff --git a/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/src/test/WebTestNG.java b/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/src/test/WebTestNG.java
index e8b61c5..31ac2fe 100644
--- a/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/src/test/WebTestNG.java
+++ b/appserver/tests/v2-tests/appserv-tests/community/web/helloworld/src/test/WebTestNG.java
@@ -33,7 +33,7 @@
private static final String EXPECTED_RESPONSE =
"JSP Test Page";
-
+
private String strContextRoot="hellojsp";
static String result = "";
@@ -48,7 +48,7 @@
@Test(groups ={ "pulse"} ) // test method
//public void webtest(String host, String port, String contextroot) throws Exception{
public void webtest() throws Exception{
-
+
try{
String host=System.getProperty("host");
String port=System.getProperty("port");
@@ -69,30 +69,30 @@
String line = null;
boolean result=false;
- String testLine = null;
+ String testLine = null;
while ((line = input.readLine()) != null) {
if(line.indexOf(EXPECTED_RESPONSE)!=-1){
result=true;
testLine = line;
System.out.println(testLine);
}
-
- }
-
+
+ }
+
Assert.assertEquals(result, true,"Unexpected HTML");
-
-
+
+
}catch(Exception e){
e.printStackTrace();
throw new Exception(e);
}
}
-
+
@Test(groups ={ "pulse"} ) // test method
public void dummyTest(){
Assert.assertEquals(false, true,"Dummy Failure");
-
+
}
public static void echo(String msg) {
diff --git a/appserver/tests/v2-tests/appserv-tests/config/common.xml b/appserver/tests/v2-tests/appserv-tests/config/common.xml
index a9ee5de..7d46006 100644
--- a/appserver/tests/v2-tests/appserv-tests/config/common.xml
+++ b/appserver/tests/v2-tests/appserv-tests/config/common.xml
@@ -17,24 +17,24 @@
-->
<!--
- This is the top level build file that should be
- imported into all the leaf level build files
+ This is the top level build file that should be
+ imported into all the leaf level build files
-->
<!-- ================================================================ -->
<!-- Targets to clean class files and jars files -->
-<!--
-Variables used:
- ${build.classes.dir}
+<!--
+Variables used:
+ ${build.classes.dir}
${assemble.dir}
-->
<!-- ================================================================ -->
<target name="clean-classes-common" depends="init-common">
- <echo message="common.xml: Cleaning test source files: ${build.base.dir}"
+ <echo message="common.xml: Cleaning test source files: ${build.base.dir}"
level="verbose"/>
<delete dir="${build.base.dir}"/>
</target>
-
+
<target name="clean-jars-common" depends="init-common">
<delete dir="${assemble.dir}"/>
</target>
@@ -46,9 +46,9 @@
<!-- ================================================================ -->
<!-- Target to compile the java source files -->
-<!--
-Variables used:
- ${build.classes.dir}
+<!--
+Variables used:
+ ${build.classes.dir}
${s1astest.classpath}
${src}
-->
@@ -91,7 +91,7 @@
Variables Used:
${war.file}
${build.classes.dir}
- ${appname}
+ ${appname}
${assemble.dir}
${web.xml}
${beans.xml}
@@ -113,17 +113,17 @@
<target name="publish-war-common" depends="init-common">
<mkdir dir="${build.webapps.dir}"/>
- <copy file="${assemble.dir}/${appname}-web.war"
- tofile="${build.webapps.dir}/${appname}.war"
+ <copy file="${assemble.dir}/${appname}-web.war"
+ tofile="${build.webapps.dir}/${appname}.war"
overwrite="true" />
</target>
<target name="clean-webapps-common" depends="init-common">
- <delete dir="${build.webapps.dir}" quiet="true" />
+ <delete dir="${build.webapps.dir}" quiet="true" />
</target>
<target name="clear">
- <delete file="${war.file}"/>
+ <delete file="${war.file}"/>
</target>
<target name="copy-tlds" if="tlds-exist" depends="clear,test-tlds-exist">
@@ -152,17 +152,17 @@
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/>
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/lib"/>
<mkdir dir="lib"/>
- <copy file="${glassfish-web.xml}"
+ <copy file="${glassfish-web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/glassfish-web.xml" failonerror="false"/>
- <copy file="${sun-web.xml}"
+ <copy file="${sun-web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/sun-web.xml" failonerror="false"/>
- <copy file="${glassfish-ejb-jar.xml}"
+ <copy file="${glassfish-ejb-jar.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/glassfish-ejb-jar.xml" failonerror="false"/>
- <copy file="${sun-ejb-jar.xml}"
+ <copy file="${sun-ejb-jar.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/sun-ejb-jar.xml" failonerror="false"/>
- <copy file="${weblogic.xml}"
+ <copy file="${weblogic.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/weblogic.xml" failonerror="false"/>
- <copy file="${glassfish-resources.xml}"
+ <copy file="${glassfish-resources.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/glassfish-resources.xml" failonerror="false"/>
<copy todir="${build.classes.dir}/tmp/WEB-INF/lib" failonerror="false">
<fileset dir="lib">
@@ -170,32 +170,32 @@
<include name="**/*.zip"/>
</fileset>
</copy>
- <copy file="${webservices.xml}"
+ <copy file="${webservices.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/webservices.xml"
failonerror="false"/>
- <copy file="${mappingfile.location}/${mappingfile.name}"
+ <copy file="${mappingfile.location}/${mappingfile.name}"
tofile="${build.classes.dir}/tmp/${mappingfile.name}"
failonerror="false"/>
- <copy file="${wsdlfile.location}/${wsdlfile.name}"
+ <copy file="${wsdlfile.location}/${wsdlfile.name}"
tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}"
failonerror="false"/>
- <copy file="${tagPlugins.xml}"
+ <copy file="${tagPlugins.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/tagPlugins.xml"
failonerror="false"/>
- <copy file="${web.xml}"
+ <copy file="${web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/web.xml"
failonerror="false"/>
- <copy file="${persistence.xml}"
+ <copy file="${persistence.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/classes/META-INF/persistence.xml"
failonerror="false"/>
- <copy file="${beans.xml}"
+ <copy file="${beans.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/beans.xml"
failonerror="false"/>
<copy file="${context.xml}"
tofile="${build.classes.dir}/tmp/META-INF/context.xml" failonerror="false"/>
<copy file="${cdi-extension.service}"
tofile="${build.classes.dir}/tmp/WEB-INF/classes/META-INF/services/jakarta.enterprise.inject.spi.Extension" failonerror="false"/>
-
+
<copy todir="${build.classes.dir}/tmp/WEB-INF/classes">
<fileset dir="${war.classes}">
<include name="**/*.class"/>
@@ -243,10 +243,10 @@
<include name="WEB-INF/classes/META-INF/services/jakarta.enterprise.inject.spi.Extension"/>
<include name="WEB-INF/classes/META-INF/persistence.xml"/>
</fileset>
- </jar>
+ </jar>
<echo message="created war file ${war.file}" level="verbose"/>
- <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
- <echo message="my webclient war classes are:${webclient.war.classes}"
+ <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
+ <echo message="my webclient war classes are:${webclient.war.classes}"
level="verbose"/>
</target>
@@ -264,39 +264,39 @@
Variables Used:
${ejb.jar}
${build.classes.dir}
- ${ejb-jar.xml}
+ ${ejb-jar.xml}
${beans.xml}
- ${persistence-orm.xml}
- ${persistence.xml}
- ${sun-ejb-jar.xml}
- ${glassfish-ejb-jar.xml}
- ${sun-cmp-mappings.xml}
- ${metainf.dir}
+ ${persistence-orm.xml}
+ ${persistence.xml}
+ ${sun-ejb-jar.xml}
+ ${glassfish-ejb-jar.xml}
+ ${sun-cmp-mappings.xml}
+ ${metainf.dir}
${ejbjar.files}
${dbschema}
-->
<!-- ================================================================ -->
<target name="package-ejbjar-common">
<delete file="${ejb.jar}"/>
- <echo message="common.xml: Generating ejb-jar inside build directory"
+ <echo message="common.xml: Generating ejb-jar inside build directory"
level="verbose"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
- <copy file="${ejb-jar.xml}"
+ <copy file="${ejb-jar.xml}"
tofile="${build.classes.dir}/META-INF/ejb-jar.xml"
failonerror="false"/>
- <copy file="${persistence.xml}"
+ <copy file="${persistence.xml}"
tofile="${build.classes.dir}/META-INF/persistence.xml"
failonerror="false"/>
- <copy file="${persistence-orm.xml}"
+ <copy file="${persistence-orm.xml}"
tofile="${build.classes.dir}/META-INF/persistence-orm.xml"
failonerror="false"/>
- <copy file="${webservices.xml}"
+ <copy file="${webservices.xml}"
tofile="${build.classes.dir}/META-INF/webservices.xml"
failonerror="false"/>
- <copy file="${sun-ejb-jar.xml}"
+ <copy file="${sun-ejb-jar.xml}"
tofile="${build.classes.dir}/META-INF/sun-ejb-jar.xml"
failonerror="false"/>
- <copy file="${glassfish-ejb-jar.xml}"
+ <copy file="${glassfish-ejb-jar.xml}"
tofile="${build.classes.dir}/META-INF/glassfish-ejb-jar.xml"
failonerror="false"/>
<copy file="${glassfish-resources.xml}"
@@ -312,7 +312,7 @@
tofile="${build.classes.dir}/META-INF/batch.xml"
failonerror="false"/>
<copy todir="${build.classes.dir}/META-INF/batch-jobs" failonerror="false">
- <fileset dir="${batch.jobs.dir}"/>
+ <fileset dir="${batch.jobs.dir}"/>
</copy>
<copy file="${dbschema}" todir="${build.classes.dir}" failonerror="false"/>
<jar jarfile="${ejb.jar}" basedir="${ejbjar.files}" update="true"
@@ -330,46 +330,46 @@
<include name="batch-jobs/**/*.xml"/>
<include name="batch.xml"/>
</metainf>
- </jar>
+ </jar>
<delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
<delete file="${build.classes.dir}/*.dbschema" failonerror="false"/>
-</target>
+</target>
<!-- ================================================================ -->
<!-- Target to package the appclient application to jar file -->
<!--
Variables Used:
${appclient.jar}
- ${appclientjar.classes}
- ${appclientjar.files}
+ ${appclientjar.classes}
+ ${appclientjar.files}
${build.classes.dir}
- ${application-client.xml}
- ${glassfish-application-client.xml}
- ${sun-application-client.xml}
+ ${application-client.xml}
+ ${glassfish-application-client.xml}
+ ${sun-application-client.xml}
-->
<!-- ================================================================ -->
<target name="package-appclientjar-common">
<delete file="${appclient.jar}"/>
- <echo message="common.xml: Generating appclient-jar inside build directory"
+ <echo message="common.xml: Generating appclient-jar inside build directory"
level="verbose"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
<copy file="${application-client.xml}"
- tofile="${build.classes.dir}/META-INF/application-client.xml"
+ tofile="${build.classes.dir}/META-INF/application-client.xml"
failonerror="false"/>
<copy file="${glassfish-application-client.xml}" tofile="${build.classes.dir}/META-INF/glassfish-application-client.xml"
failonerror="false"/>
<copy file="${sun-application-client.xml}" tofile="${build.classes.dir}/META-INF/sun-application-client.xml"
failonerror="false"/>
- <jar jarfile="${appclient.jar}" basedir="${appclientjar.files}"
- update="true" includes ="${appclientjar.classes}"
- manifest="./client/MANIFEST.MF">
+ <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="glassfish-application-client.xml"/>
<include name="sun-application-client.xml"/>
</metainf>
- </jar>
-</target>
+ </jar>
+</target>
<!-- ================================================================ -->
<!-- Target to create the ejb application jar file -->
@@ -380,7 +380,7 @@
<param name="ejbjar.files" value="${build.classes.dir}"/>
<param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/>
</antcall>
-</target>
+</target>
<!-- ================================================================ -->
<!-- Target to create the appclient jar file -->
@@ -388,9 +388,9 @@
<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>
@@ -419,22 +419,22 @@
<target name="build-ear-common" depends="fixFiles,package-persistence-common,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"/>
- <copy file="${application.xml}" tofile="${build.classes.dir}/META-INF/application.xml" failonerror="false"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${sun-application.xml}" tofile="${build.classes.dir}/META-INF/sun-application.xml" failonerror="false"/>
+ <copy file="${application.xml}" tofile="${build.classes.dir}/META-INF/application.xml" failonerror="false"/>
<copy file="${glassfish-resources-ear.xml}" tofile="${build.classes.dir}/META-INF/glassfish-resources.xml" failonerror="false" filtering="true"/>
- <jar jarfile="${assemble.dir}/${appname}App.ear">
+ <jar jarfile="${assemble.dir}/${appname}App.ear">
<fileset dir="${assemble.dir}">
<include name="*.jar"/>
<include name="*.war"/>
</fileset>
<fileset dir="${build.classes.dir}">
- <include name="META-INF/sun-application.xml"/>
- <include name="META-INF/application.xml"/>
+ <include name="META-INF/sun-application.xml"/>
+ <include name="META-INF/application.xml"/>
<include name="META-INF/glassfish-resources.xml"/>
</fileset>
<fileset dir="${env.APS_HOME}" includes="lib/reporter.jar"/>
- </jar>
+ </jar>
</target>
@@ -444,21 +444,21 @@
<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"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${sun-application.xml}" tofile="${build.classes.dir}/META-INF/sun-application.xml" failonerror="false"/>
<copy file="${glassfish-resources-ear.xml}" tofile="${build.classes.dir}/META-INF/glassfish-resources.xml" failonerror="false" filtering="true"/>
- <ear earfile="${assemble.dir}/${appname}App.ear"
+ <ear earfile="${assemble.dir}/${appname}App.ear"
appxml="${application.xml}">
<fileset dir="${assemble.dir}">
<include name="*.jar"/>
<include name="*.war"/>
</fileset>
<fileset dir="${build.classes.dir}">
- <include name="META-INF/sun-application.xml"/>
+ <include name="META-INF/sun-application.xml"/>
<include name="META-INF/glassfish-resources.xml"/>
</fileset>
<fileset dir="${env.APS_HOME}" includes="lib/reporter.jar"/>
- </ear>
+ </ear>
</target>
@@ -488,17 +488,17 @@
<echo message="Operand ${operand.props}" level="verbose"/>
<echo message="asadmin ${admin.command} ${as.props} ${operand.props}"/>
<exec executable="${ASADMIN}" failonerror="true">
- <arg line="${admin.command} ${as.props} ${operand.props}" />
+ <arg line="${admin.command} ${as.props} ${operand.props}" />
</exec>
</target>
<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>
@@ -506,7 +506,7 @@
<!-- Target to execute a batchfile of asadmin commands -->
<!-- ================================================================ -->
<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"/>
<property name="user.password.file" value="asadminuserpassword.txt"/>
<echo file="${user.password.file}" append="false">
@@ -517,11 +517,11 @@
</echo>
<exec executable="${ASADMIN}" failonerror="true">
<arg line="--user ${admin.user} --passwordfile ${user.password.file} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
- <arg line="multimode --file ${asadmin.file}" />
+ <arg line="multimode --file ${asadmin.file}" />
</exec>
<delete file="${user.password.file}" failonerror="false"/>
</target>
-
+
<!-- ================================================================ -->
<!-- ================================================================ -->
@@ -545,7 +545,7 @@
</exec>
<delete file="${user.password.file}" failonerror="false"/>
</target>
-
+
<!-- ================================================================ -->
<!-- Target to delete the user in file realm the AppServ -->
<!-- ================================================================ -->
@@ -561,7 +561,7 @@
</target>
<!-- ================================================================ -->
-<!-- J2EE Connector related targets -->
+<!-- J2EE Connector related targets -->
<!-- ================================================================ -->
<target name="create-connector-connpool-common"
@@ -648,7 +648,7 @@
<!-- Target to create JDBC connection pool -->
<!-- ================================================================ -->
<target name="create-jdbc-connpool-common" depends="init-common">
-<echo message="created jdbc connection pool ${jdbc.conpool.name}"
+<echo message="created jdbc connection pool ${jdbc.conpool.name}"
level="verbose"/>
<property name="extra-params" value=""/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -664,7 +664,7 @@
</target>
<target name="create-jdbc-driver-connpool-common" depends="init-common">
-<echo message="created jdbc connection pool ${jdbc.conpool.name}"
+<echo message="created jdbc connection pool ${jdbc.conpool.name}"
level="verbose"/>
<property name="extra-params" value=""/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -701,7 +701,7 @@
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command" value="set" />
<param name="operand.props"
- value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
+ value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
</antcall>
</target>
@@ -752,7 +752,7 @@
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command" value="set" />
<param name="operand.props"
- value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
+ value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
</antcall>
</target>
@@ -768,14 +768,14 @@
<arg line="--target ${appserver.instance.name}"/>
<arg line="${jdbc.conpool.name}"/>
</exec>
- <echo message="cmd executed for ${appserver.instance.name}"/>
+ <echo message="cmd executed for ${appserver.instance.name}"/>
</target>
<!-- ================================================================ -->
<!-- Target to create JDBC resource -->
<!-- ================================================================ -->
<target name="create-jdbc-resource-common" depends="init-common">
-<echo message="Creating jdbc resource pool ${jdbc.resource.name}"
+<echo message="Creating jdbc resource pool ${jdbc.resource.name}"
level="verbose"/>
<echo message="asadmin create-jdbc-resource ${as.props} --connectionpoolid ${jdbc.conpool.name} --target ${appserver.instance.name} ${jdbc.resource.name}"/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -827,7 +827,7 @@
<!-- Target to create persistence resource -->
<!-- ================================================================ -->
<target name="create-persistence-resource-common" depends="init-common">
-<echo message="Creating pm resource at ${pm.resource.name}"
+<echo message="Creating pm resource at ${pm.resource.name}"
level="verbose"/>
<echo message="asadmin create-persistence-resource ${as.props} --target ${appserver.instance.name} ${pm.resource.name}"/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -837,7 +837,7 @@
<arg line="--target ${appserver.instance.name}"/>
<arg line="${pm.resource.name}"/>
</exec>
- <echo message="Created ${pm.resource.name} --target ${appserver.instance.name}"/>
+ <echo message="Created ${pm.resource.name} --target ${appserver.instance.name}"/>
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command" value="set"/>
<param name="operand.props"
@@ -856,14 +856,14 @@
<target name="delete-persistence-resource-common" depends="init-common">
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command"
- value="delete-persistence-resource
+ value="delete-persistence-resource
--target ${appserver.instance.name}" />
<param name="operand.props" value="${pm.resource.name}" />
</antcall>
</target>
<target name="execute-sql-common" depends="init-common">
-<echo message="Executing sql statement at ${basedir} from ${sql.file}"
+<echo message="Executing sql statement at ${basedir} from ${sql.file}"
level="verbose"/>
<sql
driver="${db.driver}"
@@ -878,7 +878,7 @@
<target name="execute-ejb-sql-common" depends="init-common">
-<echo message="Executing sql statement at ${basedir} from ${sql.file}"
+<echo message="Executing sql statement at ${basedir} from ${sql.file}"
level="verbose"/>
<sql
driver="${db.driver}"
@@ -894,8 +894,8 @@
<!-- ================================================================ -->
<!-- Target to create/delete mail resources -->
-<!--
- Properties required:
+<!--
+ Properties required:
mailhost
fromaddress
debug
@@ -936,7 +936,7 @@
<!-- Target to create database table through SQL file -->
<!-- ================================================================ -->
<target name="create-sql-common" depends="init-common">
-<echo message="creating tables from ${basedir}/sql/${db.create}"
+<echo message="creating tables from ${basedir}/sql/${db.create}"
level="verbose"/>
<sql
driver="${db.driver}"
@@ -955,7 +955,7 @@
<!-- Target to delete database table through SQL file -->
<!-- ================================================================ -->
<target name="delete-sql-common" depends="init-common">
-<echo message="dropping tables from ${basedir}/sql/${db.drop}"
+<echo message="dropping tables from ${basedir}/sql/${db.drop}"
level="verbose"/>
<sql
driver="${db.driver}"
@@ -974,11 +974,11 @@
<!-- Taget to create JMS Connection -->
<!-- ======================================================= -->
<target name="create-jms-connection-common" depends="init-common">
- <echo message="Creating JMS connection factory with name ${jms.factory.name}"
+ <echo message="Creating JMS connection factory with name ${jms.factory.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
<arg line="create-jms-resource "/>
- <arg line="--restype ${jms.factory.type}"/>
+ <arg line="--restype ${jms.factory.type}"/>
<arg line="${as.props}"/>
<arg line="--target ${appserver.instance.name}"/>
<arg line="${jms.factory.name}" />
@@ -989,23 +989,23 @@
<!-- Taget to delete JMS Connection -->
<!-- ======================================================= -->
<target name="delete-jms-connection-common" depends="init-common">
- <echo message="Delete JMS connection factory with name ${jms.factory.name}"
+ <echo message="Delete JMS connection factory with name ${jms.factory.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
- <arg line="delete-jms-resource "/>
+ <arg line="delete-jms-resource "/>
<arg line="${as.props}"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${jms.factory.name}"/>
</exec>
</target>
<!-- JMS: create/delete Destination Resource Targets -->
<target name="create-jms-resource-common" depends="init-common">
- <echo message="Creating JMS resource with name ${jms.resource.name}"
+ <echo message="Creating JMS resource with name ${jms.resource.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
- <arg line="create-jmsdest --desttype ${dest.type} "/>
+ <arg line="create-jmsdest --desttype ${dest.type} "/>
<arg line="${as.props}"/>
<arg line="${dest.name}"/>
</exec>
@@ -1014,24 +1014,24 @@
<arg line="create-jms-resource "/>
<arg line="--restype ${jms.resource.type}"/>
<arg line="--property imqDestinationName=${dest.name}"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${as.props}"/>
<arg line="${jms.resource.name}"/>
</exec>
</target>
<target name="delete-jms-resource-common" depends="init-common">
- <echo message="Delete JMS resource with name ${jms.resource.name}"
+ <echo message="Delete JMS resource with name ${jms.resource.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
<arg line="delete-jms-resource "/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${as.props} ${jms.resource.name}"/>
</exec>
<exec executable="${ASADMIN}">
- <arg line="delete-jmsdest --desttype ${dest.type} "/>
+ <arg line="delete-jmsdest --desttype ${dest.type} "/>
<arg line="${as.props} ${dest.name}"/>
</exec>
</target>
@@ -1075,20 +1075,20 @@
<target name="deploy-common" depends="init-common">
<antcall target="deploy-common-pe"/>
<antcall target="deploy-common-ee"/>
-</target>
+</target>
<target name="deploy-verify-common" depends="init-common">
<antcall target="deploy-verify-common-pe"/>
<antcall target="deploy-verify-common-ee"/>
-</target>
+</target>
<target name="deploy-common-pe" depends="init-common" unless="ee">
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
<property name="extra-params" value=""/>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="deploy"/>
- <arg line="${as.props}"/>
- <arg line="${extra-params}"/>
+ <arg line="${as.props}"/>
+ <arg line="${extra-params}"/>
<arg line="--target ${appserver.instance.name}"/>
<arg line="--retrieve ${assemble.dir}"/>
<!-- deployed.app defaults to ${assemble.dir}/${appname}App.ear defined in properties.xml-->
@@ -1097,7 +1097,7 @@
<echo message="Deployment on target server ${appserver.instance.name} successful"/>
</target>
-<target name="deploy-common-ee" depends="init-common" if="ee">
+<target name="deploy-common-ee" depends="init-common" if="ee">
<echo message="Deploying in EE..."/>
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -1111,7 +1111,7 @@
<echo message="Deployment on target server ${appserver.instance.name} successful"/>
</target>
-<target name="deploy-common-libraries" depends="init-common">
+<target name="deploy-common-libraries" depends="init-common">
<echo message="Deploying with libraries..."/>
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -1163,9 +1163,9 @@
<arg line="--precompilejsp=${precompilejsp}"/>
<arg line="--upload true"/>
<arg line="--retrieve ${assemble.dir}"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
</exec>
-</target>
+</target>
<target name="deploy-war-name" depends="init-common">
<echo message="Deploying ${warname} from ${basedir}."
@@ -1190,7 +1190,7 @@
</target>
<target name="deploy-war-commonpe" depends="init-common" unless="ee">
- <echo message="Deploying ${assemble.dir}/${appname}-web.war from ${basedir}."
+ <echo message="Deploying ${assemble.dir}/${appname}-web.war from ${basedir}."
level="verbose"/>
<property name="precompilejsp" value="true"/>
<property name="force" value="false"/>
@@ -1201,10 +1201,10 @@
<arg line="--precompilejsp=${precompilejsp}"/>
<arg line="--force=${force}"/>
<arg line="--upload=true"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${assemble.dir}/${appname}-web.war"/>
</exec>
-</target>
+</target>
<target name="deploy-war-libraries" depends="init-common" unless="ee">
<echo message="Deploying ${assemble.dir}/${appname}-web.war from ${basedir}."
@@ -1253,7 +1253,7 @@
<arg line="--precompilejsp=${precompilejsp}"/>
<arg line="--force=${force}"/>
<arg line="--upload=true"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${assemble.dir}/${appname}-web.war"/>
</exec>
</target>
@@ -1300,10 +1300,10 @@
<arg line="deploy"/>
<arg line="${as.props}"/>
<arg line="--upload=true"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${assemble.dir}/${appname}-ejb.jar"/>
</exec>
-</target>
+</target>
<!-- deploy the standalone jar in AppServ -->
<target name="deploy-client-common" depends="init-common">
@@ -1311,11 +1311,11 @@
<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}/${appname}-client.jar"/>
</exec>
-</target>
+</target>
<target name="undeploy-war-name" depends="init-common">
<property name="deployedapp.name" value="${warname}"/>
@@ -1337,27 +1337,27 @@
<exec executable="${ASADMIN}" failonerror="false">
<arg line="undeploy"/>
<arg line="${as.props}"/>
-<!--
-<arg line=type ${apptype}/>
+<!--
+<arg line=type ${apptype}/>
-->
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${extra-params}"/>
<!-- deployedapp.name defaults to {appname}App.declared in properties.xml-->
- <arg line="${deployedapp.name}"/>
+ <arg line="${deployedapp.name}"/>
</exec>
</target>
<!-- undeploy the standalone war in AppServ -->
<target name="undeploy-war-common" depends="init-common">
- <echo message="Undeploying warfile ${appname}-web from
+ <echo message="Undeploying warfile ${appname}-web from
${assemble.dir}/${appname}-web.war from ${basedir}." level="verbose"/>
<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="${appname}-web"/>
</exec>
-</target>
+</target>
<target name="undeploy-war-instance" depends="init-common">
<echo message="Undeploying warfile ${appname}-web from
@@ -1375,7 +1375,7 @@
<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="${appname}-ejb"/>
</exec>
</target>
@@ -1385,10 +1385,10 @@
<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="${appname}-client"/>
</exec>
-</target>
+</target>
<!-- run appclient in AppServ -->
@@ -1431,11 +1431,11 @@
<arg value="${testsuite.id}"/>
</java>
</target>
-
+
<!-- prepare Pointbase servers -->
<target name="preparePB" depends="init-common">
<echo message="Starting Pointbase servers" level="verbose"/>
- <copy file="${env.APS_HOME}/lib/pointbase.ini"
+ <copy file="${env.APS_HOME}/lib/pointbase.ini"
tofile="${db.dir}/pointbase.ini"/>
<replace file="${db.dir}/pointbase.ini" token="@@@" value="${db.dir}"/>
</target>
@@ -1458,12 +1458,12 @@
<!-- target name="startPB" depends="preparePB">
<parallel>
- <java classname="com.pointbase.net.netServer"
+ <java classname="com.pointbase.net.netServer"
classpath="${db.classpath}" failonerror="false" fork="true">
<arg line="/port:9092"/>
<arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
</java>
- <java classname="com.pointbase.net.netServer"
+ <java classname="com.pointbase.net.netServer"
classpath="${db.classpath}" failonerror="true" fork="true">
<arg line="/port:9093"/>
<arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
@@ -1483,7 +1483,7 @@
<!-- start Derby Database -->
<target name="startDerby">
<condition property="darwin">
- <os name="Mac OS X"/>
+ <os name="Mac OS X"/>
</condition>
<antcall target="startDerbyNonMac"/>
<antcall target="startDerbyMac"/>
@@ -1500,7 +1500,7 @@
classpath="${db.classpath}" fork="true" spawn="true">
<arg line="-h localhost -p ${db.port.2} start"/>
</java>
- </parallel>
+ </parallel>
</target>
<target name="startDerbyMac" depends="init-common" if="darwin">
@@ -1513,7 +1513,7 @@
</java>
<java classname="org.apache.derby.drda.NetworkServerControl"
classpath="${db.classpath}" fork="true" spawn="true">
- <sysproperty key="derby.storage.fileSyncTransactionLog" value="true"/>
+ <sysproperty key="derby.storage.fileSyncTransactionLog" value="true"/>
<arg line="-h localhost -p ${db.port.2} start"/>
</java>
</parallel>
@@ -1541,10 +1541,10 @@
<!-- setup IMQ for RI Build -->
<target name="setup-mq-common" depends="init-common">
- <echo message="Executing Datastore setup for S1MQ. Required only for RI"
+ <echo message="Executing Datastore setup for S1MQ. Required only for RI"
level="verbose"/>
- <echo message="${IMQDBMGR} -javahome ${java.home}
- -b ${admin.domain}_${appserver.instance.name} create all"
+ <echo message="${IMQDBMGR} -javahome ${java.home}
+ -b ${admin.domain}_${appserver.instance.name} create all"
level="verbose"/>
<exec executable="${IMQDBMGR}" failonerror="true">
<arg line="-javahome ${java.home} -b ${admin.domain}_${appserver.instance.name} create all" />
@@ -1605,13 +1605,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>
@@ -1637,13 +1637,13 @@
<target name="restart-instance">
<echo message="Restarting remote server instance,until this gets fixed"/>
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="stop-instance"/>
<arg line="${as.props}"/>
<arg line="${appserver.instance.name}"/>
</exec>
<sleep seconds="30"/>
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="start-instance"/>
<arg line="${as.props}"/>
<arg line="${appserver.instance.name}"/>
@@ -1666,7 +1666,7 @@
</target>
<target name="setupTimer" depends="init-common" if="ee">
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="create-resource-ref"/>
<arg line="${as.props}"/>
<arg line="--target server"/>
@@ -1693,13 +1693,13 @@
</target>
<target name="unsetupTimer" depends="init-common" if="ee">
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="delete-resource-ref"/>
<arg line="${as.props}"/>
<arg line="--target server"/>
<arg line="${jdbc.resource.name}"/>
</exec>
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="unset"/>
<arg line="${appserver.instance.name}-config.ejb-container.ejb-timer-service.timer-datasource"/>
</exec>
@@ -1892,7 +1892,7 @@
<!-- Target to Flush connection pool -->
<!-- ================================================================ -->
<target name="flush-connpool-common" depends="init-common">
-<echo message="Flush connection pool ${jdbc.conpool.name}"
+<echo message="Flush connection pool ${jdbc.conpool.name}"
level="verbose"/>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="flush-connection-pool"/>
@@ -1906,7 +1906,7 @@
<!-- Target to create password alias -->
<!-- ================================================================ -->
<target name="create-password-alias" depends="init-common">
-<echo message="Create Password Alias ${alias.name}"
+<echo message="Create Password Alias ${alias.name}"
level="verbose"/>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="create-password-alias"/>
@@ -1921,7 +1921,7 @@
<!-- Target to delete password alias -->
<!-- ================================================================ -->
<target name="delete-password-alias" depends="init-common">
-<echo message="delete Password Alias ${password.alias.name}"
+<echo message="delete Password Alias ${password.alias.name}"
level="verbose"/>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="delete-password-alias"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/config/ee-common.xml b/appserver/tests/v2-tests/appserv-tests/config/ee-common.xml
index aa04987..2ef82f6 100644
--- a/appserver/tests/v2-tests/appserv-tests/config/ee-common.xml
+++ b/appserver/tests/v2-tests/appserv-tests/config/ee-common.xml
@@ -66,7 +66,7 @@
<target name="start-nodeagent-common" depends="init-common">
<echo message="Starting nodeagent ${nodeagent.name}" level="verbose"/>
<antcall target="asadmin-common-ignore-fail">
- <param name="admin.command"
+ <param name="admin.command"
value="start-node-agent
--user ${admin.user}
--passwordfile ${admin.password.file}
@@ -107,7 +107,7 @@
<target name="stop-nodeagent-common" depends="init-common">
<echo message="Stopping nodeagent ${nodeagent.name}" level="verbose"/>
<antcall target="asadmin-common-ignore-fail">
- <param name="admin.command"
+ <param name="admin.command"
value="stop-node-agent" />
<param name="as.props" value=""/>
<param name="operand.props"
@@ -121,7 +121,7 @@
<target name="create-cluster-common" depends="init-common">
<echo message="Creating cluster ${cluster.name}" level="verbose"/>
<antcall target="asadmin-common-ignore-fail">
- <param name="admin.command"
+ <param name="admin.command"
value="create-cluster" />
<param name="operand.props"
value="${cluster.name}" />
@@ -146,7 +146,7 @@
<target name="start-cluster-common" depends="init-common">
<echo message="Starting cluster ${cluster.name}" level="verbose"/>
<antcall target="asadmin-common-ignore-fail">
- <param name="admin.command"
+ <param name="admin.command"
value="start-cluster" />
<param name="operand.props"
value="${cluster.name}" />
@@ -159,7 +159,7 @@
<target name="stop-cluster-common" depends="init-common">
<echo message="Stopping cluster ${cluster.name}" level="verbose"/>
<antcall target="asadmin-common-ignore-fail">
- <param name="admin.command"
+ <param name="admin.command"
value="stop-cluster" />
<param name="operand.props"
value="${cluster.name}" />
@@ -315,9 +315,9 @@
<param name="orb.listener1.port" value="${orb.listener1.port.two}"/>
<param name="ssl.port" value="${ssl.port.two}"/>
<param name="ssl.mutualauth.port" value="${ssl.mutualauth.port.two}"/>
- <param name="jmx.system.connector.port"
+ <param name="jmx.system.connector.port"
value="${jmx.system.connector.port.two}"/>
- <param name="clustered.server.name"
+ <param name="clustered.server.name"
value="${clustered.server.name.two}"/>
</antcall>
</target>
@@ -345,7 +345,7 @@
<!-- ================================================================ -->
<target name="remove-default-cluster-common" depends="init-common">
<antcall target="delete-clustered-instance-common">
- <param name="clustered.server.name"
+ <param name="clustered.server.name"
value="${clustered.server.name.two}"/>
</antcall>
<antcall target="delete-clustered-instance-common"/>
@@ -499,10 +499,10 @@
<!-- ================================================================ -->
<target name="eesetup-ant" depends="env-ee">
<echo file="${admin.password.file}" append="false">
- AS_ADMIN_USERPASSWORD=${password}
- AS_ADMIN_PASSWORD=${admin.password}
- AS_ADMIN_ADMINPASSWORD=${admin.password}
- AS_ADMIN_MASTERPASSWORD=${master.password}
+ AS_ADMIN_USERPASSWORD=${password}
+ AS_ADMIN_PASSWORD=${admin.password}
+ AS_ADMIN_ADMINPASSWORD=${admin.password}
+ AS_ADMIN_MASTERPASSWORD=${master.password}
</echo>
<antcall target="createDomain"/>
<antcall target="startDomain">
@@ -511,7 +511,7 @@
<antcall target="create-nodeagent-common"/>
<antcall target="create-instance-common"/>
<antcall target="start-nodeagent"/>
- <sleep seconds="30"/>
+ <sleep seconds="30"/>
<echo message="Done eesetup-ant!"/>
</target>
@@ -570,7 +570,7 @@
<arg line="--echo=true --terse=true" />
<arg line="--domaindir ${admin.domain.dir}"/>
<arg line="--adminport ${admin.port}"/>
- <arg line="--instanceport ${admin.http.port}"/>
+ <arg line="--instanceport ${admin.http.port}"/>
<arg line="--adminuser ${admin.user}"/>
<arg line="--passwordfile ${admin.password.file}"/>
<arg line="${admin.domain}"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/config/emma.xml b/appserver/tests/v2-tests/appserv-tests/config/emma.xml
index 41f2273..2f643fe 100644
--- a/appserver/tests/v2-tests/appserv-tests/config/emma.xml
+++ b/appserver/tests/v2-tests/appserv-tests/config/emma.xml
@@ -58,7 +58,7 @@
<available file="${glassfish-zip-file}" type="file" />
<antversion atleast="1.8"/>
</and>
- </condition>
+ </condition>
<fail message="Please make sure ant version is 1.8 or higher, emma.enabled property is set, and environment variable GLASSFISH_ZIP_FILE is exported.">
<condition>
<not>
@@ -74,7 +74,7 @@
<mkdir dir="${coverage.dir}"/>
<copy file="${emma.lib.dir}/${emma.jar.name}" todir="${glassfish.server.dir}/domains/domain1/lib/ext/" overwrite="true" />
</target>
-
+
<target name="emma.instrument" depends="emma.init" if="emma.prerequsite.met" description="Instrument Classes With EMMA">
<property name="original.jar.dir" value="${glassfish.server.dir}/modules" />
<echo>[EMMA] : Start to instrument the JAR files under ${original.jar.dir}/.</echo>
@@ -143,7 +143,7 @@
<include name="**/*.em" />
<include name="**/*.ec" />
</fileset>
- <html outfile="${coverage.dir}/coverage.html"
+ <html outfile="${coverage.dir}/coverage.html"
columns="name,class,method,block,line"
depth="method"
/>
diff --git a/appserver/tests/v2-tests/appserv-tests/config/javaws.xml b/appserver/tests/v2-tests/appserv-tests/config/javaws.xml
index 8adf400..8d414e0 100644
--- a/appserver/tests/v2-tests/appserv-tests/config/javaws.xml
+++ b/appserver/tests/v2-tests/appserv-tests/config/javaws.xml
@@ -130,17 +130,17 @@
</sequential>
</macrodef>
-
-
+
+
<!--
For the SQE framework, launches the app client using Java Web Start.
-->
<target name="launch-appclient-javaws" if="use.javaws">
-
+
<echo message="Launching app client using Java Web Start"/>
-
+
<tempfile property="clientOutputFile" prefix="appclient" suffix=".txt"/>
-
+
<prepare-javaws-security/>
<!--
Choose the output file.
@@ -179,7 +179,7 @@
<sysproperty key="appname" value="${appname}"/>
<sysproperty key="clientname" value="${clientname}"/>
</java>
-
+
<!--
Now launch the client.
-->
@@ -201,7 +201,7 @@
<available file="${javaws.status.file}"/>
</waitfor>
<echo>Java Web Start launch finished</echo>
-
+
<!--
Read the output file into a property, echo the output to the
output so any human watching can see it, and then check the
@@ -212,15 +212,15 @@
</loadresource>
<echo file="${clientOutputFile}" message="${launchOutput}"/>
-
+
<echo message="${launchOutput}"/>
-
+
<antcall target="checkReporting-common">
<param name="test.name" value="${appname}"/>
<param name="test.description" value="${test.description}"/>
<param name="test.count" value="${test.count}"/>
</antcall>
-
+
<delete file="${javaws.report.file}"/>
<delete file="${javaws.status.file}"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/config/mail.xml b/appserver/tests/v2-tests/appserv-tests/config/mail.xml
index 8dc876b..bd6ab7c 100644
--- a/appserver/tests/v2-tests/appserv-tests/config/mail.xml
+++ b/appserver/tests/v2-tests/appserv-tests/config/mail.xml
@@ -20,19 +20,19 @@
<property name="results.mailee" value="" />-->
<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="${results.mailhost}"
- message="Quick Look test results..."
- failonerror="false">
- <fileset dir="${env.APS_HOME}"
+ <mail from="${results.mailer}" tolist="${results.mailee}"
+ subject="Test results for ${machine.config}"
+ mailhost="${results.mailhost}"
+ message="Quick Look test results..."
+ failonerror="false">
+ <fileset dir="${env.APS_HOME}"
includes="count.txt,test_results.html"/>
- </mail>
+ </mail>
</target>
<target name="copyMailJars">
<echo message="Copying mail jars into $ANT_HOME/lib"/>
<copy todir="${env.S1AS_HOME}/lib/ant/lib" overwrite="true" verbose="true">
- <fileset dir="${env.S1AS_HOME}/lib"
+ <fileset dir="${env.S1AS_HOME}/lib"
includes="activation.jar,mail.jar"/>
</copy>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/config/properties.xml b/appserver/tests/v2-tests/appserv-tests/config/properties.xml
index 43630d2..09927fa 100644
--- a/appserver/tests/v2-tests/appserv-tests/config/properties.xml
+++ b/appserver/tests/v2-tests/appserv-tests/config/properties.xml
@@ -19,10 +19,10 @@
<property environment="env"/>
<target name="init-common" depends="setToolProperty,setS1ASclassPath">
<!-- Appserver setup properties -->
-<echo message="Loading props from file ${env.APS_HOME}/config.properties"
+<echo message="Loading props from file ${env.APS_HOME}/config.properties"
level="verbose"/>
<property name="pe" value="Platform Edition of S1AS"/>
- <property file="${env.APS_HOME}/config.properties"/>
+ <property file="${env.APS_HOME}/config.properties"/>
<echo message="admin.domain ${admin.domain}" level="verbose"/>
<echo message="admin.user ${admin.user}" level="verbose"/>
<echo message="admin.port ${admin.port}" level="verbose"/>
@@ -67,21 +67,21 @@
<property name="appclient.application.args" value="" />
<!-- Test Harnes properties -->
- <property name="build.base.dir"
+ <property name="build.base.dir"
value="${env.APS_HOME}/build/module"/>
- <property name="build.webapps.dir"
+ <property name="build.webapps.dir"
value="${env.APS_HOME}/build/wars"/>
- <property name="build.classes.dir"
+ <property name="build.classes.dir"
value="${build.base.dir}/classes"/>
- <property name="assemble.dir"
+ <property name="assemble.dir"
value="${build.base.dir}/archive"/>
- <property name="results.dir"
+ <property name="results.dir"
value="${build.base.dir}/results"/>
<property name="s1astest.classpath"
value="${build.classes.dir}:${env.APS_HOME}/lib/reporter.jar:${s1as.classpath}:${db.classpath}:${Derby.classpath}"/>
- <property name="ejbjar.classes"
+ <property name="ejbjar.classes"
value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Bean*.class" />
- <property name="appclientjar.classes"
+ <property name="appclientjar.classes"
value="**/*Local*.class,**/*Home*.class,**/*Remote*.class,**/*Client*.class" />
<property name="webclient.war.files"
value="${build.classes.dir}"/>
@@ -119,20 +119,20 @@
<fileset dir="${env.S1AS_HOME}/modules" includes="**/*.jar"/>
<!-- fileset dir="${env.S1AS_HOME}/imq/lib" includes="*.jar"/ -->
</path>
- <pathconvert pathsep=":"
- property="s1as.classpath"
+ <pathconvert pathsep=":"
+ property="s1as.classpath"
refid="s1as_classpath_jars"/>
</target>
-<target name="setToolProperty"
+<target name="setToolProperty"
depends="setOSConditions,setToolWin,setToolUnix">
</target>
<!--
- This was needed to make sure that we can
- differentiate between .exe/.bat for windows and .sh for solaris.
+ This was needed to make sure that we can
+ differentiate between .exe/.bat for windows and .sh for solaris.
-->
-<target name="setOSConditions">
+<target name="setOSConditions">
<condition property="isUnix">
<os family="unix"/>
</condition>
@@ -142,16 +142,16 @@
</condition>
</target>
-<target name="setToolWin" if="isWindows">
+<target name="setToolWin" if="isWindows">
<!--
- Some tests launch app clients by directly running the appclient script,
+ Some tests launch app clients by directly running the appclient script,
using the APPCLIENT property. Others do so by invoking the
- runclient-common target.
-
+ runclient-common target.
+
We use the test script (not appclient) if the user wants to launch
app clients using Java Web Start.
-->
- <condition property="APPCLIENT"
+ <condition property="APPCLIENT"
value="${env.APS_HOME}/config/jws-appclient.bat"
else="${env.S1AS_HOME}/bin/appclient.bat">
<isset property="use.javaws"/>
@@ -159,13 +159,13 @@
<property name="ASADMIN" value="${env.S1AS_HOME}/bin/asadmin.bat"/>
<!--<property name="ASADMIN" value="${env.S1AS_HOME}/bin/asadmin"/>-->
<property name="ASANT" value="${env.S1AS_HOME}/bin/asant.bat"/>
- <property name="CAPTURESCHEMA"
+ <property name="CAPTURESCHEMA"
value="${env.S1AS_HOME}/bin/capture-schema.bat"/>
<property name="CHECKPATCH" value="${env.S1AS_HOME}/bin/checkpatch.bat"/>
<property name="INSTALLPATCH" value="${env.S1AS_HOME}/bin/installpatch.bat"/>
<property name="JSPC" value="${env.S1AS_HOME}/bin/jspc.bat"/>
<property name="LISTPATCH" value="${env.S1AS_HOME}/bin/listpatch.bat"/>
- <property name="PACKAGE-APPCLIENT"
+ <property name="PACKAGE-APPCLIENT"
value="${env.S1AS_HOME}/bin/package-appclient.bat"/>
<property name="VERIFIER" value="${env.S1AS_HOME}/bin/verifier.bat"/>
<property name="RMIC" value="${env.S1AS_HOME}/jdk/bin/rmic.exe"/>
@@ -174,17 +174,17 @@
<property name="WSCOMPILE" value="${env.S1AS_HOME}/bin/wscompile.bat"/>
<property name="WSGEN" value="${env.S1AS_HOME}/bin/wsgen.bat"/>
<property name="WSIMPORT" value="${env.S1AS_HOME}/bin/wsimport.bat"/>
- <property name="pb.start.server"
+ <property name="pb.start.server"
value="${env.S1AS_HOME}/pointbase/server/StartServer.bat"/>
- <property name="pb.start.server1"
+ <property name="pb.start.server1"
value="${env.S1AS_HOME}/pointbase/server/StartServer1.bat"/>
<property name="IMQDBMGR" value="${env.S1AS_HOME}/imq/bin/imqdbmgr.bat"/>
<property name="ld.library.path" location="${env.S1AS_HOME}/lib;${env.S1AS_HOME}/bin"/>
</target>
-<target name="setToolUnix" if="isUnix">
- <condition property="APPCLIENT"
- value="${env.APS_HOME}/config/jws-appclient"
+<target name="setToolUnix" if="isUnix">
+ <condition property="APPCLIENT"
+ value="${env.APS_HOME}/config/jws-appclient"
else="${env.S1AS_HOME}/bin/appclient">
<isset property="use.javaws"/>
</condition>
@@ -195,7 +195,7 @@
<property name="INSTALLPATCH" value="${env.S1AS_HOME}/bin/installpatch"/>
<property name="JSPC" value="${env.S1AS_HOME}/bin/jspc"/>
<property name="LISTPATCH" value="${env.S1AS_HOME}/bin/listpatch"/>
- <property name="PACKAGE-APPCLIENT"
+ <property name="PACKAGE-APPCLIENT"
value="${env.S1AS_HOME}/bin/package-appclient"/>
<property name="VERIFIER" value="${env.S1AS_HOME}/bin/verifier"/>
<property name="RMIC" value="${env.S1AS_HOME}/jdk/bin/rmic"/>
@@ -203,16 +203,16 @@
<property name="WSCOMPILE" value="${env.S1AS_HOME}/bin/wscompile"/>
<property name="WSGEN" value="${env.S1AS_HOME}/bin/wsgen"/>
<property name="WSIMPORT" value="${env.S1AS_HOME}/bin/wsimport"/>
- <property name="pb.start.server"
+ <property name="pb.start.server"
value="${env.S1AS_HOME}/pointbase/server/StartServer"/>
- <property name="pb.start.server1"
+ <property name="pb.start.server1"
value="${env.S1AS_HOME}/pointbase/server/StartServer1"/>
<property name="IMQDBMGR" value="${env.S1AS_HOME}/imq/bin/imqdbmgr"/>
<property name="ld.library.path" location="${env.S1AS_HOME}/lib:${env.S1AS_HOME}/bin"/>
</target>
<!--
-the fixFiles target removes all ^M charectars from the end of
+the fixFiles target removes all ^M charectars from the end of
lines of MANIFEST.MF files since they are very sensitive to it.
-->
<target name="fixFiles" depends="setOSConditions" >
diff --git a/appserver/tests/v2-tests/appserv-tests/config/report.xml b/appserver/tests/v2-tests/appserv-tests/config/report.xml
index ff73b3f..e9938d7 100644
--- a/appserver/tests/v2-tests/appserv-tests/config/report.xml
+++ b/appserver/tests/v2-tests/appserv-tests/config/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/v2-tests/appserv-tests/config/run.xml b/appserver/tests/v2-tests/appserv-tests/config/run.xml
index a7ab7e8..bfabe15 100644
--- a/appserver/tests/v2-tests/appserv-tests/config/run.xml
+++ b/appserver/tests/v2-tests/appserv-tests/config/run.xml
@@ -33,10 +33,10 @@
</or>
</waitfor>
<antcall target="${target-to-run}"/>
- <antcall target="report"/>
- <antcall target="mail"/>
+ <antcall target="report"/>
+ <antcall target="mail"/>
<!--
- <antcall target="stopAS"/>
+ <antcall target="stopAS"/>
-->
</sequential>
</parallel>
@@ -96,7 +96,7 @@
<filterchain>
<linecontains>
<contains value="ASMain"/>
- <contains value="${env.S1AS_HOME}"/>
+ <contains value="${env.S1AS_HOME}"/>
</linecontains>
<tokenfilter>
<replaceregex pattern="^(\d+) ASMain (.*)" replace="\1"/>
@@ -157,17 +157,17 @@
<target name="restart-instance-common">
<echo message="Restarting remote server instance,until this gets fixed"/>
- <exec executable="${ASADMIN}" failonerror="false">
- <arg line="stop-instance"/>
- <arg line="${as.props}"/>
- <arg line="${appserver.instance.name}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="stop-instance"/>
+ <arg line="${as.props}"/>
+ <arg line="${appserver.instance.name}"/>
</exec>
<sleep seconds="30"/>
- <exec executable="${ASADMIN}" failonerror="false">
- <arg line="start-instance"/>
- <arg line="${as.props}"/>
- <arg line="${appserver.instance.name}"/>
+ <exec executable="${ASADMIN}" failonerror="false">
+ <arg line="start-instance"/>
+ <arg line="${as.props}"/>
+ <arg line="${appserver.instance.name}"/>
</exec>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/config/stopPB.sh b/appserver/tests/v2-tests/appserv-tests/config/stopPB.sh
index f2c8b44..bef7c36 100644
--- a/appserver/tests/v2-tests/appserv-tests/config/stopPB.sh
+++ b/appserver/tests/v2-tests/appserv-tests/config/stopPB.sh
@@ -30,18 +30,18 @@
if [ $OS = "win32" ]; then
for x in `ps|grep "startPB"|cut -d' ' -f 2`
do
- echo "killing startPB process with processid: $x";
+ echo "killing startPB process with processid: $x";
kill -9 $x
done
for x in `ps|grep "pointbase"|cut -d' ' -f 2`
do
- echo "killing pointbase process with processid: $x";
+ echo "killing pointbase process with processid: $x";
kill -9 $x
done
else
for x in `ps -ef|grep "java"|cut -d' ' -f 3`
do
- echo "killing java process with processid: $x";
+ echo "killing java process with processid: $x";
kill -9 $x
done
fi
diff --git a/appserver/tests/v2-tests/appserv-tests/copyofparent/build.xml b/appserver/tests/v2-tests/appserv-tests/copyofparent/build.xml
index 2378ddc..c116719 100644
--- a/appserver/tests/v2-tests/appserv-tests/copyofparent/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/copyofparent/build.xml
@@ -35,7 +35,7 @@
&run;
&mail;
- <target name="all">
+ <target name="all">
<antcall target="sqetests"/>
</target>
@@ -68,8 +68,8 @@
<ant dir="sqetests" target="run-eesqe-target"/>
<antcall target="stopee"/>
<antcall target="stopDerby"/>
- <antcall target="create-report"/>
- <antcall target="mail"/>
+ <antcall target="create-report"/>
+ <antcall target="mail"/>
<antcall target="report-java"/>
<record name="runtest.output" action="stop"/>
<record name="appserv-tests.log" action="stop"/>
@@ -118,7 +118,7 @@
Executing web/subclassing [Total :3]
===========================================
</echo>
-
+
</target>
<target name="sqetests">
@@ -130,11 +130,11 @@
<target name="setupMQ" depends="setup-mq-common" />
<target name="usage">
- <echo>
- Usage:
- ant sqetests (Executes all sqetests tests)
- ant all (Executes all sqetests)
+ <echo>
+ Usage:
+ ant sqetests (Executes all sqetests tests)
+ ant all (Executes all sqetests)
ant show-list (Lists all test suites)
- </echo>
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/copyofparent/run.sh b/appserver/tests/v2-tests/appserv-tests/copyofparent/run.sh
index 5b3567b..d127fc7 100644
--- a/appserver/tests/v2-tests/appserv-tests/copyofparent/run.sh
+++ b/appserver/tests/v2-tests/appserv-tests/copyofparent/run.sh
@@ -114,7 +114,7 @@
elif [ "$1" = "all" ]; then
TEST_TARGET="all";
else
- usage;
+ usage;
fi
echo "granting permissions...";
echo "grant codeBase \"file:${APS_HOME}/-\" {permission java.security.AllPermission;};" >> $S1AS_HOME/lib/appclient/client.policy;
diff --git a/appserver/tests/v2-tests/appserv-tests/copyofparent/start-domain.sh b/appserver/tests/v2-tests/appserv-tests/copyofparent/start-domain.sh
index 787ba64..6460d20 100644
--- a/appserver/tests/v2-tests/appserv-tests/copyofparent/start-domain.sh
+++ b/appserver/tests/v2-tests/appserv-tests/copyofparent/start-domain.sh
@@ -24,7 +24,7 @@
then
AS_ADMIN_USER=`echo $x |cut -d'=' -f2`
fi
-
+
if [ $varval = "admin.password" ];
then
AS_ADMIN_PASSWORD=`echo $x |cut -d'=' -f2`
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/VersionPrinter.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/VersionPrinter.java
index 262e2be..f9e2a23 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/VersionPrinter.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/VersionPrinter.java
@@ -20,12 +20,12 @@
public static void main(final String[] arg) {
try {
- System.out.println("Full Version: " + Version.getFullVersion());
- System.out.println("Abbreviated Version: " + Version.getAbbreviatedVersion());
- System.out.println("Build Version: " + Version.getBuildVersion());
- System.out.println("Major Version: " + Version.getMajorVersion());
- System.out.println("Minor Version: " + Version.getMinorVersion());
- System.out.println("Product Name: " + Version.getProductName());
+ System.out.println("Full Version: " + Version.getFullVersion());
+ System.out.println("Abbreviated Version: " + Version.getAbbreviatedVersion());
+ System.out.println("Build Version: " + Version.getBuildVersion());
+ System.out.println("Major Version: " + Version.getMajorVersion());
+ System.out.println("Minor Version: " + Version.getMinorVersion());
+ System.out.println("Product Name: " + Version.getProductName());
} catch (final NoClassDefFoundError e) {
System.out.println("Please run this class as: java -cp .:{install-dir}/lib/appserv-ext.jar:${install-dir}/lib/appserv-se.jar:${install-dir}/lib/appserv-rt.jar\nwhere ${install-dir} is the installation location");
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/build.properties
index 60696ea..fd57220 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/build.properties
@@ -14,7 +14,7 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-
+
sunone.home=/export/as8pe
retrieve.directory=/export/as8pe/bin/retrieve
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/build.xml
index b7f13df..5c2b7ec 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/asant/build.xml
@@ -24,7 +24,7 @@
<!-- all -->
<target name="all" depends="deploy-rar, deploy-war, deploy-ear, deploy-retrieve, undeploy-all"/>
-<target name="deploy-rar"
+<target name="deploy-rar"
description="Deploy the Connector">
<sun-appserv-deploy
file="${rarApp.file}"
@@ -38,10 +38,10 @@
password="${admin.password}"
host="${admin.host}"
port="4848"
- sunonehome="${sunone.home}" />
-</target>
+ sunonehome="${sunone.home}" />
+</target>
-<target name="deploy-war"
+<target name="deploy-war"
description="Deploy the WebApp">
<sun-appserv-deploy
file="${warApp.file}"
@@ -55,10 +55,10 @@
password="${admin.password}"
host="${admin.host}"
port="${admin.port}"
- sunonehome="${sunone.home}" />
-</target>
+ sunonehome="${sunone.home}" />
+</target>
-<target name="deploy-ear"
+<target name="deploy-ear"
description="Deploy the earApp">
<sun-appserv-deploy
file="${earApp.file}"
@@ -72,10 +72,10 @@
password="${admin.password}"
host="${admin.host}"
port="${admin.port}"
- sunonehome="${sunone.home}" />
-</target>
+ sunonehome="${sunone.home}" />
+</target>
-<target name="deploy-retrieve"
+<target name="deploy-retrieve"
description="Deploy the EAR">
<sun-appserv-deploy
file="${retrieveApp.file}"
@@ -88,12 +88,12 @@
user="${admin.user}"
password="${admin.password}"
host="${admin.host}"
- port="${admin.port}"
- retrievestubs="${retrieve.directory}"
- sunonehome="${sunone.home}" />
-</target>
+ port="${admin.port}"
+ retrievestubs="${retrieve.directory}"
+ sunonehome="${sunone.home}" />
+</target>
-<target name="undeploy-all"
+<target name="undeploy-all"
description="Undeploy all apps">
<sun-appserv-undeploy
name="inbound"
@@ -123,6 +123,6 @@
host="${admin.host}"
port="${admin.port}"
sunonehome="${sunone.home}" />
-</target>
+</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/nbproject/build-impl.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/nbproject/build-impl.xml
index 41e9cd3..6578df0 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/nbproject/build-impl.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/nbproject/build-impl.xml
@@ -39,9 +39,9 @@
-->
<project name="JmxUtils-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1">
<target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
- <!--
+ <!--
======================
- INITIALIZATION SECTION
+ INITIALIZATION SECTION
======================
-->
<target name="-pre-init">
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/src/org/gf/jmx/utils/JustConnect.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/src/org/gf/jmx/utils/JustConnect.java
index 07ec6a0..2a75700 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/src/org/gf/jmx/utils/JustConnect.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/src/org/gf/jmx/utils/JustConnect.java
@@ -45,7 +45,7 @@
JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
System.out.println("Connected, to url: " + urls + ", connection id = " + jmxc.getConnectionId());
}
-
+
public static void main(final String[] args) throws Exception {
if (args == null || args.length != 3) {
System.err.println("Usage: java org.jm.jmx.utils.JustConnect jmxserviceurl username password" +
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/src/org/gf/jmx/utils/ReadMe.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/src/org/gf/jmx/utils/ReadMe.java
index 4755250..265874e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/src/org/gf/jmx/utils/ReadMe.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/debug/JmxUtils/src/org/gf/jmx/utils/ReadMe.java
@@ -30,7 +30,7 @@
* @author Administrator
*/
public class ReadMe {
-
+
private ReadMe() {
}
public static void main(final String args[]) {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/build.xml
index 71a3fa7..9fb856b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/build.xml
@@ -17,7 +17,7 @@
-->
-<project name="Admin Framework Devtests" default="all" basedir=".">
+<project name="Admin Framework Devtests" default="all" basedir=".">
<!-- ========== Initialize Properties =================================== -->
@@ -29,7 +29,7 @@
<pathelement location="${appserv-admin.jar}"/>
<pathelement location="${j2ee.jar}"/>
<pathelement location="${junit.jar}"/>
- </path>
+ </path>
<path id="test.run.classpath">
<pathelement location="${tests.workfiles.dir}/testserverbeans.jar"/>
<pathelement location="${component.tests.classes.dir}"/>
@@ -39,11 +39,11 @@
<!-- init. Initialization involves creating publishing directories and
- OS specific targets. -->
+ OS specific targets. -->
<target name="init-tests" description="${component.name} initialization">
<tstamp>
<format property="start.time" pattern="MM/dd/yyyy hh:mm aa"/>
- </tstamp>
+ </tstamp>
<echo message="Building component ${component.name}"/>
<mkdir dir="${component.tests.classes.dir}"/>
<delete dir="${tests.workfiles.dir}"/>
@@ -68,11 +68,11 @@
<target name="compile-tests">
<echo message="Compiling {component.name}"/>
- <javac srcdir="${testsrc.dir}"
+ <javac srcdir="${testsrc.dir}"
destdir="${component.tests.classes.dir}"
- debug="${javac.debug}"
+ debug="${javac.debug}"
optimize="${javac.optimize}"
- source="${javac.source}"
+ source="${javac.source}"
deprecation="${javac.deprecation}"
failonerror="true"
classpathref="test.compile.classpath">
@@ -80,14 +80,14 @@
<!-- <include name="**/*Test.java"/>
<include name="**/*Tests.java"/> -->
</javac>
-
+
</target>
<target name="run-tests" depends="init-tests,compile-tests">
- <java fork="true" failonerror="true"
+ <java fork="true" failonerror="true"
classname="com.sun.enterprise.admin.AdminInfraTest" >
-<!-- <jvmarg value="-Djcov.file=${jcov.file}"/>
+<!-- <jvmarg value="-Djcov.file=${jcov.file}"/>
-->
<arg line="-testpath ${tests.workfiles.dir}" />
<classpath refid="test.run.classpath"/>
@@ -99,17 +99,17 @@
<fileset dir="${tests.workfiles.dir}/samples" includes="*"/>
<fileset dir="${testfiles.dir}/samples" includes="*"/>
</delete>
- <java fork="true" failonerror="true"
+ <java fork="true" failonerror="true"
classname="com.sun.enterprise.admin.AdminInfraTest" >
<!--
- <jvmarg value="-Xdebug"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009"/>
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009"/>
<jvmarg value="-Djcov.server_port=3330"/>
<jvmarg value="-Xbootclasspath/p:/export/ias/sqe-pe/codecoverage/jcov/lib/jcov.jar"/>
-->
<arg line="-testpath ${tests.workfiles.dir} create" />
- <classpath refid="test.run.classpath"/>
+ <classpath refid="test.run.classpath"/>
</java>
<copy todir="${testfiles.dir}">
<fileset dir="${tests.workfiles.dir}" includes="samples/*"/>
@@ -117,14 +117,14 @@
</target>
<target name="run-tests-print" depends="init-tests,compile-tests">
- <java fork="true" failonerror="true"
+ <java fork="true" failonerror="true"
classname="com.sun.enterprise.admin.AdminInfraTest" >
<arg line="-testpath ${tests.workfiles.dir} print" />
<!--
- <jvmarg value="-Xdebug"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044"/>
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=1044"/>
-->
- <classpath refid="test.run.classpath"/>
+ <classpath refid="test.run.classpath"/>
</java>
</target>
@@ -146,4 +146,4 @@
</target>
</project>
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/descriptors.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/descriptors.xml
index 909a560..d449f2f 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/descriptors.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testfiles/descriptors.xml
@@ -53,7 +53,7 @@
<!-- +++++++++ 4. j2ee-application +++++++++++ -->
<mbean name="j2ee-application" group="config" >
<descriptor>
- <field name="elementChangeEvent" value="ApplicationDeployEvent" />
+ <field name="elementChangeEvent" value="ApplicationDeployEvent" />
<field name="ObjectName" value="{0}:type=j2ee-application,name={1},category=config" />
<field name="xpath" value="/domain/applications/j2ee-application[@name='{1}']" />
<field name="CLIName" value="domain.applications.j2ee-application.{1}" />
@@ -62,7 +62,7 @@
<!-- +++++++++ 5. ejb-module +++++++++++ -->
<mbean name="ejb-module" group="config" >
<descriptor>
- <field name="elementChangeEvent" value="ModuleDeployEvent" />
+ <field name="elementChangeEvent" value="ModuleDeployEvent" />
<field name="ObjectName" value="{0}:type=ejb-module,name={1},category=config" />
<field name="xpath" value="/domain/applications/ejb-module[@name='{1}']" />
<field name="CLIName" value="domain.applications.ejb-module.{1}" />
@@ -71,7 +71,7 @@
<!-- +++++++++ 6. web-module +++++++++++ -->
<mbean name="web-module" group="config" >
<descriptor>
- <field name="elementChangeEvent" value="ModuleDeployEvent" />
+ <field name="elementChangeEvent" value="ModuleDeployEvent" />
<field name="ObjectName" value="{0}:type=web-module,name={1},category=config" />
<field name="xpath" value="/domain/applications/web-module[@name='{1}']" />
<field name="CLIName" value="domain.applications.web-module.{1}" />
@@ -80,7 +80,7 @@
<!-- +++++++++ 7. connector-module +++++++++++ -->
<mbean name="connector-module" group="config" >
<descriptor>
- <field name="elementChangeEvent" value="ModuleDeployEvent" />
+ <field name="elementChangeEvent" value="ModuleDeployEvent" />
<field name="ObjectName" value="{0}:type=connector-module,name={1},category=config" />
<field name="xpath" value="/domain/applications/connector-module[@name='{1}']" />
<field name="CLIName" value="domain.applications.connector-module.{1}" />
@@ -89,14 +89,14 @@
<!-- +++++++++ 8. appclient-module +++++++++++ -->
<mbean name="appclient-module" group="config" >
<descriptor>
- <field name="elementChangeEvent" value="ModuleDeployEvent" />
+ <field name="elementChangeEvent" value="ModuleDeployEvent" />
<field name="ObjectName" value="{0}:type=appclient-module,name={1},category=config" />
<field name="xpath" value="/domain/applications/appclient-module[@name='{1}']" />
<field name="CLIName" value="domain.applications.appclient-module.{1}" />
</descriptor>
</mbean>
<!-- +++++++++ 9. resources +++++++++++ -->
-<mbean name="resources" group="config"
+<mbean name="resources" group="config"
className="com.sun.enterprise.admin.mbeans.ResourcesMBean">
<descriptor>
<field name="ObjectName" value="{0}:type=resources,category=config" />
@@ -167,7 +167,7 @@
<field name="CLIName" value="domain.resources.connector-resource.{1}" />
</descriptor>
</mbean>
-<!-- +++++++++ 17. resource-adapter-config +++++++++++ MANUALLY MODIFIED -->
+<!-- +++++++++ 17. resource-adapter-config +++++++++++ MANUALLY MODIFIED -->
<mbean name="resource-adapter-config" group="config">
<descriptor>
<field name="elementChangeEvent" value="ResourceDeployEvent" />
@@ -958,7 +958,7 @@
<!-- +++++++++ 131. nodeagent-auth-realm +++++++++++ -->
<mbean name="nodeagent-auth-realm" group="config" className="com.sun.enterprise.admin.mbeans.AuthRealmMBean">
<descriptor>
- <field name="elementChangeEvent" value="AuthRealmEvent" />
+ <field name="elementChangeEvent" value="AuthRealmEvent" />
<field name="ObjectName" value="{0}:type=auth-realm,node-agent={1},category=config" />
<field name="xpath" value="/domain/node-agents/node-agent[@name='{1}']/auth-realm" />
<field name="CLIName" value="domain.node-agent.{1}.auth-realm" />
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminInfraTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminInfraTest.java
index 91a1c39..b8290d1 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminInfraTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminInfraTest.java
@@ -57,7 +57,7 @@
private LineNumberReader _compareStream; //for COMPARE_MODE only
private AdminTester _tester; // = new AdminTester(_mode, _registry, _configContext);
-
+
public AdminInfraTest(String name) throws Exception
{
super(name);
@@ -114,7 +114,7 @@
}
TEST_DIR = args[1];
if(length>2)
- {
+ {
System.out.println("MODE="+args[2]);
if(args[2].trim().equals("print"))
_mode=2;
@@ -126,17 +126,17 @@
System.exit(result.errorCount() + result.failureCount());
}
-
+
//******************************************************************
//******************MBeanServer emulation***************************
//******************************************************************
private Object getAttribute(String onName, String attr) throws Exception
{
- mbean = _registry.instantiateConfigMBean(new ObjectName(onName), null, _configContext);
+ mbean = _registry.instantiateConfigMBean(new ObjectName(onName), null, _configContext);
return mbean.getAttribute(attr);
}
-
+
//******************************************************************
//******************T E S T S***************************************
//******************************************************************
@@ -162,28 +162,28 @@
{
runTestCase("testMBeanRegistry");
}
-
+
String[] location;
BaseAdminMBean mbean;
AttributeList attrs;
Object retObject;
-
+
public void testMBeansInstantiation() throws Exception
{
//***********************************************************************************************
location = new String[]{"testdomain", "server-config"};
- mbean = _registry.instantiateMBean("ejb-container", location, null, _configContext);
+ mbean = _registry.instantiateMBean("ejb-container", location, null, _configContext);
assertNotNull("ejb-container INSTANTIATION (type+location): mbean==null", mbean);
assertEquals("cache_resize_quantity not equal 32", mbean.getAttribute("cache_resize_quantity"), "32");
//***********************************************************************************************
- mbean = _registry.instantiateConfigMBean(new ObjectName("testdomain:type=ejb-container,config=server-config,category=config"),
- null, _configContext);
+ mbean = _registry.instantiateConfigMBean(new ObjectName("testdomain:type=ejb-container,config=server-config,category=config"),
+ null, _configContext);
assertNotNull("ejb-container INSTANTIATION (ObjectName): mbean==null", mbean);
-
+
//***********************************************************************************************
- mbean = _registry.instantiateConfigMBean(new ObjectName("testdomain:type=config,name=server-config,category=config"),
- null, _configContext);
+ mbean = _registry.instantiateConfigMBean(new ObjectName("testdomain:type=config,name=server-config,category=config"),
+ null, _configContext);
assertNotNull("config INSTANTIATION By ObjectName: mbean==null", mbean);
//_tester.testMBeansInstantiation();
//runTestCase("testMBeansInstantiation");
@@ -193,22 +193,22 @@
{
//***********************************************************************************************
location = new String[]{"testdomain", "server-config"};
- mbean = _registry.instantiateMBean("ejb-container", location, null, _configContext);
+ mbean = _registry.instantiateMBean("ejb-container", location, null, _configContext);
assertNotNull("ejb-container INSTANTIATION (type+location): mbean==null", mbean);
-
+
assertEquals("cache_resize_quantity not equal 32", mbean.getAttribute("cache_resize_quantity"), "32");
assertEquals("cache_idle_timeout_in_seconds not equal 600", mbean.getAttribute("cache_idle_timeout_in_seconds"), "600");
//enumeration
assertEquals("commit-option != B", mbean.getAttribute("commit_option"), "B");
-
- try
+
+ try
{
mbean.getAttribute("wrong_attribute");
fail("wrong_attribute did not cause exception");
} catch (AttributeNotFoundException anfe)
{
}
- try
+ try
{
//scase sensibility test
mbean.getAttribute("commit_Option");
@@ -216,7 +216,7 @@
} catch (AttributeNotFoundException anfe)
{
}
-
+
}
/* public void testMBeansCreateChild() throws Exception
@@ -226,14 +226,14 @@
{
runTestCase(new String[]{"testMBeansGettersSetters"}, "GettersSetters");
}
-
+
public void testMBeansSetAttribue() throws Exception
{
//***********************************************************************************************
location = new String[]{"testdomain", "server-config"};
- mbean = _registry.instantiateMBean("ejb-container", location, null, _configContext);
+ mbean = _registry.instantiateMBean("ejb-container", location, null, _configContext);
assertNotNull("ejb-container INSTANTIATION (type+location): mbean==null", mbean);
-
+
mbean.setAttribute(new Attribute("cache_resize_quantity", "35"));
assertEquals("cache_resize_quantity not equal 35", mbean.getAttribute("cache_resize_quantity"), "35");
mbean.setAttribute(new Attribute("cache_resize_quantity", "36"));
@@ -264,7 +264,7 @@
{
//***********************************************************************************************
location = new String[]{"testdomain", "server-config"};
- mbean = _registry.instantiateMBean("http-service", location, null, _configContext);
+ mbean = _registry.instantiateMBean("http-service", location, null, _configContext);
assertNotNull("http-service INSTANTIATION (type+location): mbean==null", mbean);
attrs = new AttributeList();
attrs.add(new Attribute("address","0.0.0.0"));
@@ -279,11 +279,11 @@
assertNotNull("createHttpListener: retObject==null", retObject);
//***********************************************************************************************
location = new String[]{"testdomain", "server-config", "test-listener"};
- mbean = _registry.instantiateMBean("http-listener", location, null, _configContext);
+ mbean = _registry.instantiateMBean("http-listener", location, null, _configContext);
assertNotNull("http-listener INSTANTIATION (type+location): mbean==null", mbean);
assertEquals("server-name attribute value is not \"empty\" as expected", mbean.getAttribute("server-name"),"");
assertNull("server-name attribute value is not null as expected", mbean.getAttribute("redirect-port"));
- _configContext.flush();
+ _configContext.flush();
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminTestException.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminTestException.java
index 5864011..8e06508 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminTestException.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminTestException.java
@@ -21,7 +21,7 @@
/**
Creates new <code>MBeanConfigException</code> without detail message.
*/
-
+
public AdminTestException(int iLine, String strLine, String sampleLine)
{
super("AdminTest Compare Exception: line=" + iLine + "\n<<" + strLine + ">>\n<<" + sampleLine + ">> {sample}" );
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminTester.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminTester.java
index 0720a1f..c6c96ca 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminTester.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/framework/testsrc/AdminTester.java
@@ -34,16 +34,16 @@
static int COMPARESAMPLES_MODE = 0;
static int CREATESAMPLES_MODE = 1;
static int PRINT_MODE = 2;
-
+
static int _mode = COMPARESAMPLES_MODE;
static String SAMPLES_DIR = "samples";
-
+
TestCase _caller;
MBeanRegistry _registry;
ConfigContext _configContext;
static PrintWriter _printStream; //for CREATESAMPLES_MODE only
static LineNumberReader _compareStream; //for COMPARE_MODE only
-
+
public AdminTester(TestCase caller, int mode, MBeanRegistry registry, ConfigContext configContext, String testpath)
{
_caller = caller;
@@ -68,7 +68,7 @@
_printStream.println(str);
else if(_mode==PRINT_MODE)
System.out.println(str);
- if(_mode==COMPARESAMPLES_MODE)
+ if(_mode==COMPARESAMPLES_MODE)
{
if(_compareStream==null)
{
@@ -88,13 +88,13 @@
{
println("\n\n************* " + str + " *******************");
}
-
+
public static void printObj(String title, String pref, Object obj) throws Exception
{
println(title);
printObj(pref, obj);
}
-
+
public static void printObj(String pref, Object obj) throws Exception
{
if(pref==null)
@@ -144,20 +144,20 @@
{
printObj(title, pref, mbean.getAttributes(new String[]{""}));
}
-
+
public static void printAllProperties(String title, String pref, DynamicMBean mbean) throws Exception
{
- Object ret = mbean.invoke("getProperties", null, null);
+ Object ret = mbean.invoke("getProperties", null, null);
// retObject = mbean.invoke("deployApplication", new Object[]{"testName", "testLocation", null, null, null}, new String[]{"java.lang.String", "java.lang.String", "java.lang.String", "java.lang.String", "java.lang.String"});
printObj(title, pref, ret);
}
public static Object getConfigMbeanProperty(String name, DynamicMBean mbean) throws Exception
{
- return mbean.invoke("getPropertyValue", new Object[]{name}, new String[]{"java.lang.String"});
+ return mbean.invoke("getPropertyValue", new Object[]{name}, new String[]{"java.lang.String"});
}
public static void setConfigMbeanProperty(String name, Object value, DynamicMBean mbean) throws Exception
{
- Object ret = mbean.invoke("setProperty", new Object[]{new Attribute(name, value)}, new String[]{"javax.management.Attribute"});
+ Object ret = mbean.invoke("setProperty", new Object[]{new Attribute(name, value)}, new String[]{"javax.management.Attribute"});
}
public String runTestCase(String testName, String sampleName) throws Exception
@@ -225,7 +225,7 @@
BaseAdminMBean mbean;
AttributeList attrs;
Object retObject;
-
+
public void testMBeanRegistry() throws Exception
{
_registry.sortRegistryEntries(_registry.SORT_BY_NAME);
@@ -245,31 +245,31 @@
_caller.assertEquals(str, obj, sample);
}
//***********************************************************************************************
-
-
+
+
public void testMBeansInstantiation() throws Exception
{
//***********************************************************************************************
title("ejb-container INSTANTIATION (type+location)");
location = new String[]{"testdomain", "server-config"};
- mbean = _registry.instantiateMBean("ejb-container", location, null, _configContext);
+ mbean = _registry.instantiateMBean("ejb-container", location, null, _configContext);
assertNull("MBean Instaniation: mbean==null", mbean);
println(""+mbean.getAttribute("cache_resize_quantity"));
assertEquals("not equal", mbean.getAttribute("cache_resize_quantity"), new Integer(33));
//***********************************************************************************************
title("ejb-container INSTANTIATION (ObjectName)");
- mbean = _registry.instantiateConfigMBean(new ObjectName("testdomain:type=ejb-container,config=server-config,category=config"),
- null, _configContext);
+ mbean = _registry.instantiateConfigMBean(new ObjectName("testdomain:type=ejb-container,config=server-config,category=config"),
+ null, _configContext);
println(""+mbean.getAttribute("cache_resize_quantity"));
//***********************************************************************************************
title("ejb-container INSTANTIATION (ObjectName)");
- mbean = _registry.instantiateConfigMBean(new ObjectName("testdomain:type=ejb-container,config=server-config,category=config"),
- null, _configContext);
+ mbean = _registry.instantiateConfigMBean(new ObjectName("testdomain:type=ejb-container,config=server-config,category=config"),
+ null, _configContext);
println(""+mbean.getAttribute("cache_resize_quantity"));
//***********************************************************************************************
title("config INSTANTIATION By ObjectName");
- mbean = _registry.instantiateConfigMBean(new ObjectName("testdomain:type=config,name=server-config,category=config"),
- null, _configContext);
+ mbean = _registry.instantiateConfigMBean(new ObjectName("testdomain:type=config,name=server-config,category=config"),
+ null, _configContext);
println("" + ((mbean!=null)?"ok":"failed"));
}
public void testMBeansInfo() throws Exception
@@ -280,7 +280,7 @@
//***********************************************************************************************
title("ejb-container INSTANTIATION");
location = new String[]{"testdomain", "server-config"};
- mbean = _registry.instantiateMBean("ejb-container", location, null, _configContext);
+ mbean = _registry.instantiateMBean("ejb-container", location, null, _configContext);
println(""+mbean.getAttribute("cache_resize_quantity"));
//***********************************************************************************************
@@ -295,8 +295,8 @@
//***********************************************************************************************
title("resources Instantiate()");
location = new String[]{"testdomain"};
- mbean = _registry.instantiateMBean("resources", location, null, _configContext);
-
+ mbean = _registry.instantiateMBean("resources", location, null, _configContext);
+
//***********************************************************************************************
title("resources-> getCustomResource()");
retObject = mbean.invoke("getCustomResource", null, null); //new Object[]{}, new String[]{});
@@ -309,15 +309,15 @@
attrs.add(new Attribute("res_type", "testResType2"));
attrs.add(new Attribute("factory_class", "testFactoryClass2"));
printObj("Input Attributes:", " ", attrs);
-// retObject = mbean.invoke("createCustomResource", new Object[]{attrs, null, null},
-// new String[]{attrs.getClass().getName(),"java.util.Properties","java.lang.String"});
+// retObject = mbean.invoke("createCustomResource", new Object[]{attrs, null, null},
+// new String[]{attrs.getClass().getName(),"java.util.Properties","java.lang.String"});
retObject = mbean.invoke("createCustomResource", new Object[]{attrs}, new String[]{attrs.getClass().getName()});
printObj("Returned object:", " ", retObject);
//***********************************************************************************************
title("resources-> getCustomResourceByJndiName(testJndiName2)");
retObject = mbean.invoke("getCustomResourceByJndiName", new Object[]{"testJndiName2"}, new String[]{"java.lang.String"});
printObj("Returned object:", " ", retObject);
-
+
//***********************************************************************************************
title("resources-> getCustomResource()");
retObject = mbean.invoke("getCustomResource", null, null); //new Object[]{}, new String[]{});
@@ -325,51 +325,51 @@
//***********************************************************************************************
title("custom-resource-> Instantiate(testJndiName2)");
- mbean = _registry .instantiateMBean("custom-resource", new String[]{"testdomain","testJndiName2"}, null, _configContext);
+ mbean = _registry .instantiateMBean("custom-resource", new String[]{"testdomain","testJndiName2"}, null, _configContext);
printObj("returned custom-resource[testJndiName2] mbean:",mbean);
-
+
//***********************************************************************************************
title("custom-resource[testJndiName2]-> getAttributes()");
printAllAttributes("Attributes:", " ", mbean);
//***********************************************************************************************
title("custom-resource-> Instantiate(testJndiName2) using ObjectName");
- mbean = _registry .instantiateConfigMBean(new ObjectName("testdomain:type=custom-resource,jndi-name=testJndiName2,category=config"), null, _configContext);
+ mbean = _registry .instantiateConfigMBean(new ObjectName("testdomain:type=custom-resource,jndi-name=testJndiName2,category=config"), null, _configContext);
printObj("returned custom-resource[testJndiName2] mbean:",mbean);
-
+
//***********************************************************************************************
title("custom-resource[testJndiName2]-> getAttributes()");
printAllAttributes("Attributes:", " ", mbean);
title("resources-> getCustomResource()");
location = new String[]{"testdomain"};
- mbean = _registry .instantiateMBean("resources", location, null, _configContext);
+ mbean = _registry .instantiateMBean("resources", location, null, _configContext);
retObject = mbean.invoke("getCustomResource", null, null); //new Object[]{}, new String[]{});
printObj("Returned object:"," ",retObject);
title("resources-> removeCustomResourceByJndiName(testJndiName2)");
retObject = mbean.invoke("removeCustomResourceByJndiName", new Object[]{"testJndiName2"}, new String[]{"java.lang.String"});
printObj("Returned object:", " ", retObject);
-
+
//***********************************************************************************************
title("resources-> getCustomResource()");
location = new String[]{"testdomain"};
- mbean = _registry .instantiateMBean("resources", location, null, _configContext);
+ mbean = _registry .instantiateMBean("resources", location, null, _configContext);
retObject = mbean.invoke("getCustomResource", null, null); //new Object[]{}, new String[]{});
printObj("Returned object:"," ",retObject);
-
+
}
public void testPropertiesOperations() throws Exception
{
//***********************************************************************************************
title("Domain MBean Instantiate()");
location = new String[]{"testdomain"};
- mbean = _registry.instantiateMBean("domain", location, null, _configContext);
+ mbean = _registry.instantiateMBean("domain", location, null, _configContext);
//***********************************************************************************************
title("Domain -> setProperty()");
setConfigMbeanProperty("testPropName1", "testPropValue1", mbean);
setConfigMbeanProperty("testPropName2", "testPropValue2", mbean);
setConfigMbeanProperty("testPropName3", "testPropValue3", mbean);
setConfigMbeanProperty("testPropName4", "testPropValue4", mbean);
-
+
//***********************************************************************************************
title("Domain -> getProperties()");
printAllProperties("Properties:", " ", mbean);
@@ -383,7 +383,7 @@
//***********************************************************************************************
title("Domain MBean Instantiate()");
location = new String[]{"testdomain"};
- mbean = _registry.instantiateMBean("domain", location, null, _configContext);
+ mbean = _registry.instantiateMBean("domain", location, null, _configContext);
/* NEEDS TO BE INVESTIGATED for FCS why not working
printObj("Returned object:"," ",mbean);
title("getDefaultAttributeValues('http-listener', null) test");
@@ -399,7 +399,7 @@
//***********************************************************************************************
title("thread-pools Instantiate()");
location = new String[]{"testdomain", "server-config"};
- mbean = _registry.instantiateMBean("thread-pools", location, null, _configContext);
+ mbean = _registry.instantiateMBean("thread-pools", location, null, _configContext);
printObj("Returned object:"," ",mbean);
title("thread-pools-> createThreadPool");
attrs = new AttributeList();
@@ -412,5 +412,5 @@
retObject = mbean.invoke("createThreadPool", new Object[]{attrs}, new String[]{attrs.getClass().getName()});
printObj("Returned object:", " ", retObject);
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/build.xml
index 50074c0..60dcf6e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/build.xml
@@ -25,9 +25,9 @@
<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
@@ -53,12 +53,12 @@
</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.
Another way to customize the build is by overriding existing main targets.
- The targets of interest are:
+ The targets of interest are:
-init-macrodef-javac: defines macro for javac compilation
-init-macrodef-junit: defines macro for junit execution
@@ -66,7 +66,7 @@
-init-macrodef-java: defines macro for class execution
-do-jar-with-manifest: JAR building (if you are using a manifest)
-do-jar-without-manifest: JAR building (if you are not using a manifest)
- run: execution of project
+ run: execution of project
-javadoc-build: Javadoc generation
test-report: JUnit report generation
@@ -78,10 +78,10 @@
</exec>
</target>
- Notice that the overridden target depends on the jar target and not only on
- the compile target as the regular run target does. Again, for a list of available
+ Notice that the overridden target depends on the jar target and not only on
+ the compile target as the regular run target does. Again, for a list of available
properties which you can use, check the target you are overriding in the
- nbproject/build-impl.xml file.
+ nbproject/build-impl.xml file.
-->
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/build-impl.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/build-impl.xml
index 3331502..8fd69bb 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/build-impl.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/nbproject/build-impl.xml
@@ -39,9 +39,9 @@
-->
<project name="ConfigViewer-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1">
<target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
- <!--
+ <!--
======================
- INITIALIZATION SECTION
+ INITIALIZATION SECTION
======================
-->
<target name="-pre-init">
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/DottedNameInfo.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/DottedNameInfo.java
index 9dda4a1..5694f38 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/DottedNameInfo.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/DottedNameInfo.java
@@ -31,15 +31,15 @@
{
String _name;
String _parent;
-
-
+
+
/** Creates a new instance of DottedNameInfo */
public DottedNameInfo(String name, String parentName)
{
_name = name;
_parent = parentName;
}
-
+
public String toString()
{
if(_name.startsWith(_parent+"."))
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/JSetArrayDialog.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/JSetArrayDialog.java
index 321de37..439fd60 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/JSetArrayDialog.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/JSetArrayDialog.java
@@ -36,8 +36,8 @@
NameHelper _nameHelper;
DottedNameInfo _dottedNameInfo;
/** Creates new form JSetArrayDialog */
- public JSetArrayDialog(java.awt.Frame parent, boolean modal,
- NameHelper nameHelper, DottedNameInfo dottedNameInfo,
+ public JSetArrayDialog(java.awt.Frame parent, boolean modal,
+ NameHelper nameHelper, DottedNameInfo dottedNameInfo,
String attrName, Object[] values) {
super(parent, modal);
initComponents();
@@ -52,7 +52,7 @@
}
fillArrayTable();
}
-
+
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
@@ -153,12 +153,12 @@
private void jOkButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jOkButtonActionPerformed
if(jArrayTable.isEditing()) {
- JOptionPane.showMessageDialog(this,
+ JOptionPane.showMessageDialog(this,
"Please complete table editing before submit", "",
JOptionPane.INFORMATION_MESSAGE);
return;
}
-
+
DefaultTableModel model = ((DefaultTableModel)jArrayTable.getModel());
Vector<Vector> vectors = model.getDataVector();
String[] strs = new String[vectors.size()];
@@ -167,9 +167,9 @@
strs[i] = (String)(vectors.elementAt(i).elementAt(0));
}
try {
- _nameHelper.setValue(_dottedNameInfo,
- (String)_attrName,
- (Object)strs,
+ _nameHelper.setValue(_dottedNameInfo,
+ (String)_attrName,
+ (Object)strs,
false);
} catch (Exception e) {
e.printStackTrace();
@@ -207,14 +207,14 @@
//jArrayTable.getSelectionModel().setSelectionInterval(iSelected,iSelected);
jArrayTable.changeSelection(nRows, nRows, false, false);
}//GEN-LAST:event_jAddButtonActionPerformed
-
+
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
- new JSetArrayDialog(new javax.swing.JFrame(),
+ new JSetArrayDialog(new javax.swing.JFrame(),
true,
null, null,
"test",null).setVisible(true);
@@ -226,7 +226,7 @@
{
fillArrayTable(jArrayTable, _attrName, _values);
}
-
+
private void fillArrayTable(JTable table, String header, ArrayList lines)
{
table.removeAll();
@@ -243,9 +243,9 @@
table.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
}
-
-
+
+
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jAddButton;
private javax.swing.JTable jArrayTable;
@@ -254,5 +254,5 @@
private javax.swing.JButton jRemoveButton;
private javax.swing.JScrollPane jScrollPane2;
// End of variables declaration//GEN-END:variables
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/MyTableEditor.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/MyTableEditor.java
index fbafc2d..cf83346 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/MyTableEditor.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/MyTableEditor.java
@@ -33,16 +33,16 @@
* @author kravtch
*/
public class MyTableEditor{
-
+
/**
* Creates a new instance of MyTableEditor
*/
DefaultCellEditor textEditor = new DefaultCellEditor(new JTextField());
public MyTableEditor() {
}
-
+
/*public Component getTableCellEditorComponent(JTable table, Object value,
- boolean isSelected, int row, int column) {
+ boolean isSelected, int row, int column) {
return textEditor.getTableCellEditorComponent(
table, value, isSelected, row, column);
}*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/MyTableListener.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/MyTableListener.java
index 66eb7a5..ab79f87 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/MyTableListener.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/MyTableListener.java
@@ -30,7 +30,7 @@
*/
public class MyTableListener implements TableModelListener
{
- NodeViewFrame _frame;
+ NodeViewFrame _frame;
boolean _bProperty;
/** Creates a new instance of MyTableListener */
public MyTableListener(NodeViewFrame frame, boolean bProperty)
@@ -38,10 +38,10 @@
_frame = frame;
_bProperty = bProperty;
}
-
+
public void tableChanged(TableModelEvent e) {
this.
_frame.tableChanged(e, _bProperty);
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NameHelper.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NameHelper.java
index 862c461..bad1e7f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NameHelper.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NameHelper.java
@@ -35,20 +35,20 @@
public class NameHelper
{
OfflineConfigMgr _mgr;
-
+
/** Creates a new instance of NameHelper */
public NameHelper(String fileName) throws Exception
{
_mgr = new OfflineConfigMgr(fileName);
}
-
- void fillDottedNamesTree(DefaultMutableTreeNode root)
+
+ void fillDottedNamesTree(DefaultMutableTreeNode root)
throws Exception
{
- fillAddNodeChildren(root, "");
+ fillAddNodeChildren(root, "");
}
-
- void fillAddNodeChildren(DefaultMutableTreeNode parentNode,
+
+ void fillAddNodeChildren(DefaultMutableTreeNode parentNode,
String parentDottedName)
throws Exception
{
@@ -56,13 +56,13 @@
for (int i=0; i<childList.size(); i++)
{
String childName = (String)childList.get(i);
- DefaultMutableTreeNode childNode =
+ DefaultMutableTreeNode childNode =
new DefaultMutableTreeNode(new DottedNameInfo(childName,parentDottedName));
fillAddNodeChildren(childNode, childName);
parentNode.add(childNode);
}
}
-
+
Object[][] getAttributesForNodeInPrintForm(DefaultMutableTreeNode node, boolean bProperties) throws Exception
{
@@ -79,7 +79,7 @@
int iOffset = name.length()+1;
if(bProperties)
iOffset += "property.".length();
-
+
for (int i=0; i<list.size(); i++)
{
Attribute attr = (Attribute)list.get(i);
@@ -101,7 +101,7 @@
DottedNameInfo info = (DottedNameInfo)node.getUserObject();
setValue(info, name, value, bProperties);
}
-
+
void setValue(DottedNameInfo info, String name, Object value, boolean bProperties)
throws Exception
{
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NewPropDialog.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NewPropDialog.java
index 5b42c07..c6b6042 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NewPropDialog.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NewPropDialog.java
@@ -31,7 +31,7 @@
{
return new String[]{_name, _value};
}
-
+
/** Creates new form NewPropDialog */
public NewPropDialog(java.awt.Frame parent, boolean modal) {
super(parent, modal);
@@ -39,7 +39,7 @@
this.setTitle("Add new property");
jPropValue.setText("");
}
-
+
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
@@ -128,7 +128,7 @@
_value = jPropValue.getText();
this.dispose();
}//GEN-LAST:event_jOkButtonActionPerformed
-
+
/**
* @param args the command line arguments
*/
@@ -139,7 +139,7 @@
}
});
}
-
+
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jCancelButton;
private javax.swing.JLabel jLabel1;
@@ -148,5 +148,5 @@
private javax.swing.JTextField jPropName;
private javax.swing.JTextField jPropValue;
// End of variables declaration//GEN-END:variables
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NodeViewFrame.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NodeViewFrame.java
index ea31e42..6b00382 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NodeViewFrame.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/ConfigViewer/src/NodeViewFrame.java
@@ -40,7 +40,7 @@
String _fileName;
String _current;
NameHelper _nameHelper;
-
+
/** Creates new form NodeViewFrame */
public NodeViewFrame() {
initComponents();
@@ -50,11 +50,11 @@
root.setUserObject("GlassFish Configuration");
model.reload();
jTree1.setEnabled(false);
-
+
initTables();
-
+
}
-
+
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
@@ -254,7 +254,7 @@
}
// fillArrayTable();
- setTablesForCurrentNode();
+ setTablesForCurrentNode();
jPropsTable.changeSelection(iSelected, iSelected, false, false);
}//GEN-LAST:event_jDeleteProperyActionPerformed
@@ -272,7 +272,7 @@
jButton2.setEnabled((new File(jTextField1.getText())).exists());
}//GEN-LAST:event_jTextField1InputMethodTextChanged
- private void setTablesForCurrentNode()
+ private void setTablesForCurrentNode()
{
DefaultMutableTreeNode node = (DefaultMutableTreeNode)
jTree1.getLastSelectedPathComponent();
@@ -305,8 +305,8 @@
jPropsTable.getModel().addTableModelListener(new MyTableListener(this, true));
jPropsTable.getSelectionModel().addListSelectionListener(this);
jDeletePropery.setEnabled(false);
-
- }
+
+ }
private void jTree1ValueChanged(javax.swing.event.TreeSelectionEvent evt)//GEN-FIRST:event_jTree1ValueChanged
{//GEN-HEADEREND:event_jTree1ValueChanged
@@ -323,7 +323,7 @@
TableModel model = (TableModel)event.getSource();
Object data = model.getValueAt(row, column);
Object name = model.getValueAt(row, 0);
-
+
DefaultMutableTreeNode node = (DefaultMutableTreeNode)
jTree1.getLastSelectedPathComponent();
if(!(node.getUserObject() instanceof DottedNameInfo))
@@ -337,9 +337,9 @@
JOptionPane.showMessageDialog(this, "Exception:\n"+e.getMessage(),"", JOptionPane.ERROR_MESSAGE);
setTablesForCurrentNode();
}
-
+
}
-
+
private void initTables()
{
fillTable(jAttrsTable, new String[]{"Attribute","Value"}, null);
@@ -347,7 +347,7 @@
jDeletePropery.setEnabled(false);
}
-
+
private void fillTable(JTable table, String[] header, Object[][] lines)
{
String[] longValues = {header[0], header[1]};
@@ -380,7 +380,7 @@
column.setPreferredWidth(comp.getPreferredSize().width);
}
}
-
+
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
JFileChooser chooser = new JFileChooser();
switch(chooser.showOpenDialog(this))
@@ -408,7 +408,7 @@
DefaultMutableTreeNode root = (DefaultMutableTreeNode)model.getRoot();
root.removeAllChildren();
root.setUserObject("GlassFish Configuration");
-
+
try {
_nameHelper = new NameHelper(_fileName);
_nameHelper.fillDottedNamesTree(root);
@@ -416,12 +416,12 @@
e.printStackTrace();
JOptionPane.showMessageDialog(this, "File corrupted:\nException:\n"+e.getMessage(),"", JOptionPane.ERROR_MESSAGE);
}
-
+
model.reload();
jTree1.setEnabled(true);
}
-
+
class MyTableModel extends DefaultTableModel {
/*
* Don't need to implement this method unless your table's
@@ -450,7 +450,7 @@
JSetArrayDialog dialog = new JSetArrayDialog(
parentFrame, true,
_nameHelper,
- (DottedNameInfo)node.getUserObject(),
+ (DottedNameInfo)node.getUserObject(),
(String)this.getValueAt(row, col-1),
(Object[])obj);
dialog.setVisible(true);
@@ -477,7 +477,7 @@
public void valueChanged(ListSelectionEvent e) {
jDeletePropery.setEnabled(jPropsTable.getSelectedRowCount()>0);
}
-
+
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JButton jAddPropery;
@@ -497,5 +497,5 @@
private javax.swing.JTextField jTextField1;
private javax.swing.JTree jTree1;
// End of variables declaration//GEN-END:variables
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/build.xml
index eefcc52..6dc3915 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/build.xml
@@ -17,7 +17,7 @@
-->
-<project name="OfflineConfig admin devtests" default="all" basedir=".">
+<project name="OfflineConfig admin devtests" default="all" basedir=".">
<!-- ========== Initialize Properties =================================== -->
@@ -36,24 +36,24 @@
<pathelement location="${j2ee.jar}"/>
<pathelement location="${junit.jar}"/>
<pathelement location="${testng.jar}"/>
- </path>
+ </path>
<path id="test.run.classpath">
<pathelement location="${component.tests.classes.dir}"/>
<path refid="test.compile.classpath"/>
<!--
<pathelement location="${schema2beans.jar}"/>
- <pathelement location="${jmxri.jar}"/>
- <pathelement location="/export/ias/sqe-pe/codecoverage/jcov/lib/jcov.jar"/>
+ <pathelement location="${jmxri.jar}"/>
+ <pathelement location="/export/ias/sqe-pe/codecoverage/jcov/lib/jcov.jar"/>
-->
</path>
<!-- init. Initialization involves creating publishing directories and
- OS specific targets. -->
+ OS specific targets. -->
<target name="init-tests" description="${component.name} initialization">
<tstamp>
<format property="start.time" pattern="MM/dd/yyyy hh:mm aa"/>
- </tstamp>
+ </tstamp>
<echo message="Building component ${component.name}"/>
<mkdir dir="${component.tests.classes.dir}"/>
<delete dir="${tests.workfiles.dir}"/>
@@ -76,11 +76,11 @@
<target name="build" depends="init-tests">
<echo message="Compiling {component.name}"/>
- <javac srcdir="${testsrc.dir}"
+ <javac srcdir="${testsrc.dir}"
destdir="${component.tests.classes.dir}"
- debug="${javac.debug}"
+ debug="${javac.debug}"
optimize="${javac.optimize}"
- source="${javac.source}"
+ source="${javac.source}"
deprecation="${javac.deprecation}"
failonerror="true"
classpathref="test.compile.classpath">
@@ -88,33 +88,33 @@
<!-- <include name="**/*Test.java"/>
<include name="**/*Tests.java"/> -->
</javac>
-
+
</target>
<target name="run-tests" depends="build">
- <java fork="true" failonerror="true"
+ <java fork="true" failonerror="true"
classname="com.sun.enterprise.admin.config.OfflineConfigTest" >
-<!-- <jvmarg value="-Djcov.file=${jcov.file}"/>
+<!-- <jvmarg value="-Djcov.file=${jcov.file}"/>
-->
<arg line="-testpath ${tests.workfiles.dir}" />
<jvmarg value="-Xdebug"/>
- <jvmarg value="-Xnoagent"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=25001"/>
+ <jvmarg value="-Xnoagent"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=25001"/>
<classpath refid="test.run.classpath"/>
</java>
</target>
<target name="offline-commander" depends="build">
- <java fork="true" failonerror="true"
+ <java fork="true" failonerror="true"
classname="com.sun.enterprise.admin.config.OfflineCommander" >
-<!-- <jvmarg value="-Djcov.file=${jcov.file}"/>
+<!-- <jvmarg value="-Djcov.file=${jcov.file}"/>
-->
<arg line="-testpath ${tests.workfiles.dir}" />
-
+
<jvmarg value="-Xdebug"/>
- <jvmarg value="-Xnoagent"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=25001"/>
+ <jvmarg value="-Xnoagent"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=25001"/>
<classpath refid="test.run.classpath"/>
</java>
@@ -124,7 +124,7 @@
<path refid="test.run.classpath"/>
<pathelement location="${testng.jar}"/>
</path>
-
+
<target name="run-tests-ng"
description="run examples with java"
depends="build" >
@@ -137,4 +137,4 @@
</target>
</project>
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/runtest.bat b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/runtest.bat
index dbf1221..b6ecd3d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/runtest.bat
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/runtest.bat
@@ -1,2 +1,2 @@
-REM -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009
+REM -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009
java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009 -cp /gfroot/publish/glassfish/lib/appserv-rt.jar;/gfroot/publish/glassfish/lib/appserv-se.jar;/gfroot/publish/glassfish/lib/appserv-admin.jar;build/internal/testclasses com.sun.enterprise.admin.config.OfflineCommander -testpath build/internal/testclasses/asadmintest
\ No newline at end of file
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/src/OfflineCommander.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/src/OfflineCommander.java
index daaf8ad..ba75d82 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/src/OfflineCommander.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/src/OfflineCommander.java
@@ -44,7 +44,7 @@
static String TEST_DIR = "/tmp/asadmintest";
private OfflineConfigMgr _mgr; // = new AdminTester(_mode, _registry, _configContext);
-
+
public OfflineCommander() throws Exception
{
_mgr = new OfflineConfigMgr(TEST_DIR+"/domain.xml");
@@ -60,7 +60,7 @@
System.out.println("usage: offlineconfigtest -testpath <path to test directory> [print|create]");
System.exit(1);
}
- TEST_DIR = args[1];
+ TEST_DIR = args[1];
OfflineCommander commander = new OfflineCommander();
System.out.print(">");
String cmd = "";
@@ -74,7 +74,7 @@
{//new command
if(cmd.equals("q") || cmd.equals("Q"))
break;
-
+
try {
if(cmd.startsWith("list ") || cmd.equals("list"))
{
@@ -113,7 +113,7 @@
System.out.println("ERROR!");
continue;
}
-
+
attrs = commander._mgr.addSubvaluesToArrayAttribute(
rest.substring(0, spaceIdx).trim(),
rest.substring(spaceIdx).trim().split(","));
@@ -129,7 +129,7 @@
System.out.println("ERROR!");
continue;
}
-
+
attrs = commander._mgr.removeSubvaluesFromArrayAttribute(
rest.substring(0, spaceIdx).trim(),
rest.substring(spaceIdx).trim().split(","));
@@ -149,9 +149,9 @@
System.out.println("\n finished");
}
-
-
+
+
//******************************************************************
//******************HELPERS***************************************
//******************************************************************
@@ -164,18 +164,18 @@
Attribute attr = (Attribute)attrs.get(i);
if(attr.getValue() instanceof Object[])
{
- System.out.println(" "+
+ System.out.println(" "+
attr.getName() + " = " );
Object[] sub_attrs= (Object[])attr.getValue();
for(int j=0; j<sub_attrs.length; j++)
{
- System.out.println(" "+
+ System.out.println(" "+
sub_attrs[j]);
}
}
else
{
- System.out.println(" "+
+ System.out.println(" "+
attr.getName() + " = " + attr.getValue());
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/src/OfflineConfigTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/src/OfflineConfigTest.java
index 08f17f2..a8ee837 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/src/OfflineConfigTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/offlineconfig/src/OfflineConfigTest.java
@@ -48,7 +48,7 @@
static String TEST_DIR = "build/internal/testclasses/asadmintest";
private OfflineConfigMgr _mgr; // = new AdminTester(_mode, _registry, _configContext);
-
+
public OfflineConfigTest(String name) throws Exception
{
super(name);
@@ -94,16 +94,16 @@
System.out.println("usage: offlineconfigtest -testpath <path to test directory> [print|create]");
System.exit(1);
}
- TEST_DIR = args[1];
- System.out.println("TEST_DIR = "+TEST_DIR );
+ TEST_DIR = args[1];
+ System.out.println("TEST_DIR = "+TEST_DIR );
final TestRunner runner= new TestRunner();
final TestResult result = runner.doRun(OfflineConfigTest.suite(), false);
System.exit(result.errorCount() + result.failureCount());
}
-
-
+
+
//******************************************************************
//******************HELPERS***************************************
//******************************************************************
@@ -120,7 +120,7 @@
for(int i=0; i<attrs.size(); i++)
{
Attribute attr = (Attribute)attrs.get(i);
- System.out.println(" "+
+ System.out.println(" "+
attr.getName() + " = " + attr.getValue());
}
}
@@ -142,7 +142,7 @@
{
assertNotNull("_mgr==null", _mgr);
}
-
+
@Test(groups = {"OfflineConfigTests"})
public void testGetWildcardAttributes() throws Exception
{
@@ -166,7 +166,7 @@
attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.id");
printAttributes(" -====== server-config.http-service.virtual-server.server.id", attrs);
}
-
+
@Test(groups = {"OfflineConfigTests"})
public void testGetProperties() throws Exception
{
@@ -176,7 +176,7 @@
attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.property.chubaka");
printAttributes(" ====== server-config.http-service.virtual-server.server.property.chubaka", attrs);
}
-
+
@Test(groups = {"OfflineConfigTests"})
public void testGetWildcardProperties() throws Exception
{
@@ -225,7 +225,7 @@
attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.state");
printAttributes(" ====== get after set (by server-config)", attrs);
}
-
+
@Test(groups = {"OfflineConfigTests"})
public void testAddProperty() throws Exception
{
@@ -237,7 +237,7 @@
attrs = _mgr.getAttributes("server-config.http-service.virtual-server.server.property.qwerty");
printAttributes(" ====== get after set", attrs);
}
-
+
@Test(groups = {"OfflineConfigTests"})
public void testDeleteProperty() throws Exception
{
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/build.xml
index fcd2008..115ed22 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/build.xml
@@ -25,112 +25,112 @@
&props;
&common;
<property name="src.dir" value="src"/>
- <property name="src-ng.dir" value="testng"/>
- <property name="classes.dir" value="classes"/>
+ <property name="src-ng.dir" value="testng"/>
+ <property name="classes.dir" value="classes"/>
<property name="dist.dir" value="dist"/>
<property name="domain.dir" value="${env.S1AS_HOME}/domains/domain1"/>
<property name="mbean-loading-folder" value="${domain.dir}/applications/mbeans"/>
- <!-- ########## all ############# -->
+ <!-- ########## all ############# -->
<target name="all" depends="deploy, makejar" />
- <!-- ########## setup ############# -->
+ <!-- ########## setup ############# -->
<target name="setup" depends="init-common">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${dist.dir}"/>
</target>
- <!-- ########## build ############# -->
- <target name="build" depends="setup">
- <mkdir dir="${classes.dir}"/>
- <javac
- srcdir="${src.dir}"
- destdir="${classes.dir}"
- debug="on">
- <classpath>
- <pathelement path="${s1astest.classpath}"/>
- <pathelement path="${classes.dir}"/>
+ <!-- ########## build ############# -->
+ <target name="build" depends="setup">
+ <mkdir dir="${classes.dir}"/>
+ <javac
+ srcdir="${src.dir}"
+ destdir="${classes.dir}"
+ debug="on">
+ <classpath>
+ <pathelement path="${s1astest.classpath}"/>
+ <pathelement path="${classes.dir}"/>
<pathelement location="${env.APS_HOME}/lib/testng.jar"/>
- </classpath>
- </javac>
- <copy todir="${classes.dir}/test" file="LocalStrings.properties"/>
- </target>
+ </classpath>
+ </javac>
+ <copy todir="${classes.dir}/test" file="LocalStrings.properties"/>
+ </target>
- <!-- ########## run ############# -->
- <target name="run">
- <antcall target="runmain"/>
- </target>
+ <!-- ########## run ############# -->
+ <target name="run">
+ <antcall target="runmain"/>
+ </target>
- <!-- ########## runmain ############# -->
+ <!-- ########## runmain ############# -->
<target name="runmain" depends="build">
<java classname="test.TestDriver"
- dir="."
+ dir="."
fork="yes">
- <!--
- <arg value="${admin.user}"/>
- <arg value="${admin.password}"/>
- <arg value="${admin.host}"/>
- <arg value="${admin.port}"/>
- <arg value="${admin.secure}"/>
- <arg value="tests.list"/>
- -->
- <jvmarg line="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=3333,suspend=n,server=y -Djava.compiler=NONE"/>
+ <!--
+ <arg value="${admin.user}"/>
+ <arg value="${admin.password}"/>
+ <arg value="${admin.host}"/>
+ <arg value="${admin.port}"/>
+ <arg value="${admin.secure}"/>
+ <arg value="tests.list"/>
+ -->
+ <jvmarg line="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=3333,suspend=n,server=y -Djava.compiler=NONE"/>
<classpath>
<pathelement path="${s1astest.classpath}"/>
- <pathelement path="${classes.dir}"/>
- <pathelement path="${env.S1AS_HOME}/lib/appserv-rt.jar"/>
+ <pathelement path="${classes.dir}"/>
+ <pathelement path="${env.S1AS_HOME}/lib/appserv-rt.jar"/>
</classpath>
</java>
</target>
- <!-- ########## debug ############# -->
+ <!-- ########## debug ############# -->
<target name="debug" depends="build">
<java classname="test.TestDriver"
- dir="."
+ dir="."
fork="yes">
- <jvmarg line="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=3333,suspend=y,server=y -Djava.compiler=NONE"/>
+ <jvmarg line="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=3333,suspend=y,server=y -Djava.compiler=NONE"/>
<classpath>
<pathelement path="${s1astest.classpath}"/>
- <pathelement path="${classes.dir}"/>
+ <pathelement path="${classes.dir}"/>
</classpath>
</java>
</target>
- <!-- ########## clean ############# -->
+ <!-- ########## clean ############# -->
<target name="clean">
- <delete dir="${classes.dir}"/>
- <delete dir="${dist.dir}"/>
- <delete dir="${mbean-loading-folder}/testmbeans"/>
+ <delete dir="${classes.dir}"/>
+ <delete dir="${dist.dir}"/>
+ <delete dir="${mbean-loading-folder}/testmbeans"/>
</target>
- <!-- ########## deploy ############# -->
+ <!-- ########## deploy ############# -->
<target name="deploy" depends="build">
<copy todir="${mbean-loading-folder}/testmbeans">
- <fileset dir="${classes.dir}/testmbeans"/>
+ <fileset dir="${classes.dir}/testmbeans"/>
</copy>
</target>
- <!-- ########## makejar ############# -->
+ <!-- ########## makejar ############# -->
<target name="makejar" depends="build">
- <jar destfile="${dist.dir}/testmbeans.jar"
- basedir="${classes.dir}"
- excludes="test/**" />
+ <jar destfile="${dist.dir}/testmbeans.jar"
+ basedir="${classes.dir}"
+ excludes="test/**" />
</target>
- <!-- ########## ASProbe ############# -->
+ <!-- ########## ASProbe ############# -->
<target name="ASProbe" depends="build">
- <jar destfile="${dist.dir}/ASProbe.jar"
- basedir="${classes.dir}"
- includes="testmbeans/ASProbe*"/>
+ <jar destfile="${dist.dir}/ASProbe.jar"
+ basedir="${classes.dir}"
+ includes="testmbeans/ASProbe*"/>
</target>
<path id="tng-run.cp">
@@ -141,11 +141,11 @@
<pathelement location="${env.APS_HOME}/lib/testng.jar"/>
<pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
</path>
-
+
<!-- ########## build-ng ############# -->
<target name="build-ng" depends="build">
<mkdir dir="${classes.dir}"/>
- <javac
+ <javac
srcdir="${src-ng.dir}"
destdir="${classes.dir}"
debug="on">
@@ -182,7 +182,7 @@
<jvmarg value="-Djava.compiler=NONE"/>
</java>
</target>
-
+
<target name="run-tests-ng-dataprovider"
description="run examples with java"
depends="setup,deploy,build-ng" >
@@ -195,7 +195,7 @@
<jvmarg value="-Djava.compiler=NONE"/>
</java>
</target>
- <target name="run-tests-ng"
+ <target name="run-tests-ng"
depends="run-tests-ng-separate,run-tests-ng-params,run-tests-ng-dataprovider">
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/rmi.properties b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/rmi.properties
index 98928db..6e0df6e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/rmi.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/rmi.properties
@@ -14,7 +14,7 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-
+
# __NAME__.properties
#
# Created on __DATE
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/smftest.properties b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/smftest.properties
index 52efd81..a22c4f0 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/smftest.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/smftest.properties
@@ -14,7 +14,7 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-
+
# __NAME__.properties
#
# Created on __DATE
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/AttributeSniffer.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/AttributeSniffer.java
index 246267f..d2077e3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/AttributeSniffer.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/AttributeSniffer.java
@@ -32,17 +32,17 @@
public AttributeSniffer()
{
}
-
+
String testInternal() throws JMException, IOException
{
title("AttributeSniffer");
-
+
for(String classname : classnames)
{
System.out.println(classname);
MBeanInfo info = getMBeanInfo(classname);
MBeanAttributeInfo[] atts = info.getAttributes();
-
+
for(MBeanAttributeInfo ainfo : atts)
{
System.out.println("ATTRIBUTE --> name=[" + ainfo.getName() + "], type=[" + ainfo.getType() + "], Is Writable: " + ainfo.isWritable());
@@ -52,12 +52,12 @@
}
private static final String[] classnames = {
- "testmbeans.OneClassDynamicMBean",
- "testmbeans.MicrowaveOvenImpl",
- "testmbeans.SimpleStandard",
- "testmbeans.PrimitiveStandard",
+ "testmbeans.OneClassDynamicMBean",
+ "testmbeans.MicrowaveOvenImpl",
+ "testmbeans.SimpleStandard",
+ "testmbeans.PrimitiveStandard",
};
-
+
//private int numIter = 500;
//private String namePrefix;
//private String alphabet = "abcdefghijklmnopqrstuvwxyz";
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/DeployManyMBeans.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/DeployManyMBeans.java
index 8be882c..9cea812 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/DeployManyMBeans.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/DeployManyMBeans.java
@@ -42,7 +42,7 @@
rnd = new Random();
int len = 4 + rnd.nextInt(7);
char[] chars = new char[len];
-
+
for(int i = 0; i < len; i++)
{
chars[i] = alphabet.charAt(rnd.nextInt(26));
@@ -52,12 +52,12 @@
System.out.println(LocalStrings.get("DeployManyMBeans.NUM_BEANS"));
System.out.println(LocalStrings.get("foo"));
}
-
+
String testInternal() throws JMException, IOException
{
title("DeployManyMBeans");
title("Stage I -- create " + numIter + " MBeans");
-
+
for(int i = 0; i < numIter; i++)
{
long msec = System.currentTimeMillis();
@@ -66,13 +66,13 @@
String objname = "user:foo=" + name;
create(classname, objname, name);
msec = System.currentTimeMillis() - msec;
- System.out.println("Created CMB, name: " + name + ", impl class: "
- + classname + ", obj-name: " + objname + ", Time(msec): "
+ System.out.println("Created CMB, name: " + name + ", impl class: "
+ + classname + ", obj-name: " + objname + ", Time(msec): "
+ msec + ", Memory Usage: " + getMemoryInfo());
- }
+ }
title("Stage II -- check " + numIter + " MBeans");
-
+
List<String> list = list();
for(int i = 0; i < numIter; i++)
{
@@ -84,19 +84,19 @@
title("All MBeans were registered OK");
title("Stage III -- delete " + numIter + " MBeans");
-
+
if(interactive)
Console.readLine("Shall I delete all of the MBeans? [y]: ");
-
+
for(int i = 0; i < numIter; i++)
{
String name = namePrefix + i;
delete(name);
System.out.println("Deleted: " + name);
}
-
+
title("Stage IV -- check deletion of " + numIter + " MBeans");
-
+
list = list();
for(int i = 0; i < numIter; i++)
{
@@ -107,17 +107,17 @@
}
title("All Done!");
-
+
return ( SimpleReporterAdapter.PASS );
}
private static final String[] classnames = {
- "testmbeans.OneClassDynamicMBean",
- "testmbeans.MicrowaveOvenImpl",
- "testmbeans.SimpleStandard",
- "testmbeans.PrimitiveStandard",
+ "testmbeans.OneClassDynamicMBean",
+ "testmbeans.MicrowaveOvenImpl",
+ "testmbeans.SimpleStandard",
+ "testmbeans.PrimitiveStandard",
};
-
+
private int numIter = 500;
private String namePrefix;
private String alphabet = "abcdefghijklmnopqrstuvwxyz";
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/GetResourceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/GetResourceTest.java
index 244f6f2..c311c18 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/GetResourceTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/GetResourceTest.java
@@ -32,7 +32,7 @@
public GetResourceTest()
{
}
-
+
String testInternal() throws JMException, IOException
{
long msec = System.currentTimeMillis();
@@ -43,8 +43,8 @@
String objname = "user:foo=" + name;
create(classname, objname, name);
msec = System.currentTimeMillis() - msec;
- System.out.println("Created CMB, name: " + name + ", impl class: "
- + classname + ", obj-name: " + objname + ", Time(msec): "
+ System.out.println("Created CMB, name: " + name + ", impl class: "
+ + classname + ", obj-name: " + objname + ", Time(msec): "
+ msec + ", Memory Usage: " + getMemoryInfo());
title("Stage II -- check ");
@@ -58,14 +58,14 @@
Console.readLine("Go look at the AWT window and hit ENTER: ");
title("Stage III -- delete ");
-
+
if(interactive)
Console.readLine("Shall I delete the MBeans? [y]: ");
delete(name);
System.out.println("Deleted: " + name);
-
+
title("Stage IV -- check deletion");
-
+
list = list();
if(list.contains(name))
throw new RuntimeException(name + " is still in the list of deployed MBeans");
@@ -75,12 +75,12 @@
}
private static final String[] classnames = {
- "testmbeans.OneClassDynamicMBean",
- "testmbeans.MicrowaveOvenImpl",
- "testmbeans.SimpleStandard",
- "testmbeans.PrimitiveStandard",
+ "testmbeans.OneClassDynamicMBean",
+ "testmbeans.MicrowaveOvenImpl",
+ "testmbeans.SimpleStandard",
+ "testmbeans.PrimitiveStandard",
};
-
+
private int numIter = 500;
private String namePrefix;
private String alphabet = "abcdefghijklmnopqrstuvwxyz";
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/JVMInformationTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/JVMInformationTest.java
index 8d1ef7d..370b676 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/JVMInformationTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/JVMInformationTest.java
@@ -33,7 +33,7 @@
public class JVMInformationTest implements RemoteAdminQuicklookTest {
private MBeanServerConnection mbsc;
-
+
private static final String BACKEND_MBEAN_ON = AdminService.PRIVATE_MBEAN_DOMAIN_NAME + ":" + "category=monitor,type=JVMInformationCollector,server=server";
private long start, end;
/** Creates a new instance of JVMInformationTest */
@@ -66,8 +66,8 @@
public long getExecutionTime() {
return ( end - start );
}
-
- String getMemoryInfo() throws Exception
+
+ String getMemoryInfo() throws Exception
{
final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
final JVMInformationMBean mbean = (JVMInformationMBean)MBeanServerInvocationHandler.newProxyInstance(mbsc, on, com.sun.enterprise.admin.mbeans.jvm.JVMInformationMBean.class, false);
@@ -80,6 +80,6 @@
System.out.println(mbean.getMemoryInformation(null));
System.out.println(mbean.getClassInformation(null));
System.out.println(mbean.getSummary(null));
-
+
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/LifeCycle.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/LifeCycle.java
index 3b3bd1c..602763d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/LifeCycle.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/LifeCycle.java
@@ -24,48 +24,48 @@
import javax.management.ObjectName;
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
import static com.sun.enterprise.admin.mbeans.custom.CustomMBeanConstants.*;
-public abstract class LifeCycle implements RemoteAdminQuicklookTest
+public abstract class LifeCycle implements RemoteAdminQuicklookTest
{
abstract String testInternal() throws JMException, IOException;
////////////////////////////////////////////////////////////////////////////
////////////// RemoteAdminQuicklookTest Impl Methods ////////////////////
////////////////////////////////////////////////////////////////////////////
-
- public long getExecutionTime()
+
+ public long getExecutionTime()
{
return ( end - start ) ;
}
////////////////////////////////////////////////////////////////////////////
- public String getName()
+ public String getName()
{
return ( getClass().getName() );
}
////////////////////////////////////////////////////////////////////////////
-
- public void setMBeanServerConnection(MBeanServerConnection c)
+
+ public void setMBeanServerConnection(MBeanServerConnection c)
{
mbsc = c;
}
////////////////////////////////////////////////////////////////////////////
-
- public String test()
+
+ public String test()
{
- try
+ try
{
start = System.currentTimeMillis();
return (testInternal());
- }
- catch(final Exception e)
+ }
+ catch(final Exception e)
{
e.printStackTrace();
throw new RuntimeException(e);
}
- finally
+ finally
{
end = System.currentTimeMillis();
}
@@ -73,18 +73,18 @@
////////////////////////////////////////////////////////////////////////////
/////////////// Tool Methods ////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
-
+
String create(String className, String objectName, String name) throws JMException, IOException
{
Map<String, String> params = new HashMap<String, String>();
Map<String, String> attribs = new HashMap<String, String>();
params.put(IMPL_CLASS_NAME_KEY, className);
-
+
if(ok(objectName))
params.put(OBJECT_NAME_KEY, objectName);
if(ok(name))
params.put(NAME_KEY, name);
-
+
final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
final String oper = "createMBean";
final Object[] operParams = new Object[]{ null, params, attribs };
@@ -115,7 +115,7 @@
}
////////////////////////////////////////////////////////////////////////////
-
+
String delete(String name) throws JMException, IOException
{
final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
@@ -139,7 +139,7 @@
String s = jit.getMemoryInfo();
BufferedReader r = new BufferedReader(new StringReader(s));
String line;
-
+
while((line = r.readLine()) != null)
{
if(line.equals("Heap Memory Usage:"))
@@ -150,13 +150,13 @@
break;
}
}
-
+
}
catch(Exception e)
{
// ignore...
}
-
+
return new MemoryUsage(heap, nonHeap);
}
@@ -166,17 +166,17 @@
{
int len = s.length();
int sub = (starsLength - 10 - len) / 2;
-
+
if(sub < 5)
sub = 5;
-
+
System.out.println(stars);
System.out.println(stars.substring(0, sub) + " " + s + " " + stars.substring(0, sub));
System.out.println(stars);
}
////////////////////////////////////////////////////////////////////////////
-
+
private int parseMemoryUsage(BufferedReader r)
{
/*
@@ -189,7 +189,7 @@
**/
String searchString = "Memory that Java Virtual Machine uses at this time: ";
String line;
-
+
try
{
while((line = r.readLine()) != null)
@@ -209,20 +209,20 @@
return -1;
}
}
-
+
////////////////////////////////////////////////////////////////////////////
-
+
private static int parseNumber(String num)
{
String fixed = "";
for(int i = 0; i < num.length(); i++)
{
char c = num.charAt(i);
-
+
if(Character.isDigit(c))
fixed += c;
}
-
+
try
{
return new Integer(fixed);
@@ -232,16 +232,16 @@
return -1;
}
}
-
+
////////////////////////////////////////////////////////////////////////////
-
+
private boolean ok(String s)
{
return s != null && s.length() > 0;
}
////////////////////////////////////////////////////////////////////////////
-
+
private MBeanServerConnection mbsc;
private long start, end;
private final int starsLength = stars.length();
@@ -249,7 +249,7 @@
private static final String BACKEND_MBEAN_ON = "com.sun.appserv:category=config,type=applications";
////////////////////////////////////////////////////////////////////////////
-
+
class MemoryUsage
{
MemoryUsage(int Heap, int NonHeap)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/MBeanServerConnectionFactory.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/MBeanServerConnectionFactory.java
index dd1c5bc..403e040 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/MBeanServerConnectionFactory.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/MBeanServerConnectionFactory.java
@@ -25,14 +25,14 @@
/** A class to create an @{link MBeanServerConnection} to appserver.
*/
public class MBeanServerConnectionFactory {
-
+
/** Creates a new instance of MBeanServerConnectionFactory */
private MBeanServerConnectionFactory() {
}
-
- public static final MBeanServerConnection getMBeanServerConnectionHTTPOrHTTPS(final String adminUser, final String
+
+ public static final MBeanServerConnection getMBeanServerConnectionHTTPOrHTTPS(final String adminUser, final String
adminPassword, final String adminHost, final String adminPort, final String isSecure) throws RuntimeException {
-
+
MBeanServerConnection mbsc = null;
try {
final String protocol = AppserverConnectionSource.PROTOCOL_HTTP;
@@ -46,7 +46,7 @@
throw new RuntimeException(e);
}
}
-
+
public static final MBeanServerConnection getMBeanServerConnectionRMI(final String adminUser, final String adminPassword,
final String adminHost, final String rmiPort, final String isSecure) throws RuntimeException {
MBeanServerConnection mbsc = null;
@@ -62,7 +62,7 @@
throw new RuntimeException(e);
}
}
-
+
private static TLSParams getDummyTLSParams() {
final X509TrustManager[] tms = TrustAnyTrustManager.getInstanceArray();
return ( new TLSParams(tms, null) );
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/ObjectNameTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/ObjectNameTest.java
index 9eb5781..2e0c0c7 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/ObjectNameTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/ObjectNameTest.java
@@ -32,11 +32,11 @@
public class ObjectNameTest implements RemoteAdminQuicklookTest {
private MBeanServerConnection mbsc;
-
+
private static final String BACKEND_MBEAN_ON = "com.sun.appserv:category=config,type=applications";
private static final String SS_CUSTOM_MBEAN_CLASS = "testmbeans.SimpleStandard";
private long start, end;
-
+
/** Creates a new instance of ObjectNameTest */
public ObjectNameTest() {
}
@@ -73,11 +73,11 @@
final String target1 = "server"; //the DAS
final Map<String, String> params = new HashMap<String, String> ();
params.put(CustomMBeanConstants.IMPL_CLASS_NAME_KEY, SS_CUSTOM_MBEAN_CLASS);
-
+
//invalid domain
String invalidDomainNameON = "foo:bar=baz";
params.put(CustomMBeanConstants.OBJECT_NAME_KEY, invalidDomainNameON);
-
+
try {
invokeCustomMBeanCreationMethod(target1, params, new HashMap<String, String> ());
} catch (final Exception e) {
@@ -87,41 +87,41 @@
//use of pattern
invalidDomainNameON = "foo:bar=*,name=baz";
params.put(CustomMBeanConstants.OBJECT_NAME_KEY, invalidDomainNameON);
-
+
try {
invokeCustomMBeanCreationMethod(target1, params, new HashMap<String, String> ());
} catch (final Exception e) {
//exception should be thrown and should be squelched as test passes in that case.
System.out.println(e.getMessage());
- }
+ }
}
-
+
private void testDuplicateObjectNames() throws Exception {
final String target1 = "server"; //the DAS
final Map<String, String> params = new HashMap<String, String> ();
params.put(CustomMBeanConstants.IMPL_CLASS_NAME_KEY, SS_CUSTOM_MBEAN_CLASS);
-
+
final String name = "custom" + System.currentTimeMillis();
params.put(CustomMBeanConstants.NAME_KEY, name);
String on = "user:bar=baz" + System.currentTimeMillis();
params.put(CustomMBeanConstants.OBJECT_NAME_KEY, on);
-
+
invokeCustomMBeanCreationMethod(target1, params, new HashMap<String, String> ());
-
+
try {
invokeCustomMBeanCreationMethod(target1, params, new HashMap<String, String> ());
} catch (final Exception e) {
//exception should be thrown and should be squelched as test passes in that case.
System.out.println(e.getMessage());
- }
+ }
}
private void testEquivalentObjectNames() throws Exception {
final String target1 = "server"; //the DAS
final Map<String, String> params = new HashMap<String, String> ();
params.put(CustomMBeanConstants.IMPL_CLASS_NAME_KEY, SS_CUSTOM_MBEAN_CLASS);
-
+
final String name = "custom" + System.currentTimeMillis();
params.put(CustomMBeanConstants.NAME_KEY, name);
@@ -129,9 +129,9 @@
final String p2 = "baz=bar" + System.currentTimeMillis();
String on = "user:" + p1 + "," + p2;
params.put(CustomMBeanConstants.OBJECT_NAME_KEY, on);
-
+
invokeCustomMBeanCreationMethod(target1, params, new HashMap<String, String> ());
-
+
try {
on = "user:"+ p2 + "," + p1; //this is same as previous, hence the following should fail
params.put(CustomMBeanConstants.OBJECT_NAME_KEY, on);
@@ -140,7 +140,7 @@
} catch (final Exception e) {
//exception should be thrown and should be squelched as test passes in that case.
System.out.println(e.getMessage());
- }
+ }
}
private String invokeCustomMBeanCreationMethod(final String target, final Map<String, String> params, final Map<String, String> attributes) throws Exception {
@@ -163,7 +163,7 @@
final Object[] operParams = new Object[]{ target, name };
final String[] operSign = new String[]{ String.class.getName(), String.class.getName() };
return ( (String) mbsc.invoke(on, oper, operParams, operSign) );
-
+
}
///// Private /////
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/PrimitiveDataTypeMBeanTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/PrimitiveDataTypeMBeanTest.java
index 7e3e6c2..781eb73 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/PrimitiveDataTypeMBeanTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/PrimitiveDataTypeMBeanTest.java
@@ -37,7 +37,7 @@
import javax.management.ObjectName;
public class PrimitiveDataTypeMBeanTest implements RemoteAdminQuicklookTest {
-
+
private long start, end;
MBeanServerConnection mbsc = null;
private static final String SS_CUSTOM_MBEAN_CLASS = "testmbeans.PrimitiveStandard";
@@ -70,9 +70,9 @@
}
finally {
end = System.currentTimeMillis();
- }
+ }
}
-
+
/** This test tests the PrimitiveStandardMBean
*/
private void testCreatePrimitiveDataTypeMBean() throws Exception {
@@ -93,56 +93,56 @@
}
}
///// Private /////
-
+
private Map<String, String> getAttributeMapForPrimitives() {
final Map<String, String> attributes = new HashMap<String, String> ();
final Random r = new Random();
String v = Boolean.toString(r.nextBoolean());
String n = "State";
attributes.put(n, v);
-
+
v = Integer.toString(r.nextInt());
n = "Rank";
attributes.put(n, v);
-
+
v = Long.toString(r.nextLong());
n = "Time";
attributes.put(n, v);
-
+
final byte[] bytes = new byte[1];
r.nextBytes(bytes);
v = Byte.toString(bytes[0]);
n = "Length";
attributes.put(n, v);
-
+
/*v = Character.toString((char)r.nextInt());
n = "ColorCode";
attributes.put(n, v);*/
-
+
v = Float.toString(r.nextFloat());
n = "AnnualPercentRate";
attributes.put(n, v);
-
+
v = Double.toString(r.nextDouble());
n = "Temperature";
attributes.put(n, v);
-
+
v = Short.toString((short)r.nextInt());
n = "Characters";
attributes.put(n, v);
-
+
v = generateA2ZRandomString('a', 'z');
n = "Name";
attributes.put(n, v);
-
+
v = DateFormat.getDateInstance().format(new Date());
n = "StartDate";
attributes.put(n, v);
-
+
v = "foo:" + generateA2ZRandomString('a', 'm') + "=" + generateA2ZRandomString('n', 'z');
n = "ResourceObjectName";
attributes.put(n, v);
-
+
return ( attributes );
}
private String generateA2ZRandomString(final int lo, final int hi) {
@@ -178,7 +178,7 @@
final Object[] operParams = new Object[]{ target, name };
final String[] operSign = new String[]{ String.class.getName(), String.class.getName() };
return ( (String) mbsc.invoke(on, oper, operParams, operSign) );
-
+
}
///// Private /////
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/QueryMBeansTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/QueryMBeansTest.java
index 2d740bd..fa0940d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/QueryMBeansTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/QueryMBeansTest.java
@@ -40,7 +40,7 @@
public class QueryMBeansTest implements RemoteAdminQuicklookTest {
private MBeanServerConnection mbsc;
-
+
private long start, end;
public QueryMBeansTest() {}
@@ -70,18 +70,18 @@
public long getExecutionTime() {
return ( end - start );
}
-
+
private File getFile() {
String path = null; //set it to user passed arg
- if (path != null)
+ if (path != null)
return new File(path);
else return new File("./ListOfMbeans.txt");
}
-
+
private void queryAllMBeans() throws Exception {
ObjectName name = null;
QueryExp query = null;
-
+
String[] domains = mbsc.getDomains();
PrintWriter pw = null;
try {
@@ -91,23 +91,23 @@
Set<ObjectName> mbeanObjNames = mbsc.queryNames(name, query);
logDomainMBeansTofile(pw, domain, mbeanObjNames);
}
-
+
} catch (IOException ex) {
System.out.println(ex.getMessage());
} finally {
if (pw != null) pw.close();
}
}
-
- private void logDomainMBeansTofile(PrintWriter pw, String domain, Set<ObjectName> mbeanObjNames)
+
+ private void logDomainMBeansTofile(PrintWriter pw, String domain, Set<ObjectName> mbeanObjNames)
throws IOException {
pw.println("/***********************************************************/");
pw.println(" " + domain + " ");
pw.println("/***********************************************************/");
-
- for (ObjectName objName : mbeanObjNames)
+
+ for (ObjectName objName : mbeanObjNames)
pw.println(objName.toString());
pw.flush();
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/RemoteAdminQuicklookTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/RemoteAdminQuicklookTest.java
index 03f26a5a..cedf042 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/RemoteAdminQuicklookTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/RemoteAdminQuicklookTest.java
@@ -23,16 +23,16 @@
* com.sun.ejte.ccl.reporter.SimpleReporterAdapter.PASS and FAIL.
*/
public String test();
-
+
/** Sets the MBeanServerConnection for testing the stuff remotely. The parameter may
* not be null.
*/
public void setMBeanServerConnection(final MBeanServerConnection c);
-
+
/** Returns the name of the test.
*/
public String getName();
-
+
/** Returns the time taken by the test to execute in milliseconds
* @return long denoting the time taken for this test to execute
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/SMFTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/SMFTest.java
index aa1e613..6dac90e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/SMFTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/SMFTest.java
@@ -35,7 +35,7 @@
public class SMFTest implements RemoteAdminQuicklookTest {
private final static String CONFIG_FILE="smftest.properties";
//look at this file first
-
+
private long start, end;
public SMFTest() throws Exception {
setProperties();
@@ -47,10 +47,10 @@
}
public void setMBeanServerConnection(final MBeanServerConnection c) {
- }
+ }
public String getName() {
- return ( this.getClass().getName() );
+ return ( this.getClass().getName() );
}
public String test() {
@@ -67,7 +67,7 @@
finally {
end = System.currentTimeMillis();
}
-
+
}
private void setProperties() throws Exception {
final Properties additional = new Properties();
@@ -82,12 +82,12 @@
final String OS_VERS = "5.10";
System.out.println(System.getProperty("os.name"));
System.out.println(System.getProperty("os.version"));
- final boolean ok = OS_NAME.equals(System.getProperty("os.name")) &&
+ final boolean ok = OS_NAME.equals(System.getProperty("os.name")) &&
OS_VERS.equals(System.getProperty("os.version"));
if (!ok)
throw new RuntimeException("Runs only on Solaris 10");
}
-
+
private void createSMFService() {
final ServiceHandler smfsh = new SMFServiceHandler();
final SMFService ss = new SMFService();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/SimpleStandardCustomMBeanTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/SimpleStandardCustomMBeanTest.java
index 105d947..0d0413e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/SimpleStandardCustomMBeanTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/SimpleStandardCustomMBeanTest.java
@@ -33,13 +33,13 @@
public class SimpleStandardCustomMBeanTest implements RemoteAdminQuicklookTest {
private MBeanServerConnection mbsc;
-
+
private static final String BACKEND_MBEAN_ON = "com.sun.appserv:category=config,type=applications";
private static final String SS_CUSTOM_MBEAN_CLASS = "testmbeans.SimpleStandard";
private long start, end;
-
+
/**
- * Creates a new instance of SimpleStandardCustomMBeanTest
+ * Creates a new instance of SimpleStandardCustomMBeanTest
*/
public SimpleStandardCustomMBeanTest() {
}
@@ -70,7 +70,7 @@
end = System.currentTimeMillis();
}
}
-
+
private void testCreateDeleteListBasic() throws Exception {
final String target = null;
final Map<String, String> params = new HashMap<String, String> ();
@@ -98,7 +98,7 @@
}
}
///// Private /////
-
+
private String invokeCustomMBeanCreationMethod(final String target, final Map<String, String> params, final Map<String, String> attributes) throws Exception {
final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
final String oper = "createMBean";
@@ -119,7 +119,7 @@
final Object[] operParams = new Object[]{ target, name };
final String[] operSign = new String[]{ String.class.getName(), String.class.getName() };
return ( (String) mbsc.invoke(on, oper, operParams, operSign) );
-
+
}
///// Private /////
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/StringTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/StringTest.java
index 50f30e7..9254956 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/StringTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/StringTest.java
@@ -33,21 +33,21 @@
public StringTest() throws Exception
{
}
-
+
public long getExecutionTime()
{
return ( end - start );
}
-
+
public void setMBeanServerConnection(final MBeanServerConnection c)
{
}
-
+
public String getName()
{
return ( this.getClass().getName() );
}
-
+
public String test()
{
try
@@ -78,14 +78,14 @@
private void makeLog(ResourceBundle bundle)
{
-
+
List<Property> props = new ArrayList<Property>();
Enumeration<String> keys = bundle.getKeys();
while(keys.hasMoreElements())
{
String key = keys.nextElement();
-
+
try
{
String val = bundle.getString(key);
@@ -97,7 +97,7 @@
{
System.out.println("EXCEPTION getting value for " + key);
}
-
+
}
// now create a list of LogProperty from the props...
@@ -106,8 +106,8 @@
if(p.cause == false)
loglist.add(new LogProperty(p, props));
}
-
-
+
+
}
private void dumpLog()
{
@@ -117,10 +117,10 @@
for(LogProperty p : loglist)
System.out.println(p);
}
-
+
int parseNum(String s)
{
- try
+ try
{
return Integer.parseInt(s.substring(3, 7));
}
@@ -136,14 +136,14 @@
private List<ResourceBundle> bundles;
private List<LogProperty> loglist = new ArrayList<LogProperty>();
private final static String CMB_PREFIX = "ADM16";
-
+
class Property
{
Property(String k, String v)
{
key = k;
val = v;
-
+
if(key.startsWith(CMB_PREFIX))
{
num = parseNum(key);
@@ -171,24 +171,24 @@
int num;
boolean cause = false;
}
-
+
class LogProperty extends Property
{
LogProperty(Property mainProp, List<Property> allProps)
{
super(mainProp);
assert cause == false;
-
+
// look for cause...
-
+
for(Property prop : allProps)
{
if(!prop.cause)
continue;
-
+
if(num != prop.num)
continue;
-
+
causes.add(prop);
}
}
@@ -196,21 +196,21 @@
public String toString()
{
String ret = super.toString();
-
+
if(causes.size() <= 0)
return ret + " ***** MISSING DIAG MESSAGES *********" + "\n\n";
ret += "****** ASSOCIATED DIAG MESSAGES ****\n";
-
+
for(Property p : causes)
ret += p.toString();
-
+
return ret + "\n";
-
+
}
List<Property> causes = new ArrayList<Property>();
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/TestDriver.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/TestDriver.java
index c0eb5e1..0951c05 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/TestDriver.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/test/TestDriver.java
@@ -30,7 +30,7 @@
import javax.management.MBeanServerConnection;
public class TestDriver {
-
+
private String adminUser;
private String adminPassword;
private String adminHost;
@@ -41,7 +41,7 @@
private List<RemoteAdminQuicklookTest> tests;
private MBeanServerConnection mbsc;
private String testfileName;
-
+
private static final String SCRIPT_COMMENT = "#"; //this is how comment is denoted, traditionally
private static final SimpleReporterAdapter reporter = new SimpleReporterAdapter("devtests");
private static final String DESC = "Admin Infrastructure Devtests";
@@ -50,7 +50,7 @@
tests = new ArrayList<RemoteAdminQuicklookTest> ();
//loadProperties();
loadRmiProperties();
- testFile = new File(testfileName);
+ testFile = new File(testfileName);
initializeConnection();
initializeTestClasses();
}
@@ -90,7 +90,7 @@
} catch(final Exception e) {}
}
}
-
+
private RemoteAdminQuicklookTest c2T(final String testClass) throws RuntimeException {
try {
final Class c = Class.forName(testClass);
@@ -113,7 +113,7 @@
reporter.addStatus(t.getName(), reporter.PASS);
} catch(final Exception e) {
e.printStackTrace();
- reporter.addStatus(t.getName(), reporter.FAIL);
+ reporter.addStatus(t.getName(), reporter.FAIL);
total += t.getExecutionTime();
reporter.printSummary(getSummaryString(total));
System.out.println(getSummaryString(total));
@@ -133,7 +133,7 @@
final String status = t.test();
//reporter.addStatus(t.getName(), status);
}
-
+
private void loadRmiProperties() throws Exception {
final Properties rmip = new Properties();
@@ -149,7 +149,7 @@
}
/*
private void loadProperties()
- {
+ {
LocalStringsImpl lsi = new LocalStringsImpl();
useRmi = lsi.getBoolean("useRmi", true);
adminUser = lsi.getString("adminUser", "admin");
@@ -160,6 +160,6 @@
testfileName = lsi.getString("testfile", "tests.list");
isSecure = bisSecure.toString();
}
- */
+ */
///// private methods /////
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ASProbe.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ASProbe.java
index 8edbb0a..4e4924c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ASProbe.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ASProbe.java
@@ -38,81 +38,81 @@
{
refresh();
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
public long getHeapUsage()
{
refresh();
return heapUsage;
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
public long getHeapMax()
{
refresh();
return heapMax;
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
public int getThreadCount()
{
refresh();
return threadCount;
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
public int getPeakThreadCount()
{
refresh();
return peakThreadCount;
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
public int getNumApps()
{
refresh();
return numApps;
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
public int getNumEJBModules()
{
refresh();
return numEJB;
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
public int getNumWebModules()
{
refresh();
return numWeb;
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
public int getNumComponents()
{
refresh();
return numComponents;
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
public String[] getAppNames()
{
refresh();
return appNames;
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
public String[] getWebModuleNames()
{
refresh();
@@ -120,33 +120,33 @@
}
///////////////////////////////////////////////////////////////////////////
-
+
private void refresh()
{
long now = System.currentTimeMillis();
-
+
if(now - timestamp < 2000) // no more often than once per 2 seconds
return;
-
+
timestamp = now;
try
{
MBeanServerConnection mbsc = ManagementFactory.getPlatformMBeanServer();
-
+
MemoryMXBean mmb = ManagementFactory.newPlatformMXBeanProxy(mbsc,
ManagementFactory.MEMORY_MXBEAN_NAME, MemoryMXBean.class);
-
+
ThreadMXBean tmb = ManagementFactory.newPlatformMXBeanProxy(mbsc,
ManagementFactory.THREAD_MXBEAN_NAME, ThreadMXBean.class);
-
+
MemoryUsage mu = mmb.getHeapMemoryUsage();
heapUsage = mu.getCommitted();
heapMax = mu.getMax();
-
+
peakThreadCount = tmb.getPeakThreadCount();
threadCount = tmb.getThreadCount();
-
+
final ObjectName on = new ObjectName(BACKEND_MBEAN_ON);
final Object[] operParams = new Object[0];
final String[] operSign = new String[0];
@@ -154,19 +154,19 @@
String oper = "getAllDeployedJ2EEApplications";
ObjectName[] names = (ObjectName[])mbsc.invoke(on, oper, operParams, operSign);
numApps = names.length;
-
+
oper = "getAllDeployedEJBModules";
names = (ObjectName[])mbsc.invoke(on, oper, operParams, operSign);
numEJB = names.length;
-
+
oper = "getAllDeployedWebModules";
names = (ObjectName[])mbsc.invoke(on, oper, operParams, operSign);
numWeb = names.length;
-
+
oper = "getAllDeployedComponents";
names = (ObjectName[])mbsc.invoke(on, oper, operParams, operSign);
numComponents = names.length;
-
+
oper = "getJ2eeApplicationNamesList";
appNames = (String[])mbsc.invoke(on, oper, operParams, operSign);
@@ -179,9 +179,9 @@
heapUsage = -1;
}
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
private long timestamp;
private int numApps;
private int numEJB;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/AWT.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/AWT.java
index cf36716..6eeb57f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/AWT.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/AWT.java
@@ -26,7 +26,7 @@
public class AWT implements AWTMBean
{
-
+
private final String JMX_MONITOR_GAUGE_LOW = "jmx.monitor.gauge.low";
private final String JMX_MONITOR_GAUGE_HIGH = "jmx.monitor.gauge.high";
//private final String JMX_MONITOR_COUNTER_THRESHOLD = "jmx.monitor.counter.threshold";
@@ -42,8 +42,8 @@
// test the getResource in MBeanClassLoader
// also test this AWT code which will have a failed
// resource load of a log file
-
- Class clazz = getClass();
+
+ Class clazz = getClass();
URL url = clazz.getResource("/testmbeans/AWT.class");
String filename = "error";
@@ -52,7 +52,7 @@
url = clazz.getResource("AWT.class");
if(url != null)
filename = url.getPath();
-
+
String mesg = "If you see a filename -- getResource succeeded: " + filename;
JFrame.setDefaultLookAndFeelDecorated(true);
JFrame myFrame = new JFrame("Glassfish");
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ImplementsMBeanRegistration.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ImplementsMBeanRegistration.java
index f549984..3fa00bc 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ImplementsMBeanRegistration.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ImplementsMBeanRegistration.java
@@ -35,7 +35,7 @@
{
buildDynamicMBeanInfo();
}
-
+
/**
* Gets the value of the specified attribute of the DynamicMBean.
* @param attributeName The attribute name
@@ -46,16 +46,16 @@
ReflectionException {
if (attributeName.equals("Name")) {
-
+
//TODO return value of Name attribute
-
+
return null;
}
-
+
throw new AttributeNotFoundException("Unknown Attribute "
+ attributeName);
}
-
+
/**
* Sets the value of the specified attribute of the DynamicMBean.
* @param attribute The attribute to set
@@ -67,14 +67,14 @@
ReflectionException {
if (attribute.getName().equals("Name")) {
-
+
//TODO set value of Name attribute
-
- } else
+
+ } else
throw new AttributeNotFoundException("Unknown Attribute "
+ attribute.getName());
}
-
+
/**
* Allows an operation to be invoked on the DynamicMBean.
*/
@@ -87,7 +87,7 @@
new IllegalArgumentException("Unknown Operation " +
operationName));
}
-
+
/**
* Create the MBeanInfoConstructors.
* WARNING : if you add constructors to ImplementsMBeanRegistration class,
@@ -97,14 +97,14 @@
private MBeanConstructorInfo[] createConstructors() {
return super.createConstructors(getClass());
}
-
+
/**
* you shouldn't update the following code.
*/
public MBeanInfo getMBeanInfo() {
return dMBeanInfo;
}
-
+
/**
* Build the private dMBeanInfo field,
* which represents the management interface exposed by the MBean,
@@ -135,11 +135,11 @@
getNotificationInfo());
}
// </editor-fold>
-
+
public MBeanNotificationInfo[] getNotificationInfo() {
return new MBeanNotificationInfo[] {};
}
-
+
private MBeanInfo dMBeanInfo;
/**
@@ -193,7 +193,7 @@
public void postDeregister() {
//TODO postDeregister implementation;
}
-
-
+
+
private ObjectName myName;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ImplementsMBeanRegistrationDynamicSupport.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ImplementsMBeanRegistrationDynamicSupport.java
index dc3c355..6b0fe1a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ImplementsMBeanRegistrationDynamicSupport.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ImplementsMBeanRegistrationDynamicSupport.java
@@ -42,7 +42,7 @@
/* Creates a new instance of ImplementsMBeanRegistrationDynamicSupport */
public ImplementsMBeanRegistrationDynamicSupport() {
}
-
+
/**
* Gets the value of the specified attribute of the DynamicMBean.
* @param attributeName The attribute name
@@ -51,7 +51,7 @@
throws AttributeNotFoundException,
MBeanException,
ReflectionException;
-
+
/**
* Sets the value of the specified attribute of the DynamicMBean.
* @param attribute The attribute to set
@@ -61,7 +61,7 @@
InvalidAttributeValueException,
MBeanException,
ReflectionException;
-
+
/**
* Create the MBeanInfoConstructors.
*/
@@ -75,7 +75,7 @@
}
return infos;
}
-
+
/**
* Enables the get values of several attributes of the Dynamic MBean.
* @param attributeNames Array of attribute names
@@ -93,7 +93,7 @@
}
return resultList;
}
-
+
/**
* Sets the values of several attributes of the Dynamic MBean
* and returns the list of attributes that have been set.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/MicrowaveOvenImpl.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/MicrowaveOvenImpl.java
index 4f52ff7..34b2917 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/MicrowaveOvenImpl.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/MicrowaveOvenImpl.java
@@ -223,7 +223,7 @@
throws ListenerNotFoundException {
broadcaster.removeNotificationListener(listener, filter, handback);
}
- // </editor-fold>
+ // </editor-fold>
private synchronized long getNextSeqNumber() {
return seqNumber++;
@@ -232,5 +232,5 @@
private long seqNumber;
private final NotificationBroadcasterSupport broadcaster =
new NotificationBroadcasterSupport();
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ObjectNameSelfProvider.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ObjectNameSelfProvider.java
index edf469e..a130b5f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ObjectNameSelfProvider.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ObjectNameSelfProvider.java
@@ -98,9 +98,9 @@
/**
* Build the private dMBeanInfo field,
* which represents the management interface exposed by the MBean,
- * that is, the set of attributes, constructors, operations and
+ * that is, the set of attributes, constructors, operations and
* notifications which are available for management.
- *
+ *
* A reference to the dMBeanInfo object is returned by the getMBeanInfo()
* method of the DynamicMBean interface. Note that, once constructed,
* an MBeanInfo object is immutable.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ObjectNameSelfProviderDynamicSupport.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ObjectNameSelfProviderDynamicSupport.java
index ec41a63..cc8989f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ObjectNameSelfProviderDynamicSupport.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/ObjectNameSelfProviderDynamicSupport.java
@@ -116,4 +116,4 @@
}
return resultList;
}
-} //GEN-END:generatedCode
+} //GEN-END:generatedCode
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/OneClassDynamicMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/OneClassDynamicMBean.java
index 918f664..5d5fad4 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/OneClassDynamicMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/OneClassDynamicMBean.java
@@ -111,9 +111,9 @@
methodSignature = new String[] {
};
if (operationName.equals("sayHi") && Arrays.equals(signature, methodSignature)) {
-
+
//TODO add your code here
-
+
return null;
}
@@ -150,9 +150,9 @@
/**
* Build the private dMBeanInfo field,
* which represents the management interface exposed by the MBean,
- * that is, the set of attributes, constructors, operations and
+ * that is, the set of attributes, constructors, operations and
* notifications which are available for management.
- *
+ *
* A reference to the dMBeanInfo object is returned by the getMBeanInfo()
* method of the DynamicMBean interface. Note that, once constructed,
* an MBeanInfo object is immutable.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/PrimitiveStandard.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/PrimitiveStandard.java
index 4129e12..242db1a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/PrimitiveStandard.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/PrimitiveStandard.java
@@ -53,16 +53,16 @@
/** Attribute : Temperature */
private double temperature = 0.0;
-
+
/** Attribute: Name */
private String name = null;
-
+
/** Attribute: StartDate */
private Date sd = null;
-
+
/** Attribute ResourceObjectName */
private ObjectName ron = null;
-
+
/* Creates a new instance of PrimitiveStandard */
public PrimitiveStandard()
{
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/PrimitiveStandardMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/PrimitiveStandardMBean.java
index 8356353..378dc63 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/PrimitiveStandardMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/PrimitiveStandardMBean.java
@@ -110,7 +110,7 @@
*/
public void setTemperature(double value);
- /**
+ /**
* Get Name as the String
*/
public String getName();
@@ -118,22 +118,22 @@
* Set the Name
*/
public void setName(String name);
-
+
/**
* Get the StartDate attribute
*/
public Date getStartDate();
-
+
/**
* Set the StartDate attribute
*/
public void setStartDate(Date date);
-
+
/**
* Get the ObjectName of Resource
*/
public ObjectName getResourceObjectName();
-
+
/**
* Set the ObjectName of Resource
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/Reg.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/Reg.java
index 767dea6..68c277c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/Reg.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/Reg.java
@@ -30,7 +30,7 @@
{
buildDynamicMBeanInfo();
}
-
+
/**
* Gets the value of the specified attribute of the DynamicMBean.
* @param attributeName The attribute name
@@ -41,16 +41,16 @@
ReflectionException {
if (attributeName.equals("Name")) {
-
+
//TODO return value of Name attribute
-
+
return null;
}
-
+
throw new AttributeNotFoundException("Unknown Attribute "
+ attributeName);
}
-
+
/**
* Sets the value of the specified attribute of the DynamicMBean.
* @param attribute The attribute to set
@@ -62,14 +62,14 @@
ReflectionException {
if (attribute.getName().equals("Name")) {
-
+
//TODO set value of Name attribute
-
- } else
+
+ } else
throw new AttributeNotFoundException("Unknown Attribute "
+ attribute.getName());
}
-
+
/**
* Allows an operation to be invoked on the DynamicMBean.
*/
@@ -82,7 +82,7 @@
new IllegalArgumentException("Unknown Operation " +
operationName));
}
-
+
/**
* Create the MBeanInfoConstructors.
* WARNING : if you add constructors to ImplementsMBeanRegistration class,
@@ -92,14 +92,14 @@
private MBeanConstructorInfo[] createConstructors() {
return super.createConstructors(getClass());
}
-
+
/**
* you shouldn't update the following code.
*/
public MBeanInfo getMBeanInfo() {
return dMBeanInfo;
}
-
+
/**
* Build the private dMBeanInfo field,
* which represents the management interface exposed by the MBean,
@@ -130,11 +130,11 @@
getNotificationInfo());
}
// </editor-fold>
-
+
public MBeanNotificationInfo[] getNotificationInfo() {
return new MBeanNotificationInfo[] {};
}
-
+
private MBeanInfo dMBeanInfo;
/**
@@ -187,7 +187,7 @@
public void postDeregister() {
//TODO postDeregister implementation;
}
-
-
+
+
private ObjectName myName;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/SimpleStandard.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/SimpleStandard.java
index 81fd33c..ab9bda3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/SimpleStandard.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/src/testmbeans/SimpleStandard.java
@@ -110,7 +110,7 @@
throws ListenerNotFoundException {
broadcaster.removeNotificationListener(listener, filter, handback);
}
- // </editor-fold>
+ // </editor-fold>
private synchronized long getNextSeqNumber() {
return seqNumber++;
@@ -119,5 +119,5 @@
private long seqNumber;
private final NotificationBroadcasterSupport broadcaster =
new NotificationBroadcasterSupport();
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/testng/TestNGDriver.java b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/testng/TestNGDriver.java
index 445abc5..371e472 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/testng/TestNGDriver.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/admin/pe/testng/TestNGDriver.java
@@ -32,7 +32,7 @@
import test.*;
public class TestNGDriver {
-
+
private String adminUser;
private String adminPassword;
private String adminHost;
@@ -41,7 +41,7 @@
private boolean useRmi;
private MBeanServerConnection mbsc;
private String testfileName;
-
+
private static final String SCRIPT_COMMENT = "#"; //this is how comment is denoted, traditionally
@Configuration(beforeTestClass = true)
@@ -63,7 +63,7 @@
System.out.println("Using HTTP: " + mbsc.toString());
}
}
-
+
private RemoteAdminQuicklookTest c2T(final String testClass) throws RuntimeException {
try {
final Class c = Class.forName(testClass);
@@ -76,71 +76,71 @@
throw new RuntimeException(e);
}
}
-
+
private void runRemoteAdminTest(String testClass) {
RemoteAdminQuicklookTest t = c2T(testClass);
t.test();
}
@Test(groups = {"RemoteAdminTests"})
- public void runSimpleStandardCustomMBeanTest()
+ public void runSimpleStandardCustomMBeanTest()
{
runRemoteAdminTest("test.SimpleStandardCustomMBeanTest");
}
-
+
@Test(groups = {"RemoteAdminTests"})
- public void runPrimitiveDataTypeMBeanTest()
+ public void runPrimitiveDataTypeMBeanTest()
{
runRemoteAdminTest("test.PrimitiveDataTypeMBeanTest");
}
@Test(groups = {"RemoteAdminTests"})
- public void runObjectNameTest()
+ public void runObjectNameTest()
{
runRemoteAdminTest("test.ObjectNameTest");
}
- @Test(groups = {"RemoteAdminTests"})
- public void runJVMInformationTest()
+ @Test(groups = {"RemoteAdminTests"})
+ public void runJVMInformationTest()
{
runRemoteAdminTest("test.JVMInformationTest");
}
@Test(groups = {"RemoteAdminTests"})
- public void runAttributeSniffer()
+ public void runAttributeSniffer()
{
runRemoteAdminTest("test.AttributeSniffer");
}
- @Test(groups = {"RemoteAdminTests", "brokenTests"})
- public void runSMFTest()
+ @Test(groups = {"RemoteAdminTests", "brokenTests"})
+ public void runSMFTest()
{
runRemoteAdminTest("test.SMFTest");
}
@Test(groups = {"RemoteAdminTests"})
- public void runDeployManyMBeans()
+ public void runDeployManyMBeans()
{
runRemoteAdminTest("test.DeployManyMBeans");
}
@Test(groups = {"RemoteAdminTests"})
- public void runStringTest()
+ public void runStringTest()
{
runRemoteAdminTest("test.StringTest");
}
@Test(groups = {"RemoteAdminTests", "interactiveTests"})
- public void runGetResourceTest()
+ public void runGetResourceTest()
{
runRemoteAdminTest("test.GetResourceTest");
}
-
+
/***
* private void loadRmiProperties() throws Exception {
rmip = new Properties();
@@ -154,7 +154,7 @@
}
*/
private void loadProperties()
- {
+ {
LocalStringsImpl lsi = new LocalStringsImpl();
useRmi = lsi.getBoolean("useRmi", true);
adminUser = lsi.getString("adminUser", "admin");
@@ -165,6 +165,6 @@
testfileName = lsi.getString("testfile", "tests.list");
isSecure = bisSecure.toString();
}
-
+
///// private methods /////
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appclient.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appclient.xml
index 02cbeea..4d3779c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appclient.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appclient.xml
@@ -23,9 +23,9 @@
]>
<!--
- All appclient devtests can use the ant import task to include this file.
+ All appclient devtests can use the ant import task to include this file.
It defines several useful tasks:
-
+
all - clean, build, deploy, run, undeploy
clean
compile
@@ -33,12 +33,12 @@
deploy
undeploy
test
-
+
This project assumes that all tests include both a stand-alone client jar
and an embedded one. If a particular test does not include one or the other
of these, that test's build.xml can override any of the following targets
to make them no-ops:
-
+
build.ear
build.client
deploy.ear
@@ -47,7 +47,7 @@
undeploy.client
test.standalone.client
test.embedded.client
-
+
-->
<project name="importedAppclient" default=".">
@@ -56,9 +56,9 @@
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<!-- In this example there are only .java files for the client -->
-
+
<target name="compile" depends="init-common">
<antcall target="compile-common">
<param name="src" value="client"/>
@@ -67,21 +67,21 @@
<target name="build" depends="init-common">
<antcall target="build.client"/>
- <antcall target="build.ear"/>
-<!--
+ <antcall target="build.ear"/>
+<!--
<antcall target="build.ejb"/>
-->
</target>
-
+
<target name="build.ear">
<antcall target="ear-common"/>
- </target>
-
+ </target>
+
<!--
<target name="build.ejb">
<antcall target="ejb-common"/>
</target>
--->
+-->
<!--
The following implementation borrows heavily from the same target in
@@ -94,29 +94,29 @@
<property name="appclientjar.files" value="${build.classes.dir}"/>
<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
<property name="manifest.file" value="./client/MANIFEST.MF"/>
-
- <echo message="common.xml: Generating appclient-jar inside build directory"
+
+ <echo message="common.xml: Generating appclient-jar inside build directory"
level="verbose"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
- <copy file="${application-client.xml}"
- tofile="${build.classes.dir}/META-INF/application-client.xml"
+ <copy file="${application-client.xml}"
+ tofile="${build.classes.dir}/META-INF/application-client.xml"
failonerror="false"
overwrite="true"/>
<copy file="${sun-application-client.xml}" tofile="${build.classes.dir}/META-INF/sun-application-client.xml"
failonerror="false"
overwrite="true"/>
- <jar jarfile="${appclient.jar}" basedir="${appclientjar.files}"
- update="true" includes ="${appclientjar.classes}"
- manifest="${manifest.file}">
+ <jar jarfile="${appclient.jar}" basedir="${appclientjar.files}"
+ update="true" includes ="${appclientjar.classes}"
+ manifest="${manifest.file}">
<metainf dir="${build.classes.dir}/META-INF">
<include name="application-client.xml"/>
<include name="sun-application-client.xml"/>
</metainf>
<fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
- </jar>
+ </jar>
</target>
- <target name="deploy"
+ <target name="deploy"
depends="init-common">
<antcall target="deploy.ear"/>
<antcall target="deploy.client"/>
@@ -125,18 +125,18 @@
<target name="deploy.ear" depends="build.ear">
<antcall target="deploy-common"/>
</target>
-
+
<target name="deploy.client" depends="build.client">
<antcall target="deploy-common">
<param name="deployed.app" value="${assemble.dir}/${appname}-client.jar"/>
</antcall>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy.ear"/>
<antcall target="undeploy.client"/>
</target>
-
+
<target name="undeploy.ear" depends="init-common">
<antcall target="undeploy-common"/>
</target>
@@ -149,7 +149,7 @@
<antcall target="test.standalone.client"/>
<antcall target="test.embedded.client"/>
</target>
-
+
<target name="test.standalone.client" depends="init-common">
<antcall target="test.client">
<param name="urlpath" value="/${clientname}"/>
@@ -168,7 +168,7 @@
<property name="generated.appclient.jar" value="${appclient.jar}"/>
<antcall target="test.client"/>
</target>
-
+
<target name="test.client">
<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
<property name="generated.appclient.jar" value="${assemble.dir}/${appname}-clientClient.jar"/>
@@ -178,6 +178,6 @@
<arg line="${appclient.application.args}"/>
</exec>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/build.properties
index fabce0d..f99b652 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/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="appcpath"/>
<property name="appname" value="${module}"/>
@@ -26,7 +26,7 @@
<property name="application-client.xml" value="client/application-client.xml"/>
<property name="sun-application-client.xml" value="client/sun-application-client.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}/${clientname}.jar"/>
<property name="app.type" value="application"/>
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/build.xml
index 9a0b944..e5175cf 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/build.xml
@@ -26,11 +26,11 @@
<!--
Makes sure that the setting of APPCPATH prior to running the appclient
script behaves correctly.
-
- This script builds an app client and a separate library jar that is not
+
+ This script builds an app client and a separate library jar that is not
bundled with the app client. The test does not deploy the app client but
- simply invokes the app client jar directly.
-
+ simply invokes the app client jar directly.
+
-->
<project name="appcpath" default="usage" basedir=".">
@@ -45,7 +45,7 @@
</target>
<!--
- No need to deploy (or undeploy) because we can use an undeployed stand-alone app
+ No need to deploy (or undeploy) because we can use an undeployed stand-alone app
client to test this feature.
-->
<target name="all" depends="build,run"/>
@@ -53,7 +53,7 @@
<target name="clean" depends="init">
<antcall target="clean-common"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="lib"/>
@@ -61,7 +61,7 @@
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
-
+
<antcall target="compile-common">
<param name="src" value="${env.APS_HOME}/util/reporter"/>
</antcall>
@@ -71,25 +71,25 @@
<mkdir dir="${assemble.dir}"/>
<!-- Build the stand-alone app client. -->
<antcall target="package-appclientjar-common">
- <param name="appclientjar.files" value="${build.classes.dir}"/>
+ <param name="appclientjar.files" value="${build.classes.dir}"/>
<param name="appclientjar.classes" value="**/client/*.class **/reporter/*.class"/>
<param name="appclient.jar" value="${assemble.dir}/${clientname}.jar"/>
</antcall>
- <!-- Build the library jar. -->
- <jar jarfile="${lib.jar.file}"
- basedir="${build.classes.dir}"
- update="true" includes ="**/lib/*.class"
+ <!-- Build the library jar. -->
+ <jar jarfile="${lib.jar.file}"
+ basedir="${build.classes.dir}"
+ update="true" includes ="**/lib/*.class"
/>
- </target>
-
+ </target>
+
<target name="deploy">
<echo>The "deploy" target is not used in this test.</echo>
</target>
<target name="undeploy">
<echo>The "undeploy" target is not used in this test.</echo>
- </target>
+ </target>
<target name="run" depends="init">
<echo>Testing stand-alone client...</echo>
@@ -98,18 +98,18 @@
This test should fail.
-->
<runclient appcpath-setting="no-where" resultproperty="expectFailure" expectedOutcome="fail"/>
-
+
<!--
Now run with the correct setting for APPCPATH - pointing to the
previously-build library jar. This test should pass.
-->
<runclient appcpath-setting="${lib.jar.file}" resultproperty="expectSuccess" expectedOutcome="pass"/>
-
+
<condition property="result" value="passed" else="failed">
<and>
<equals arg1="${expectFailure}" arg2="1"/>
<equals arg1="${expectSuccess}" arg2="0"/>
- </and>
+ </and>
</condition>
<echo>Test result: ${result}</echo>
</target>
@@ -134,8 +134,8 @@
</exec>
</sequential>
</macrodef>
-
-
+
+
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/TestAPPCPATH.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/TestAPPCPATH.java
index 109df66..5f74c4e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/TestAPPCPATH.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/TestAPPCPATH.java
@@ -26,7 +26,7 @@
* @author tjquinn
*/
public class TestAPPCPATH {
-
+
private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
@@ -35,7 +35,7 @@
*/
public TestAPPCPATH() {
}
-
+
/**
* @param args the command line arguments
*/
@@ -53,9 +53,9 @@
stat.printSummary("APPCPATH");
System.exit(status);
}
-
+
}
-
+
private void run(String[] args) throws Throwable {
/*
*Use a class in the other jar file. The APPCPATH env. var.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/application-client.xml
index d5948a6..067404c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/client/application-client.xml
@@ -28,8 +28,8 @@
<application-client xmlns='http://java.sun.com/xml/ns/javaee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd'
- version="5">
-
+ version="5">
+
<display-name>Your App Client Here</display-name>
</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/lib/LibUtil.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/lib/LibUtil.java
index 02bbf7c..5b14217 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/lib/LibUtil.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/appcpath/lib/LibUtil.java
@@ -21,9 +21,9 @@
* @author tjquinn
*/
public class LibUtil {
-
+
/** Creates a new instance of LibUtil */
public LibUtil() {
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/build.xml
index 7e8c3a4..1861d3a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/build.xml
@@ -39,7 +39,7 @@
<ant dir="${subtest.name}" target="all"/>
<record name="${subtest.name}.output" action="stop"/>
</target>
-
+
<target name="showArgs">
<antcall target="runsubtest">
<param name="subtest.name" value="showArgs"/>
@@ -57,12 +57,12 @@
<param name="subtest.name" value="showArgsWithSignedLib"/>
</antcall>
</target>
-
+
<target name="usage">
- <echo>
- Usage:
- ant showArgs (Executes simple argument-passing tests)
- ant all (Executes all the jws tests)
- </echo>
+ <echo>
+ Usage:
+ ant showArgs (Executes simple argument-passing tests)
+ ant all (Executes all the jws tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/build.properties
index cee1461..02f6587 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/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="forceFailure"/>
<property name="appname" value="${module}"/>
@@ -25,7 +25,7 @@
<property name="application.xml" value="ear/application.xml"/>
<property name="application-client.xml" value="client/application-client.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}/${clientname}.jar"/>
<property name="app.type" value="application"/>
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/build.xml
index a6f6c42..16c8659 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/build.xml
@@ -31,16 +31,16 @@
&testproperties;
&jwsSetup;
-
+
<target name="all" depends="build,deploy,run,undeploy"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<!-- In this example there are only .java files for the client -->
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="client"/>
@@ -48,17 +48,17 @@
</target>
<target name="build">
- <antcall target="build.client"/>
+ <antcall target="build.client"/>
</target>
-
+
<target name="build.client" depends="compile">
<antcall target="appclient-jar-common">
<param name="application-client.xml" value="client/application-client.xml"/>
<param name="appclientjar.classes" value="**/*.class" />
</antcall>
</target>
-
- <target name="deploy"
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy.client"/>
</target>
@@ -68,15 +68,15 @@
<param name="deployed.app" value="${assemble.dir}/${appname}-client.jar"/>
</antcall>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy.client"/>
</target>
-
+
<target name="undeploy.client" depends="init-common">
<antcall target="undeploy-client-common"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="test.standalone.client"/>
<antcall target="test.embedded.client"/>
@@ -89,21 +89,21 @@
</target>
<target name="test.client" depends="init-common">
-
+
<fail unless="urlpath">Please specify the argument 'urlpath' when invoking test.client</fail>
<!--
- The very simple client under test just writes the arguments it
- receives out to a file.
+ The very simple client under test just writes the arguments it
+ receives out to a file.
-->
-
- <run-jws
+
+ <run-jws
urlpath="${urlpath}"
resultproperty="result"
/>
- <echo>Result property is ${result}</echo>
+ <echo>Result property is ${result}</echo>
</target>
-
+
<target name="usage">
<antcall target="usage-common"/>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/ShowArgsClientForcedFailure.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/ShowArgsClientForcedFailure.java
index 48f3472..14755a3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/ShowArgsClientForcedFailure.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/ShowArgsClientForcedFailure.java
@@ -28,12 +28,12 @@
* @author tjquinn
*/
public class ShowArgsClientForcedFailure {
-
-
+
+
/** Creates a new instance of ShowArgsClient */
public ShowArgsClientForcedFailure() {
}
-
+
/**
* @param args the command line arguments
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/application-client.xml
index b69bdb9..dbeb0b6 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/forceFailure/client/application-client.xml
@@ -28,8 +28,8 @@
<application-client xmlns='http://java.sun.com/xml/ns/javaee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd'
- version="5">
-
+ version="5">
+
<display-name>Force Failure</display-name>
</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/jwsSetup.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/jwsSetup.xml
index 91e8eee..8f850b0 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/jwsSetup.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/jwsSetup.xml
@@ -45,48 +45,48 @@
<os family="windows"/>
</condition>
-
+
<!-- runjws macro
-
+
Attributes on the <runjws> invocation that can/must be passed in by the caller:
args
- list of the values to be passed to the app client via the URL's query string.
+ list of the values to be passed to the app client via the URL's query string.
To use a different delimiter, pass argdelimiter with the value set to
the delimiter you want to use.
-
+
argdelimiter
the character which separates arguments in the args value
-
+
urlpath
the path part of the URL to be used in invoking the app client
-
+
There is no default value. When you deploy a stand-alone
app client, the default path the app server will recognize is the
module ID of the app client. In tests, this is often ${appname}-client.
- For an embedded app client, the default path the app server will
- recognize is
-
+ For an embedded app client, the default path the app server will
+ recognize is
+
${module ID of the Java EE app}/${URI to the appclient jar}
-
+
The URI to the app client jar is the text value of the <java> element
for this app client in the ear's application.xml.
-
+
keeptempfiles
-
+
pass "true" to retain temporary files created to run the client; default is "false"
-
+
sunaccdir
sunaccname
-
+
define these to point to the glassfish-acc.xml directory and the file within that
- directory to be used when invoking the client - these default to
+ directory to be used when invoking the client - these default to
${env.S1AS_HOME}/domains/${admin.domain}/config and glassfish-acc.xml
-
+
resultproperty
the name of an ant property to be set with the completion status
of the javaws invocation. The default is the property name "result."
-
+
-->
<macrodef name="run-jws">
@@ -97,10 +97,10 @@
<attribute name="argdelimiter" default=" "/>
<attribute name="resultproperty" default="result"/>
<attribute name="keeptempfiles" default="false"/>
-
+
<sequential>
-
-
+
+
<!--
The next few lines convert the caller's argument list into a
form suitable as a query string in a URL, with arg= preceding
@@ -121,24 +121,24 @@
<isset property="user.args.introducer"/>
</not>
</condition>
-
+
<!--
Create a platform-neutral representation for the sunacc.xml file.
-->
<neutralize property="glassfish-acc.xml.neutral" file="@{sunaccdir}/@{sunaccname}"/>
-
+
<property name="url" value="http://${http.host}:${http.port}@{urlpath}?arg=-xml&arg=${glassfish-acc.xml.neutral}${user.args.introducer}${user.args.part.of.url}"/>
<echo level="verbose">URL is ${url}</echo>
- <exec executable="${javaws.cmd}"
- resultproperty="@{resultproperty}"
- failonerror="false"
+ <exec executable="${javaws.cmd}"
+ resultproperty="@{resultproperty}"
+ failonerror="false"
output="${build.classes.dir}/javaws.log"
>
<arg value="${javaws.waitOption}"/> <!-- Ask Java Web Start to wait until the client finished before exiting -->
<arg value="${url}"/>
- </exec>
-
+ </exec>
+
<condition property="discard.temp.files">
<isfalse value="@{keeptempfiles}"/>
</condition>
@@ -146,11 +146,11 @@
</sequential>
</macrodef>
-
+
<target name="delete.runjws.temp.files" if="discard.temp.files">
<delete file="${argstemp.tmp}" quiet="true"/>
</target>
-
+
<macrodef name="neutralize" >
<attribute name="property"/>
<attribute name="file"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/build.properties
index c22af17..b7f9294 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/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="showArgs"/>
<property name="appname" value="${module}"/>
@@ -25,7 +25,7 @@
<property name="application.xml" value="ear/application.xml"/>
<property name="application-client.xml" value="client/application-client.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}/${clientname}.jar"/>
<property name="app.type" value="application"/>
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/build.xml
index 5642397..59c7820 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/build.xml
@@ -46,9 +46,9 @@
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<!-- In this example there are only .java files for the client -->
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="client"/>
@@ -58,7 +58,7 @@
<target name="build">
<antcall target="build.ear"/> <!-- also builds the client -->
</target>
-
+
<target name="build.ear" depends="build.clients,build.other.jar">
<antcall target="spc-ear-common">
<!--
@@ -66,7 +66,7 @@
-->
<param name="application.xml" value="ear/application-with-client-2-at-subdir.xml"/>
</antcall>
- </target>
+ </target>
<!--
other.jar contains a class used from the client. We package it
@@ -176,7 +176,7 @@
<target name="deploy.ear" depends="build.ear">
<antcall target="deploy-common"/>
</target>
-
+
<target name="deploy.client" depends="build.client">
<antcall target="deploy-common">
<param name="deployed.app" value="${assemble.dir}/${appname}-client.jar"/>
@@ -193,12 +193,12 @@
<arg line="${assemble.dir}/${appname}-client2.jar"/>
</exec>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy.ear"/>
<!-- <antcall target="undeploy.clients"/>-->
</target>
-
+
<target name="undeploy.ear" depends="init-common">
<antcall target="undeploy-common"/>
</target>
@@ -219,17 +219,17 @@
<target name="init-report">
<delete failonerror="false" file="${summaryFilePath}"/>
</target>
-
+
<target name="report">
<concat>
<fileset dir="." includes="${summaryFilePath}"/>
</concat>
</target>
-
+
<target name="run" depends="init-common">
<!-- <antcall target="test.standalone.client"/>-->
<antcall target="test.embedded.clients"/>
-
+
</target>
<target name="test.standalone.client">
@@ -275,8 +275,8 @@
<delete file="${clientOutputFile}"/>
</target>
-
-
+
+
<target name="usage">
<antcall target="usage-common"/>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/Other.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/Other.java
index e7f3787..857b47d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/Other.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/Other.java
@@ -24,8 +24,8 @@
* @author tjquinn
*/
public class Other {
-
+
public static String hi() {
return "From other.Other";
- }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/ShowArgsClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/ShowArgsClient.java
index 0d206c0..d7170bf 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/ShowArgsClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/ShowArgsClient.java
@@ -36,22 +36,22 @@
* @author tjquinn
*/
public class ShowArgsClient {
-
+
private String outFileSpec = null;
private PrintStream outStream = null;
private String expectedArgsFileSpec = null;
-
+
private static String statusFileSpec = null;
-
+
private Vector<String> otherArgs = new Vector<String>();
-
+
private Map<String,String> optionValues = new HashMap<String,String>();
-
+
/** Creates a new instance of ShowArgsClient */
public ShowArgsClient() {
}
-
+
/**
* @param args the command line arguments
*/
@@ -78,9 +78,9 @@
}
}
}
-
+
}
-
+
private void run(String[] args) throws FileNotFoundException, IOException {
System.out.println("Result from invoking method in other.jar: " + Other.hi());
System.out.println("Command line arguments:");
@@ -89,27 +89,27 @@
}
System.out.println();
prepareArguments(args);
-
+
/*
- *Default is for all output to go to System.out, which will be a
+ *Default is for all output to go to System.out, which will be a
*trace file in the Java Web Start directory if Java Web Start tracing is on.
*/
if (outStream == null) {
outStream = System.out;
}
-
+
outStream.println("Command line arguments:");
for (String arg : args) {
outStream.println(arg);
}
-
+
// /*
// *Make sure the command line argument values for otherArgs agree with
// *what is stored in the temporary file.
// */
// checkActualArgsVsExpected();
-//
-
+//
+
outStream.flush();
}
@@ -128,12 +128,12 @@
}
otherArgsAsLine.append(s);
}
-
+
if ( ! otherArgsAsLine.toString().equals(expectedArgValues)) {
throw new IllegalArgumentException("Actual arguments were " + otherArgsAsLine.toString() + "; expected " + expectedArgValues);
}
}
-
+
private void prepareArguments(String[] args) throws IllegalArgumentException, FileNotFoundException {
for (int i = 0; i < args.length; i++) {
if (args[i].charAt(0) == '-') {
@@ -151,7 +151,7 @@
}
// statusFileSpec = optionValues.get("statusFile");
// expectedArgsFileSpec = optionValues.get("expectedArgsFile");
-
+
System.out.println("out = " + outFileSpec);
if (outFile != null) {
System.out.println(" which is the file " + outFile.getAbsolutePath());
@@ -160,7 +160,7 @@
// System.out.println("expectedArgsFile = " + expectedArgsFileSpec);
System.out.println("Other arguments: " + otherArgs);
-
+
// if (outFileSpec == null || statusFileSpec == null || expectedArgsFileSpec == null) {
// throw new IllegalArgumentException("At least one of -out, -statusFile, and -expectedArgsFile is missing and all are required");
// }
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/ShowArgsClient2.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/ShowArgsClient2.java
index 0fad96e..259bce8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/ShowArgsClient2.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/ShowArgsClient2.java
@@ -37,20 +37,20 @@
* @author tjquinn
*/
public class ShowArgsClient2 {
-
+
private String outFileSpec = null;
private PrintStream outStream = null;
private String expectedArgsFileSpec = null;
-
+
private Vector<String> otherArgs = new Vector<String>();
-
+
private Map<String,String> optionValues = new HashMap<String,String>();
-
+
/** Creates a new instance of ShowArgsClient */
public ShowArgsClient2() {
}
-
+
/**
* @param args the command line arguments
*/
@@ -64,9 +64,9 @@
status = 1;
throw new RuntimeException("Client detected the following error", thr);
}
-
+
}
-
+
private void run(String[] args) throws FileNotFoundException, IOException {
System.err.println("Command line arguments from client #2:");
for (String arg : args) {
@@ -74,15 +74,15 @@
}
System.out.println();
prepareArguments(args);
-
+
/*
- *Default is for all output to go to System.out, which will be a
+ *Default is for all output to go to System.out, which will be a
*trace file in the Java Web Start directory if Java Web Start tracing is on.
*/
if (outStream == null) {
outStream = System.out;
}
-
+
outStream.println("Command line arguments:");
for (int i = 0; i < 25; i++) {
outStream.println("This is a test line to use up some space: " + i);
@@ -90,14 +90,14 @@
for (String arg : args) {
outStream.println(arg);
}
-
+
// /*
// *Make sure the command line argument values for otherArgs agree with
// *what is stored in the temporary file.
// */
// checkActualArgsVsExpected();
-//
-
+//
+
outStream.flush();
}
@@ -116,12 +116,12 @@
}
otherArgsAsLine.append(s);
}
-
+
if ( ! otherArgsAsLine.toString().equals(expectedArgValues)) {
throw new IllegalArgumentException("Actual arguments were " + otherArgsAsLine.toString() + "; expected " + expectedArgValues);
}
}
-
+
private void prepareArguments(String[] args) throws IllegalArgumentException, FileNotFoundException {
for (int i = 0; i < args.length; i++) {
if (args[i].charAt(0) == '-') {
@@ -139,7 +139,7 @@
}
// statusFileSpec = optionValues.get("statusFile");
// expectedArgsFileSpec = optionValues.get("expectedArgsFile");
-
+
System.err.println("out = " + outFileSpec);
if (outFile != null) {
System.err.println(" which is the file " + outFile.getAbsolutePath());
@@ -148,7 +148,7 @@
// System.err.println("expectedArgsFile = " + expectedArgsFileSpec);
System.err.println("Other arguments: " + otherArgs);
-
+
// if (outFileSpec == null || statusFileSpec == null || expectedArgsFileSpec == null) {
// throw new IllegalArgumentException("At least one of -out, -statusFile, and -expectedArgsFile is missing and all are required");
// }
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/application-client.xml
index ae84a57..a4f35dd 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/application-client.xml
@@ -28,8 +28,8 @@
<application-client xmlns='http://java.sun.com/xml/ns/javaee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd'
- version="5">
-
+ version="5">
+
<display-name>Show Arguments</display-name>
</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/sun-application-client.xml
index e6ccff2..eb16038 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/sun-application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/client/sun-application-client.xml
@@ -20,6 +20,6 @@
<sun-application-client>
<java-web-start-access>
- <jnlp-doc>myLaunch.jnlp</jnlp-doc>
+ <jnlp-doc>myLaunch.jnlp</jnlp-doc>
</java-web-start-access>
</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/ear/application-with-client-at-top-level.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/ear/application-with-client-at-top-level.xml
index 6ecb115..4b48376 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/ear/application-with-client-at-top-level.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showArgs/ear/application-with-client-at-top-level.xml
@@ -29,14 +29,14 @@
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd'
version="5">
-
+
<!--
- With the following element commented out, deployment throws an
+ With the following element commented out, deployment throws an
exception.
-->
-
+
<display-name>show-args</display-name>
-
+
<module>
<java>showArgs-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/build.properties
index a64a6e9..17e4de8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/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="showWithLib"/>
<property name="appname" value="${module}"/>
@@ -25,7 +25,7 @@
<property name="application.xml" value="ear/application.xml"/>
<property name="application-client.xml" value="client/application-client.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}/${clientname}.jar"/>
<property name="app.type" value="application"/>
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/build.xml
index df1d448..34ac575 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/build.xml
@@ -38,7 +38,7 @@
<property name="lib.jar.path" value="lib.jar"/>
<target name="build" depends="build.ear"/>
-
+
<target name="sign.jar" depends="build.lib">
<signjar verbose="true" jar="${assemble.dir}/lib/lib.jar" alias="s1as" storepass="changeit"
keypass="changeit" keystore="${env.S1AS_HOME}/domains/domain1/config/keystore.jks"
@@ -61,8 +61,8 @@
<include name="META-INF/application.xml"/>
</fileset>
</jar>
- </target>
-
+ </target>
+
<target name="build.lib" depends="compile">
<mkdir dir="${assemble.dir}"/>
<mkdir dir="${assemble.dir}/lib"/>
@@ -71,8 +71,8 @@
<include name="**/lib/*.class"/>
</fileset>
</jar>
- </target>
-
+ </target>
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="."/>
@@ -98,10 +98,10 @@
<antcall target="undeploy-common"/>
</target>
-->
-
+
<target name="run" depends="init-common,test.embedded.client"/>
-
+
<target name="usage">
<antcall target="usage-common"/>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/client/Client.java
index 4b23d02..023aea0 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/client/Client.java
@@ -40,15 +40,15 @@
* @author tjquinn
*/
public class Client {
-
+
private Vector<String> otherArgs = new Vector<String>();
-
+
private Map<String,String> optionValues = new HashMap<String,String>();
-
+
/** Creates a new instance of ShowArgsClient */
public Client() {
}
-
+
/**
* @param args the command line arguments
*/
@@ -61,9 +61,9 @@
status = 1;
throw new RuntimeException("Client detected the following error", thr);
}
-
+
}
-
+
private void run(String[] args) throws FileNotFoundException, IOException {
System.err.println("In Client");
ClassLoader cl = Thread.currentThread().getContextClassLoader();
@@ -84,16 +84,16 @@
}
System.out.println();
prepareArguments(args);
-
+
System.out.println("Command line arguments:");
for (String arg : args) {
System.out.println(arg);
}
-
+
System.out.flush();
}
-
+
private void prepareArguments(String[] args) throws IllegalArgumentException, FileNotFoundException {
for (int i = 0; i < args.length; i++) {
if (args[i].charAt(0) == '-') {
@@ -104,6 +104,6 @@
}
System.out.println("Other arguments: " + otherArgs);
-
+
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/ear/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/ear/application.xml
index 03a6c40..6e8ef8f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/ear/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithLib/ear/application.xml
@@ -29,14 +29,14 @@
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd'
version="5">
-
+
<!--
- With the following element commented out, deployment throws an
+ With the following element commented out, deployment throws an
exception.
-->
-
+
<display-name>show-args</display-name>
-
+
<module>
<java>showWithLib-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/build.properties
index a53ab6a..722ee0d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/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="showWithSignedLib"/>
<property name="appname" value="${module}"/>
@@ -25,7 +25,7 @@
<property name="application.xml" value="ear/application.xml"/>
<property name="application-client.xml" value="client/application-client.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}/${clientname}.jar"/>
<property name="app.type" value="application"/>
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/build.xml
index 452259a..570a382 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/build.xml
@@ -37,7 +37,7 @@
<property name="lib.jar.path" value="signedlib.jar"/>
<target name="build" depends="build.ear"/>
-
+
<target name="sign.jar" depends="build.lib">
<signjar verbose="true" jar="${assemble.dir}/lib/lib.jar" alias="s1as" storepass="changeit"
keypass="changeit" keystore="${env.S1AS_HOME}/domains/domain1/config/keystore.jks"
@@ -60,8 +60,8 @@
<include name="META-INF/application.xml"/>
</fileset>
</jar>
- </target>
-
+ </target>
+
<target name="build.lib" depends="compile">
<mkdir dir="${assemble.dir}"/>
<mkdir dir="${assemble.dir}/lib"/>
@@ -70,8 +70,8 @@
<include name="**/lib/*.class"/>
</fileset>
</jar>
- </target>
-
+ </target>
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="."/>
@@ -97,10 +97,10 @@
<antcall target="undeploy-common"/>
</target>
-->
-
+
<target name="run" depends="init-common,test.embedded.client"/>
-
+
<target name="usage">
<antcall target="usage-common"/>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/client/Client.java
index 4b23d02..023aea0 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/client/Client.java
@@ -40,15 +40,15 @@
* @author tjquinn
*/
public class Client {
-
+
private Vector<String> otherArgs = new Vector<String>();
-
+
private Map<String,String> optionValues = new HashMap<String,String>();
-
+
/** Creates a new instance of ShowArgsClient */
public Client() {
}
-
+
/**
* @param args the command line arguments
*/
@@ -61,9 +61,9 @@
status = 1;
throw new RuntimeException("Client detected the following error", thr);
}
-
+
}
-
+
private void run(String[] args) throws FileNotFoundException, IOException {
System.err.println("In Client");
ClassLoader cl = Thread.currentThread().getContextClassLoader();
@@ -84,16 +84,16 @@
}
System.out.println();
prepareArguments(args);
-
+
System.out.println("Command line arguments:");
for (String arg : args) {
System.out.println(arg);
}
-
+
System.out.flush();
}
-
+
private void prepareArguments(String[] args) throws IllegalArgumentException, FileNotFoundException {
for (int i = 0; i < args.length; i++) {
if (args[i].charAt(0) == '-') {
@@ -104,6 +104,6 @@
}
System.out.println("Other arguments: " + otherArgs);
-
+
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/ear/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/ear/application.xml
index 03a6c40..6e8ef8f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/ear/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/jws/showWithSignedLib/ear/application.xml
@@ -29,14 +29,14 @@
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd'
version="5">
-
+
<!--
- With the following element commented out, deployment throws an
+ With the following element commented out, deployment throws an
exception.
-->
-
+
<display-name>show-args</display-name>
-
+
<module>
<java>showWithLib-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/build.xml
index b6af915..93428f6 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/build.xml
@@ -76,16 +76,16 @@
</target>
<target name="usage">
- <echo> Usage:
- ant enroller (Executes the enroller tests)
- ant all (Executes all the ejb bmp tests)
- ant clean (cleans all the ejb bmp tests)
- ant build (builds all the ejb bmp tests)
- ant setup (sets up all resources for bmp tests)
- ant deploy (deploys all the ejb bmp apps)
- ant run (Executes all the ejb bmp tests)
- ant undeploy (undeploys all the bmp apps)
- ant unsetup (unsets all resources for bmp tests)
- </echo>
+ <echo> Usage:
+ ant enroller (Executes the enroller tests)
+ ant all (Executes all the ejb bmp tests)
+ ant clean (cleans all the ejb bmp tests)
+ ant build (builds all the ejb bmp tests)
+ ant setup (sets up all resources for bmp tests)
+ ant deploy (deploys all the ejb bmp apps)
+ ant run (Executes all the ejb bmp tests)
+ ant undeploy (undeploys all the bmp apps)
+ ant unsetup (unsets all resources for bmp tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/build.properties
index 97bd94c..78c9f81 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/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/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/build.xml
index 2a8ff57..77d6b16 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/build.xml
@@ -32,25 +32,25 @@
&run;
<target name="all">
- <antcall target="setup"/>
- <antcall target="build-single-appclientjar"/>
- <antcall target="deploy"/>
- <antcall target="run-single-appclient-jar"/>
- <antcall target="undeploy"/>
+ <antcall target="setup"/>
+ <antcall target="build-single-appclientjar"/>
+ <antcall target="deploy"/>
+ <antcall target="run-single-appclient-jar"/>
+ <antcall target="undeploy"/>
<antcall target="unsetup"/>
<antcall target="setup"/>
- <antcall target="build-multi-appclientjar"/>
- <antcall target="deploy"/>
- <antcall target="run-multi-appclient-jar1"/>
- <antcall target="run-multi-appclient-jar2"/>
- <antcall target="undeploy"/>
+ <antcall target="build-multi-appclientjar"/>
+ <antcall target="deploy"/>
+ <antcall target="run-multi-appclient-jar1"/>
+ <antcall target="run-multi-appclient-jar2"/>
+ <antcall target="undeploy"/>
<antcall target="unsetup"/>
</target>
<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,49 +62,49 @@
<target name="build-single-appclientjar" 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="build-multi-appclientjar" depends="compile">
<antcall target="package-appclientjar">
- <param name="appclientjar.files"
+ <param name="appclientjar.files"
value="${build.classes.dir}"/>
- <param name="appclient.jar"
+ <param name="appclient.jar"
value="${assemble.dir}/${appname}-client1.jar"/>
</antcall>
<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" />
<param name="application.xml"
value="./application.xml"/>
</antcall>
- </target>
+ </target>
<target name="package-appclientjar" depends="init-common">
<delete file="${appclient.jar}"/>
- <echo message="common.xml: Generating appclient-jar inside build directory"
+ <echo message="common.xml: Generating appclient-jar inside build directory"
level="verbose"/>
<mkdir dir="${assemble.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="./MANIFEST.MF">
+ <jar jarfile="${appclient.jar}" basedir="${appclientjar.files}"
+ update="true" includes ="${appclientjar.classes}"
+ manifest="./MANIFEST.MF">
<metainf dir="${build.classes.dir}/META-INF">
<include name="application-client.xml"/>
<include name="sun-application-client.xml"/>
</metainf>
- </jar>
-</target>
-
+ </jar>
+</target>
+
<target name="setup" depends="init-common">
@@ -114,14 +114,14 @@
<antcall target="deploy-jdbc-common">
<param name="jdbc.conpool.name" value="bmpEnrollerPool"/>
<param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB"/>
- </antcall>
- <antcall target="reconfig-common"/>
+ </antcall>
+ <antcall target="reconfig-common"/>
</target>
<target name="deploy" depends="init-common">
<echo message="Deploying via asadmin..."/>
<antcall target="deploy-common"/>
- </target>
+ </target>
<target name="run-single-appclient-jar" depends="init-common">
<echo message="Running app client with no -mainclass option for app with single app client jar"/>
@@ -162,7 +162,7 @@
<param name="sql.file" value="sql/create_pointbase.sql"/>
</antcall>
</target>
-
+
<target name="run-multi-appclient-jar1" depends="init-common">
<echo message="Running app client with -mainclass option for app with 2 app client jars"/>
<exec executable="${APPCLIENT}" failonerror="true">
@@ -189,7 +189,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-sql-common">
@@ -199,7 +199,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"/>
@@ -216,7 +216,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/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/EnrollerClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/EnrollerClient.java
index 9266484..505d64c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/EnrollerClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/EnrollerClient.java
@@ -24,7 +24,7 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
/**
- * A simple java client will:
+ * A simple java client will:
* <ul>
* <li>Locates the home interface of the enterprise bean
* <li>Gets a reference to the remote interface
@@ -36,11 +36,11 @@
private SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
- public static void main(String[] args) {
- EnrollerClient client = new EnrollerClient();
+ public static void main(String[] args) {
+ EnrollerClient client = new EnrollerClient();
// run the tests
- client.runTestClient();
+ client.runTestClient();
}
public void runTestClient() {
@@ -59,22 +59,22 @@
try {
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleStudent");
- StudentHome sHome =
- (StudentHome) PortableRemoteObject.narrow(objref,
+ StudentHome sHome =
+ (StudentHome) PortableRemoteObject.narrow(objref,
StudentHome.class);
Student denise = sHome.create("823", "Denise Smith");
objref = initial.lookup("java:comp/env/ejb/SimpleCourse");
- CourseHome cHome =
- (CourseHome) PortableRemoteObject.narrow(objref,
+ CourseHome cHome =
+ (CourseHome) PortableRemoteObject.narrow(objref,
CourseHome.class);
Course power = cHome.create("220", "Power J2EE Programming");
objref = initial.lookup("java:comp/env/ejb/SimpleEnroller");
- EnrollerHome eHome =
- (EnrollerHome) PortableRemoteObject.narrow(objref,
+ EnrollerHome eHome =
+ (EnrollerHome) PortableRemoteObject.narrow(objref,
EnrollerHome.class);
Enroller enroller = eHome.create();
@@ -93,7 +93,7 @@
System.out.println(courseId + " " + course.getName());
}
System.out.println();
-
+
Course intro = cHome.findByPrimaryKey("777");
System.out.println(intro.getName() + ":");
courses = intro.getStudentIds();
@@ -103,12 +103,12 @@
Student student = sHome.findByPrimaryKey(studentId);
System.out.println(studentId + " " + student.getName());
}
-
+
stat.addStatus("enroller bmp", stat.PASS);
} catch (Exception ex) {
stat.addStatus("enroller bmp", stat.FAIL);
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}
- }
-}
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/EnrollerClientwithManifest.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/EnrollerClientwithManifest.java
index 9552e91..d1192fc 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/EnrollerClientwithManifest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/client/EnrollerClientwithManifest.java
@@ -30,11 +30,11 @@
private SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
- public static void main(String[] args) {
- EnrollerClientwithManifest client = new EnrollerClientwithManifest();
+ public static void main(String[] args) {
+ EnrollerClientwithManifest client = new EnrollerClientwithManifest();
// run the tests
- client.runTestClient();
+ client.runTestClient();
}
public void runTestClient() {
@@ -53,22 +53,22 @@
try {
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleStudent");
- StudentHome sHome =
- (StudentHome) PortableRemoteObject.narrow(objref,
+ StudentHome sHome =
+ (StudentHome) PortableRemoteObject.narrow(objref,
StudentHome.class);
Student denise = sHome.create("823", "Joe Somebody");
objref = initial.lookup("java:comp/env/ejb/SimpleCourse");
- CourseHome cHome =
- (CourseHome) PortableRemoteObject.narrow(objref,
+ CourseHome cHome =
+ (CourseHome) PortableRemoteObject.narrow(objref,
CourseHome.class);
Course power = cHome.create("220", "Book : Manifest.MF wins");
objref = initial.lookup("java:comp/env/ejb/SimpleEnroller");
- EnrollerHome eHome =
- (EnrollerHome) PortableRemoteObject.narrow(objref,
+ EnrollerHome eHome =
+ (EnrollerHome) PortableRemoteObject.narrow(objref,
EnrollerHome.class);
Enroller enroller = eHome.create();
@@ -87,7 +87,7 @@
System.out.println(courseId + " " + course.getName());
}
System.out.println();
-
+
Course intro = cHome.findByPrimaryKey("777");
System.out.println(intro.getName() + ":");
courses = intro.getStudentIds();
@@ -97,12 +97,12 @@
Student student = sHome.findByPrimaryKey(studentId);
System.out.println(studentId + " " + student.getName());
}
-
+
stat.addStatus("enroller bmp", stat.PASS);
} catch (Exception ex) {
stat.addStatus("enroller bmp", stat.FAIL);
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}
- }
-}
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Course.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Course.java
index d2a4674..05b9fc0 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Course.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Course.java
@@ -22,24 +22,24 @@
public interface Course extends EJBObject {
-
+
/**
* Returns an arraylist of StudentIds taking the course.
- * @exception RemoteException
+ * @exception RemoteException
*/
public ArrayList getStudentIds() throws RemoteException;
/**
* Returns the name of the course.
- * @exception RemoteException
- *
+ * @exception RemoteException
+ *
*/
public String getName() throws RemoteException;
/**
* Sets the name of the course.
- * @exception RemoteException
- *
+ * @exception RemoteException
+ *
*/
public void setName(String name) throws RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/CourseBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/CourseBean.java
index aa8eec0..822eaf4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/CourseBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/CourseBean.java
@@ -105,7 +105,7 @@
(DataSource) ic.lookup("java:comp/env/jdbc/bmp-enrollerDB");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/Enroller");
- enrollerHome =
+ enrollerHome =
(EnrollerHome) PortableRemoteObject.narrow(objref,
EnrollerHome.class);
} catch (Exception ex) {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/CourseHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/CourseHome.java
index a969a3b..de8e4fb 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/CourseHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/CourseHome.java
@@ -30,12 +30,12 @@
*/
public Course create(String courseId, String name)
throws RemoteException, CreateException;
-
+
/**
* Gets a reference to the remote interface to the CourseBean object by Primary Key.
* @exception throws FinderException and RemoteException.
*
*/
- public Course findByPrimaryKey(String courseId)
+ public Course findByPrimaryKey(String courseId)
throws FinderException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Enroller.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Enroller.java
index 1ed88fd..7cdeee8 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Enroller.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Enroller.java
@@ -21,7 +21,7 @@
import java.rmi.RemoteException;
public interface Enroller extends EJBObject {
-
+
/**
* Enrolls a Student in a course
* @param studentId primary key of the student object
@@ -40,7 +40,7 @@
public void unEnroll(String studentId, String courseId)
throws RemoteException;
/**
- * Deletes a Student
+ * Deletes a Student
* @param studentId primary key of the student object
* @exception RemoteException
*/
@@ -49,7 +49,7 @@
throws RemoteException;
/**
- * Deletes a Course
+ * Deletes a Course
* @param courseId primary key of the course object
* @exception RemoteException
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/EnrollerBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/EnrollerBean.java
index ce9877f..a0b847a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/EnrollerBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/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.*;
@@ -24,7 +24,7 @@
import javax.naming.*;
public class EnrollerBean implements SessionBean {
-
+
private Connection con;
private String dbName = "java:comp/env/jdbc/bmp-enrollerDB";
private SessionContext context;
@@ -59,7 +59,7 @@
}
/**
- * Deletes a Student
+ * Deletes a Student
* @param studentId primary key of the student object
* @exception RemoteException
*/
@@ -72,7 +72,7 @@
}
/**
- * Deletes a Course
+ * Deletes a Course
* @param courseId primary key of the course object
* @exception RemoteException
*/
@@ -162,7 +162,7 @@
String insertStatement =
"insert into enrollment values ( ? , ? )";
- PreparedStatement prepStmt =
+ PreparedStatement prepStmt =
con.prepareStatement(insertStatement);
prepStmt.setString(1, studentId);
@@ -172,7 +172,7 @@
prepStmt.close();
}
- private void deleteEntry(String studentId, String courseId)
+ private void deleteEntry(String studentId, String courseId)
throws SQLException {
String deleteStatement =
@@ -215,13 +215,13 @@
prepStmt.close();
}
- private ArrayList selectStudent(String courseId)
+ private ArrayList selectStudent(String courseId)
throws SQLException {
String selectStatement =
"select studentid " +
"from enrollment where courseid = ? ";
- PreparedStatement prepStmt =
+ PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, courseId);
@@ -237,13 +237,13 @@
return a;
}
- private ArrayList selectCourse(String studentId)
+ private ArrayList selectCourse(String studentId)
throws SQLException {
String selectStatement =
"select courseid " +
"from enrollment where studentid = ? ";
- PreparedStatement prepStmt =
+ PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, studentId);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Student.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Student.java
index 6a8bd29..ce3cec4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Student.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/Student.java
@@ -22,9 +22,9 @@
public interface Student extends EJBObject {
-
+
/**
- * Returns the CourseIds that a student is enrolled in.
+ * Returns the CourseIds that a student is enrolled in.
* @param studentId primary key of the student object
* @param courseId primary key of the course object
* @exception RemoteException
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/StudentBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/StudentBean.java
index b45e517..0858b0a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/StudentBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/StudentBean.java
@@ -98,7 +98,7 @@
courseIds = new ArrayList();
try {
InitialContext ic = new InitialContext();
- dataSource =
+ dataSource =
(DataSource) ic.lookup("java:comp/env/jdbc/bmp-enrollerDB");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/Enroller");
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/StudentHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/StudentHome.java
index 2ae3de5..fca5446 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/StudentHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/ejb/StudentHome.java
@@ -36,7 +36,7 @@
* @exception throws FinderException and RemoteException.
*
*/
-
- public Student findByPrimaryKey(String studentId)
+
+ public Student findByPrimaryKey(String studentId)
throws FinderException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/sql/create_pointbase.sql b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/sql/create_pointbase.sql
index 205d60f..963a923 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/sql/create_pointbase.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/sql/create_pointbase.sql
@@ -1,37 +1,37 @@
-create table student
-(studentid varchar(3) constraint pk_student primary key,
-name varchar(36));
-
-insert into student
-values ('123', 'Sal Jones');
-insert into student
-values ('221', 'Alice Smith');
-insert into student
-values ('388', 'Elizabeth Willis');
-insert into student
-values ('456', 'Joe Smith');
-
-
-create table course
-(courseid varchar(3) constraint pk_course primary key,
-name varchar(36));
-
-insert into course
-values ('999', 'Advanced Java Programming');
-insert into course
-values ('111', 'J2EE for Smart People');
-insert into course
-values ('333', 'XML Made Easy');
-insert into course
-values ('777', 'An Introduction to Java Programming');
-
-create table enrollment
-(studentid varchar(3),
-courseid varchar(3),
-constraint fk_studentid
-foreign key (studentid)
-references student(studentid),
-constraint fk_courseid
-foreign key (courseid)
-references course(courseid));
-
+create table student
+(studentid varchar(3) constraint pk_student primary key,
+name varchar(36));
+
+insert into student
+values ('123', 'Sal Jones');
+insert into student
+values ('221', 'Alice Smith');
+insert into student
+values ('388', 'Elizabeth Willis');
+insert into student
+values ('456', 'Joe Smith');
+
+
+create table course
+(courseid varchar(3) constraint pk_course primary key,
+name varchar(36));
+
+insert into course
+values ('999', 'Advanced Java Programming');
+insert into course
+values ('111', 'J2EE for Smart People');
+insert into course
+values ('333', 'XML Made Easy');
+insert into course
+values ('777', 'An Introduction to Java Programming');
+
+create table enrollment
+(studentid varchar(3),
+courseid varchar(3),
+constraint fk_studentid
+foreign key (studentid)
+references student(studentid),
+constraint fk_courseid
+foreign key (courseid)
+references course(courseid));
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/sql/drop_pointbase.sql b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/sql/drop_pointbase.sql
index 2d0ed15..06e5705 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/sql/drop_pointbase.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/mainclassoption/enroller/sql/drop_pointbase.sql
@@ -1,3 +1,3 @@
-drop table enrollment;
-drop table student;
-drop table course;
+drop table enrollment;
+drop table student;
+drop table course;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/build.properties
index ad6e55e..e2415e4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/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="showArgsGUI"/>
<property name="appname" value="${module}"/>
@@ -25,7 +25,7 @@
<property name="application-client.xml" value="client/application-client.xml"/>
<property name="sun-application-client.xml" value="client/sun-application-client.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}/${clientname}.jar"/>
<property name="app.type" value="application"/>
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/build.xml
index a50ca08..c6dcf31 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/build.xml
@@ -46,32 +46,32 @@
<!-- Build the app client. -->
<antcall target="package-appclientjar-common">
- <param name="appclientjar.files" value="${build.classes.dir}"/>
+ <param name="appclientjar.files" value="${build.classes.dir}"/>
<param name="appclientjar.classes" value="**/client/*.class **/reporter/*.class"/>
<param name="appclient.jar" value="${appclient.jar.path}"/>
</antcall>
<!-- add the images and custom JNLP file -->
- <jar jarfile="${appclient.jar.path}" basedir="."
+ <jar jarfile="${appclient.jar.path}" basedir="."
update="true" includes="**/*.jpg **/*.gif **/*.jnlp"/>
- <!-- Build the library jar. -->
+ <!-- Build the library jar. -->
<!--
- <jar jarfile="${lib.jar.file}"
- basedir="${build.classes.dir}"
- update="true" includes ="**/lib/*.class"
+ <jar jarfile="${lib.jar.file}"
+ basedir="${build.classes.dir}"
+ update="true" includes ="**/lib/*.class"
/>
-->
- </target>
-
+ </target>
-
+
+
<target name="run" depends="init-common">
<echo>Testing stand-alone client...</echo>
<antcall target="test.standalone.client"/>
</target>
-
+
<target name="usage">
<antcall target="usage-common"/>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/buildWithImages.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/buildWithImages.xml
index 9b508dd..d1eb764 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/buildWithImages.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/buildWithImages.xml
@@ -46,30 +46,30 @@
<!-- Build the app client. -->
<antcall target="package-appclientjar-common">
- <param name="appclientjar.files" value="${build.classes.dir}"/>
+ <param name="appclientjar.files" value="${build.classes.dir}"/>
<param name="appclientjar.classes" value="**/client/*.class **/reporter/*.class"/>
<param name="appclient.jar" value="${appclient.jar.path}"/>
</antcall>
<!-- add the images -->
- <jar jarfile="${appclient.jar.path}" basedir="."
+ <jar jarfile="${appclient.jar.path}" basedir="."
update="true" includes="**/*.jpg **/*.gif"/>
- <!-- Build the library jar. -->
- <jar jarfile="${lib.jar.file}"
- basedir="${build.classes.dir}"
- update="true" includes ="**/lib/*.class"
+ <!-- Build the library jar. -->
+ <jar jarfile="${lib.jar.file}"
+ basedir="${build.classes.dir}"
+ update="true" includes ="**/lib/*.class"
/>
- </target>
-
+ </target>
-
+
+
<target name="run" depends="init-common">
<echo>Testing stand-alone client...</echo>
<antcall target="test.standalone.client"/>
</target>
-
+
<target name="usage">
<antcall target="usage-common"/>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/SampleClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/SampleClient.java
index 58182dd..aaca3c7 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/SampleClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/SampleClient.java
@@ -37,7 +37,7 @@
public SampleClient() {
initComponents();
}
-
+
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
@@ -78,7 +78,7 @@
pack();
}// </editor-fold>//GEN-END:initComponents
-
+
/**
* @param args the command line arguments
*/
@@ -90,7 +90,7 @@
client.setVisible(true);
System.out.println("Just set visible to TRUE");
}
-
+
public Runnable init(String args[]) {
client = new SampleClient();
client.initArgs(args);
@@ -107,7 +107,7 @@
}.init(args));
System.out.println("About to return from static main");
}
-
+
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JList argValueList;
private javax.swing.JLabel jLabel1;
@@ -115,7 +115,7 @@
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTextArea jTextArea1;
// End of variables declaration//GEN-END:variables
-
+
private void initArgs(String[] args) {
argValueList.setListData(args);
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/application-client.xml
index ae84a57..a4f35dd 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appclient/showargsgui/client/application-client.xml
@@ -28,8 +28,8 @@
<application-client xmlns='http://java.sun.com/xml/ns/javaee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application-client_5.xsd'
- version="5">
-
+ version="5">
+
<display-name>Show Arguments</display-name>
</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/build.xml
index 07d694d..e16c513 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/build.xml
@@ -64,7 +64,7 @@
<junit>
<classpath refid="global_cp"/>
<test name="com.sun.enterprise.config.serverbeans.validation.tests.SystemNamespaceTest">
- <formatter type="plain"/>
+ <formatter type="plain"/>
</test>
</junit>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/AdminObjectResourceDeleteTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/AdminObjectResourceDeleteTest.java
index 0e1ad46..2f5a6c4 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/AdminObjectResourceDeleteTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/AdminObjectResourceDeleteTest.java
@@ -47,43 +47,43 @@
aor.setResAdapter("generic-ra");
aor.setResType("connector.MyAdminObject");
final ConfigContext configCtx =ConfigFactory.createConfigContext("domain.xml", new MyHandler());
- final Resources r = (Resources) ServerBeansFactory.getDomainBean(configCtx).getResources();
+ final Resources r = (Resources) ServerBeansFactory.getDomainBean(configCtx).getResources();
assertNotNull("Unexpected null Resources object", r);
r.addAdminObjectResource(aor);
assertEquals(aor, r.getAdminObjectResourceByJndiName("toby/aor"));
configCtx.flush();
// Construct the deleter:
- final String xpath=aor.getXPath();
+ final String xpath=aor.getXPath();
assertEquals("/domain/resources/admin-object-resource[@jndi-name='toby/aor']", xpath);
- ConfigDelete configDelete=ConfigChangeFactory.createConfigDelete(xpath);
+ ConfigDelete configDelete=ConfigChangeFactory.createConfigDelete(xpath);
assertEquals("delete xpath=/domain/resources/admin-object-resource[@jndi-name='toby/aor']", ""+configDelete);
-
+
final ConfigContext ctx2 = (ConfigContext)configCtx.clone();
ctx2.updateFromConfigChange(configDelete);
-
+
// Demonstrate that its no longer there for ctx2
- Resources r2 = (Resources) ServerBeansFactory.getDomainBean(ctx2).getResources();
+ Resources r2 = (Resources) ServerBeansFactory.getDomainBean(ctx2).getResources();
assertNotNull("Unexpected null Resources object", r2);
assertNull("Unexpected AdminObjectResource from ctx2", r2.getAdminObjectResourceByJndiName("toby/aor"));
-
+
// If we don't do a flush()/refresh() we find that the AdminObject is still available
// from the original context
-
- r2 = (Resources) ServerBeansFactory.getDomainBean(configCtx).getResources();
+
+ r2 = (Resources) ServerBeansFactory.getDomainBean(configCtx).getResources();
assertNotNull("Unexpected null Resources object", r2);
-
+
// WE DONT WANT THIS - THIS IS THE PROBLEM
assertNotNull("Unexpected AdminObjectResource from configCtx", r2.getAdminObjectResourceByJndiName("toby/aor"));
-
+
// The flush()/refresh() is necessary to get the changed clone to write to disc
// and the original to read from disc, thus communicating the change between them
ctx2.flush();
configCtx.refresh(true);
-
+
// and now its gone away!
- r2 = (Resources) ServerBeansFactory.getDomainBean(configCtx).getResources();
+ r2 = (Resources) ServerBeansFactory.getDomainBean(configCtx).getResources();
assertNotNull("Unexpected null Resources object", r2);
assertNull("Unexpected AdminObjectResource from configCtx", r2.getAdminObjectResourceByJndiName("toby/aor"));
}
@@ -120,5 +120,5 @@
return ts;
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/ConfigBeanTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/ConfigBeanTest.java
index b58403b..786b2b6 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/ConfigBeanTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/ConfigBeanTest.java
@@ -71,10 +71,10 @@
as.addJmxConnector(jc);
assertNotNull(jc.beanProp());
assertTrue(jc.beanProp().isIndexed());
-
+
}
-
-
+
+
// This test demonstrates that an element that has different
// cardinality will have different xpath expressions
public void testXPath() throws Exception {
@@ -94,7 +94,7 @@
jc.setName("jc1");
as.addJmxConnector(jc);
assertEquals("/domain/configs/config[@name='server-config']/admin-service/jmx-connector[@name='jc1']", as.getJmxConnectorByName("jc1").getXPath());
-
+
}
@@ -130,5 +130,5 @@
return ts;
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/MyHandler.java b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/MyHandler.java
index 57c3cb4..0f9ab66 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/MyHandler.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/MyHandler.java
@@ -30,6 +30,6 @@
catch (Exception e){
return null;
}
-
+
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/domain.orig.xml b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/domain.orig.xml
index 3564158..3dde397 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/domain.orig.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/appserv-commons/com/sun/enterprise/config/domain.orig.xml
@@ -17,7 +17,7 @@
--><!-- Generated from default-domain.xml.template --><!DOCTYPE domain PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 8.0 Domain//EN" "http://www.sun.com/software/appserver/dtds/sun-domain_1_1.dtd">
-<domain application-root="${com.sun.aas.instanceRoot}/applications" log-root="${com.sun.aas.instanceRoot}/logs">
+<domain application-root="${com.sun.aas.instanceRoot}/applications" log-root="${com.sun.aas.instanceRoot}/logs">
<applications>
<web-module name="adminapp" context-root="/web1" location="${com.sun.aas.installRoot}/lib/install/applications/adminapp/adminapp_war" object-type="system-admin" enabled="true" directory-deployed="true" availability-enabled="false">
<!-- System Web Module - DO NOT DELETE! -->
@@ -54,206 +54,206 @@
<http-listener id="admin-listenerUnSecure" address="0.0.0.0" port="16289" acceptor-threads="100" security-enabled="false" default-virtual-server="__asadminUnSecure" server-name="" xpowered-by="true" enabled="true">
</http-listener>
<virtual-server id="server" http-listeners="http-listener-1,http-listener-2" hosts="${com.sun.aas.hostName}" state="on">
- <property name="docroot" value="${com.sun.aas.instanceRoot}/docroot"/>
- <property name="accesslog" value="${com.sun.aas.instanceRoot}/logs/access"/>
+ <property name="docroot" value="${com.sun.aas.instanceRoot}/docroot"/>
+ <property name="accesslog" value="${com.sun.aas.instanceRoot}/logs/access"/>
</virtual-server>
<virtual-server id="__asadmin" http-listeners="admin-listener" hosts="${com.sun.aas.hostName}" state="on" default-web-module="admingui">
- <property name="docroot" value="${com.sun.aas.instanceRoot}/docroot"/>
- <property name="accesslog" value="${com.sun.aas.instanceRoot}/logs/access"/>
+ <property name="docroot" value="${com.sun.aas.instanceRoot}/docroot"/>
+ <property name="accesslog" value="${com.sun.aas.instanceRoot}/logs/access"/>
</virtual-server>
<virtual-server id="__asadminUnSecure" http-listeners="admin-listenerUnSecure" hosts="${com.sun.aas.hostName}" state="on" default-web-module="com_sun_web_ui">
- <property name="docroot" value="${com.sun.aas.instanceRoot}/docroot"/>
- <property name="accesslog" value="${com.sun.aas.instanceRoot}/logs/access"/>
+ <property name="docroot" value="${com.sun.aas.instanceRoot}/docroot"/>
+ <property name="accesslog" value="${com.sun.aas.instanceRoot}/logs/access"/>
</virtual-server><http-protocol ssl-enabled="true"/></http-service>
<iiop-service client-authentication-required="false">
- <orb use-thread-pool-ids="thread-pool-1" message-fragment-size="1024" max-connections="1024"/>
+ <orb use-thread-pool-ids="thread-pool-1" message-fragment-size="1024" max-connections="1024"/>
- <iiop-listener id="orb-listener-1" address="0.0.0.0" port="3700" enabled="true" security-enabled="false"/>
- <iiop-listener id="SSL" address="0.0.0.0" port="1060" security-enabled="true" enabled="true">
- <ssl cert-nickname="s1as" client-auth-enabled="false" tls-enabled="true" ssl2-enabled="false" ssl3-enabled="true" tls-rollback-enabled="true"/>
- </iiop-listener>
- <iiop-listener id="SSL_MUTUALAUTH" address="0.0.0.0" port="1061" security-enabled="true" enabled="true">
- <ssl cert-nickname="s1as" client-auth-enabled="true" tls-enabled="true" ssl2-enabled="false" ssl3-enabled="true" tls-rollback-enabled="true"/>
- </iiop-listener>
+ <iiop-listener id="orb-listener-1" address="0.0.0.0" port="3700" enabled="true" security-enabled="false"/>
+ <iiop-listener id="SSL" address="0.0.0.0" port="1060" security-enabled="true" enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="false" tls-enabled="true" ssl2-enabled="false" ssl3-enabled="true" tls-rollback-enabled="true"/>
+ </iiop-listener>
+ <iiop-listener id="SSL_MUTUALAUTH" address="0.0.0.0" port="1061" security-enabled="true" enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="true" tls-enabled="true" ssl2-enabled="false" ssl3-enabled="true" tls-rollback-enabled="true"/>
+ </iiop-listener>
</iiop-service>
<admin-service system-jmx-connector-name="system" type="das-and-server">
- <!-- The JSR 160 "system-jmx-connector" -->
- <jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp" security-enabled="true"><ssl cert-nickname="s1as" ssl3-enabled="true" tls-enabled="true" client-auth-enabled="false"/><property name="client-hostname" value="toby-compaq.red.iplanet.com"/>
- </jmx-connector>
- <!-- The JSR 160 "system-jmx-connector" -->
- <das-config dynamic-reload-enabled="true" dynamic-reload-poll-interval-in-seconds="2" autodeploy-enabled="true" autodeploy-polling-interval-in-seconds="2" autodeploy-dir="${com.sun.aas.instanceRoot}/autodeploy" autodeploy-verifier-enabled="false" autodeploy-jsp-precompilation-enabled="false" deploy-xml-validation="full" admin-session-timeout-in-minutes="60"/>
+ <!-- The JSR 160 "system-jmx-connector" -->
+ <jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" enabled="true" name="system" port="8686" protocol="rmi_jrmp" security-enabled="true"><ssl cert-nickname="s1as" ssl3-enabled="true" tls-enabled="true" client-auth-enabled="false"/><property name="client-hostname" value="toby-compaq.red.iplanet.com"/>
+ </jmx-connector>
+ <!-- The JSR 160 "system-jmx-connector" -->
+ <das-config dynamic-reload-enabled="true" dynamic-reload-poll-interval-in-seconds="2" autodeploy-enabled="true" autodeploy-polling-interval-in-seconds="2" autodeploy-dir="${com.sun.aas.instanceRoot}/autodeploy" autodeploy-verifier-enabled="false" autodeploy-jsp-precompilation-enabled="false" deploy-xml-validation="full" admin-session-timeout-in-minutes="60"/>
</admin-service>
<web-container>
- <session-config>
- <session-manager>
- <manager-properties/>
- <store-properties/>
- </session-manager>
- <session-properties/>
- </session-config>
+ <session-config>
+ <session-manager>
+ <manager-properties/>
+ <store-properties/>
+ </session-manager>
+ <session-properties/>
+ </session-config>
</web-container>
- <ejb-container steady-pool-size="0" pool-resize-quantity="8" max-pool-size="32" cache-resize-quantity="32" max-cache-size="512" pool-idle-timeout-in-seconds="600" cache-idle-timeout-in-seconds="600" removal-timeout-in-seconds="5400" victim-selection-policy="nru" commit-option="B" session-store="${com.sun.aas.instanceRoot}/session-store">
- <ejb-timer-service max-redeliveries="1" redelivery-interval-internal-in-millis="5000" minimum-delivery-interval-in-millis="7000"/>
+ <ejb-container steady-pool-size="0" pool-resize-quantity="8" max-pool-size="32" cache-resize-quantity="32" max-cache-size="512" pool-idle-timeout-in-seconds="600" cache-idle-timeout-in-seconds="600" removal-timeout-in-seconds="5400" victim-selection-policy="nru" commit-option="B" session-store="${com.sun.aas.instanceRoot}/session-store">
+ <ejb-timer-service max-redeliveries="1" redelivery-interval-internal-in-millis="5000" minimum-delivery-interval-in-millis="7000"/>
</ejb-container>
<mdb-container steady-pool-size="0" pool-resize-quantity="8" max-pool-size="32" idle-timeout-in-seconds="600"/>
<jms-service init-timeout-in-seconds="60" type="LOCAL" reconnect-interval-in-seconds="60" reconnect-attempts="3" reconnect-enabled="true" addresslist-behavior="random" addresslist-iterations="3">
- <jms-host name="default_JMS_host" host="toby-compaq.red.iplanet.com" port="7676" admin-user-name="admin" admin-password="admin"/>
+ <jms-host name="default_JMS_host" host="toby-compaq.red.iplanet.com" port="7676" admin-user-name="admin" admin-password="admin"/>
</jms-service>
<log-service file="${com.sun.aas.instanceRoot}/logs/server.log" use-system-logging="false" log-to-console="false" alarms="false" log-rotation-limit-in-bytes="2000000000" log-rotation-timelimit-in-minutes="0">
- <module-log-levels root="INFO" server="INFO" ejb-container="INFO" cmp-container="INFO" mdb-container="INFO" web-container="INFO" classloader="INFO" configuration="INFO" naming="INFO" security="INFO" admin="INFO" jts="INFO" jta="INFO" deployment="INFO" verifier="INFO" jaxr="INFO" jaxrpc="INFO" saaj="INFO" corba="INFO" javamail="INFO" jms="INFO" connector="INFO" jdo="INFO" cmp="INFO" util="INFO" resource-adapter="INFO" synchronization="INFO" node-agent="INFO"/>
+ <module-log-levels root="INFO" server="INFO" ejb-container="INFO" cmp-container="INFO" mdb-container="INFO" web-container="INFO" classloader="INFO" configuration="INFO" naming="INFO" security="INFO" admin="INFO" jts="INFO" jta="INFO" deployment="INFO" verifier="INFO" jaxr="INFO" jaxrpc="INFO" saaj="INFO" corba="INFO" javamail="INFO" jms="INFO" connector="INFO" jdo="INFO" cmp="INFO" util="INFO" resource-adapter="INFO" synchronization="INFO" node-agent="INFO"/>
</log-service>
<security-service default-realm="file" anonymous-role="ANYONE" audit-enabled="false" jacc="default" audit-modules="default">
- <!-- All administrative users use this realm by default. -->
- <auth-realm name="admin-realm" classname="com.sun.enterprise.security.auth.realm.file.FileRealm">
- <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"/>
- <property name="jaas-context" value="fileRealm"/>
- </auth-realm>
- <!-- All administrative users use this realm by default. -->
- <auth-realm name="file" classname="com.sun.enterprise.security.auth.realm.file.FileRealm">
- <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"/>
- <property name="jaas-context" value="fileRealm"/>
- </auth-realm>
- <auth-realm name="certificate" classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm">
- </auth-realm>
- <jacc-provider name="default" policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory">
- <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"/>
- </jacc-provider>
- <audit-module name="default" classname="com.sun.enterprise.security.Audit">
- <property name="auditOn" value="false"/>
- </audit-module>
+ <!-- All administrative users use this realm by default. -->
+ <auth-realm name="admin-realm" classname="com.sun.enterprise.security.auth.realm.file.FileRealm">
+ <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"/>
+ <property name="jaas-context" value="fileRealm"/>
+ </auth-realm>
+ <!-- All administrative users use this realm by default. -->
+ <auth-realm name="file" classname="com.sun.enterprise.security.auth.realm.file.FileRealm">
+ <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"/>
+ <property name="jaas-context" value="fileRealm"/>
+ </auth-realm>
+ <auth-realm name="certificate" classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm">
+ </auth-realm>
+ <jacc-provider name="default" policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory">
+ <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"/>
+ </jacc-provider>
+ <audit-module name="default" classname="com.sun.enterprise.security.Audit">
+ <property name="auditOn" value="false"/>
+ </audit-module>
</security-service>
<transaction-service automatic-recovery="false" timeout-in-seconds="0" tx-log-dir="${com.sun.aas.instanceRoot}/logs" heuristic-decision="rollback" keypoint-interval="2048" retry-timeout-in-seconds="600"/>
<monitoring-service>
- <module-monitoring-levels thread-pool="OFF" orb="OFF" ejb-container="OFF" web-container="OFF" transaction-service="OFF" http-service="OFF" jdbc-connection-pool="OFF" connector-connection-pool="OFF" connector-service="OFF" jvm="OFF" jms-service="OFF"/>
+ <module-monitoring-levels thread-pool="OFF" orb="OFF" ejb-container="OFF" web-container="OFF" transaction-service="OFF" http-service="OFF" jdbc-connection-pool="OFF" connector-connection-pool="OFF" connector-service="OFF" jvm="OFF" jms-service="OFF"/>
</monitoring-service>
<java-config java-home="${com.sun.aas.javaRoot}" debug-enabled="false" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044" rmic-options="-iiop -poa -alwaysgenerate -keepgenerated -g" javac-options="-g" server-classpath="${com.sun.aas.javaRoot}/lib/tools.jar${path.separator}${com.sun.aas.installRoot}/lib/install/applications/jmsra/imqjmsra.jar${path.separator}${com.sun.aas.imqLib}/jaxm-api.jar${path.separator}${com.sun.aas.imqLib}/fscontext.jar${path.separator}${com.sun.aas.installRoot}/lib/ant/lib/ant.jar${path.separator}${com.sun.aas.hadbRoot}/lib/hadbjdbc4.jar${path.separator}/usr/lib/audit/Audit.jar${path.separator}${com.sun.aas.jdmkHome}/lib/jdmkrt.jar" classpath-suffix="${com.sun.aas.installRoot}/pointbase/lib/pbclient.jar${path.separator}${com.sun.aas.installRoot}/pointbase/lib/pbembedded.jar" env-classpath-ignored="true">
- <!-- various required jvm-options -->
- <jvm-options>-client</jvm-options>
- <jvm-options>-Dcom.sun.enterprise.web.connector.useCoyoteConnector=true</jvm-options>
- <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
- <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
- <jvm-options>-Dsun.rmi.dgc.server.gcInterval=3600000</jvm-options>
- <jvm-options>-Dsun.rmi.dgc.client.gcInterval=3600000</jvm-options>
- <jvm-options>-Dcom.sun.web.console.appbase=/${com.sun.aas.installRoot}/lib/install/applications/com_sun_web_ui</jvm-options>
- <jvm-options>-Xmx512m</jvm-options>
- <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
- <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
- <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
- <jvm-options> -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver</jvm-options>
+ <!-- various required jvm-options -->
+ <jvm-options>-client</jvm-options>
+ <jvm-options>-Dcom.sun.enterprise.web.connector.useCoyoteConnector=true</jvm-options>
+ <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
+ <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
+ <jvm-options>-Dsun.rmi.dgc.server.gcInterval=3600000</jvm-options>
+ <jvm-options>-Dsun.rmi.dgc.client.gcInterval=3600000</jvm-options>
+ <jvm-options>-Dcom.sun.web.console.appbase=/${com.sun.aas.installRoot}/lib/install/applications/com_sun_web_ui</jvm-options>
+ <jvm-options>-Xmx512m</jvm-options>
+ <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
+ <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
+ <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
+ <jvm-options> -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver</jvm-options>
- <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
- <jvm-options>-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar</jvm-options>
- <jvm-options>-Dcom.sun.enterprise.taglisteners=jsf-impl.jar</jvm-options>
- <jvm-options>-XX:NewRatio=2</jvm-options>
- <jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.ee.admin.AppServerMBeanServerBuilder</jvm-options><jvm-options>-Dcom.sun.appserv.pluggable.features=com.sun.enterprise.ee.server.pluggable.EEPluggableFeatureImpl</jvm-options><jvm-options>-Dcom.sun.appserv.nss.db=${com.sun.aas.instanceRoot}/config
- </jvm-options>
+ <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
+ <jvm-options>-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar</jvm-options>
+ <jvm-options>-Dcom.sun.enterprise.taglisteners=jsf-impl.jar</jvm-options>
+ <jvm-options>-XX:NewRatio=2</jvm-options>
+ <jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.ee.admin.AppServerMBeanServerBuilder</jvm-options><jvm-options>-Dcom.sun.appserv.pluggable.features=com.sun.enterprise.ee.server.pluggable.EEPluggableFeatureImpl</jvm-options><jvm-options>-Dcom.sun.appserv.nss.db=${com.sun.aas.instanceRoot}/config
+ </jvm-options>
</java-config>
<availability-service availability-enabled="true">
- <web-container-availability availability-enabled="true" http-session-store-pool-name="jdbc/hastore" persistence-frequency="web-method" persistence-scope="session" persistence-store-health-check-enabled="false" persistence-type="ha" sso-failover-enabled="false"/>
- <ejb-container-availability availability-enabled="true" sfsb-checkpoint-enabled="false" sfsb-ha-persistence-type="ha" sfsb-persistence-type="file" sfsb-quick-checkpoint-enabled="false" sfsb-store-pool-name="jdbc/hastore"/>
+ <web-container-availability availability-enabled="true" http-session-store-pool-name="jdbc/hastore" persistence-frequency="web-method" persistence-scope="session" persistence-store-health-check-enabled="false" persistence-type="ha" sso-failover-enabled="false"/>
+ <ejb-container-availability availability-enabled="true" sfsb-checkpoint-enabled="false" sfsb-ha-persistence-type="ha" sfsb-persistence-type="file" sfsb-quick-checkpoint-enabled="false" sfsb-store-pool-name="jdbc/hastore"/>
</availability-service>
<thread-pools>
- <thread-pool thread-pool-id="thread-pool-1" min-thread-pool-size="0" max-thread-pool-size="200" idle-thread-timeout-in-seconds="120" num-work-queues="1"/>
+ <thread-pool thread-pool-id="thread-pool-1" min-thread-pool-size="0" max-thread-pool-size="200" idle-thread-timeout-in-seconds="120" num-work-queues="1"/>
</thread-pools>
</config> <!-- config model with name "server-config" ends -->
<config name="default-config" dynamic-reconfiguration-enabled="true">
<http-service>
- <http-listener id="http-listener-1" address="0.0.0.0" port="${http-listener-1-port}" acceptor-threads="100" security-enabled="false" default-virtual-server="server" server-name="" xpowered-by="true" enabled="true">
- </http-listener>
- <http-listener id="http-listener-2" address="0.0.0.0" port="${http-listener-2-port}" acceptor-threads="100" security-enabled="true" default-virtual-server="server" server-name="" xpowered-by="true" enabled="true">
- </http-listener>
- <virtual-server id="server" http-listeners="http-listener-1,http-listener-2" hosts="${com.sun.aas.hostName}" state="on">
- <property name="docroot" value="${com.sun.aas.instanceRoot}/docroot"/>
- <property name="accesslog" value="${com.sun.aas.instanceRoot}/logs/access"/>
- <property name="default-web-xml" value="${com.sun.aas.instanceRoot}/config/default-web.xml"/>
- </virtual-server>
- <http-protocol ssl-enabled="true"/>
+ <http-listener id="http-listener-1" address="0.0.0.0" port="${http-listener-1-port}" acceptor-threads="100" security-enabled="false" default-virtual-server="server" server-name="" xpowered-by="true" enabled="true">
+ </http-listener>
+ <http-listener id="http-listener-2" address="0.0.0.0" port="${http-listener-2-port}" acceptor-threads="100" security-enabled="true" default-virtual-server="server" server-name="" xpowered-by="true" enabled="true">
+ </http-listener>
+ <virtual-server id="server" http-listeners="http-listener-1,http-listener-2" hosts="${com.sun.aas.hostName}" state="on">
+ <property name="docroot" value="${com.sun.aas.instanceRoot}/docroot"/>
+ <property name="accesslog" value="${com.sun.aas.instanceRoot}/logs/access"/>
+ <property name="default-web-xml" value="${com.sun.aas.instanceRoot}/config/default-web.xml"/>
+ </virtual-server>
+ <http-protocol ssl-enabled="true"/>
</http-service>
<iiop-service client-authentication-required="false">
- <orb use-thread-pool-ids="thread-pool-1" message-fragment-size="1024" max-connections="1024"/>
+ <orb use-thread-pool-ids="thread-pool-1" message-fragment-size="1024" max-connections="1024"/>
- <iiop-listener id="orb-listener-1" address="0.0.0.0" port="${orb-listener-1-port}" enabled="true"/>
- <iiop-listener id="SSL" address="0.0.0.0" port="${SSL-port}" security-enabled="true" enabled="true">
- <ssl cert-nickname="s1as" client-auth-enabled="false"/>
- </iiop-listener>
- <iiop-listener id="SSL_MUTUALAUTH" address="0.0.0.0" port="${SSL_MUTUALAUTH-port}" security-enabled="true" enabled="true">
- <ssl cert-nickname="s1as" client-auth-enabled="true"/>
- </iiop-listener>
+ <iiop-listener id="orb-listener-1" address="0.0.0.0" port="${orb-listener-1-port}" enabled="true"/>
+ <iiop-listener id="SSL" address="0.0.0.0" port="${SSL-port}" security-enabled="true" enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="false"/>
+ </iiop-listener>
+ <iiop-listener id="SSL_MUTUALAUTH" address="0.0.0.0" port="${SSL_MUTUALAUTH-port}" security-enabled="true" enabled="true">
+ <ssl cert-nickname="s1as" client-auth-enabled="true"/>
+ </iiop-listener>
</iiop-service>
<admin-service system-jmx-connector-name="system" type="server">
- <!-- JSR 160 "system-jmx-connector" -->
- <jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" name="system" port="${JMX_SYSTEM_CONNECTOR-port}" protocol="rmi_jrmp" security-enabled="true">
- <ssl cert-nickname="s1as" ssl3-enabled="true" tls-enabled="true" client-auth-enabled="false"/>
- </jmx-connector>
- <!-- JSR 160 "system-jmx-connector" -->
- <das-config dynamic-reload-enabled="true" dynamic-reload-poll-interval-in-seconds="2" autodeploy-enabled="true" autodeploy-polling-interval-in-seconds="2" autodeploy-dir="${com.sun.aas.instanceRoot}/autodeploy" autodeploy-verifier-enabled="false" autodeploy-jsp-precompilation-enabled="false" deploy-xml-validation="full"/>
+ <!-- JSR 160 "system-jmx-connector" -->
+ <jmx-connector accept-all="false" address="0.0.0.0" auth-realm-name="admin-realm" name="system" port="${JMX_SYSTEM_CONNECTOR-port}" protocol="rmi_jrmp" security-enabled="true">
+ <ssl cert-nickname="s1as" ssl3-enabled="true" tls-enabled="true" client-auth-enabled="false"/>
+ </jmx-connector>
+ <!-- JSR 160 "system-jmx-connector" -->
+ <das-config dynamic-reload-enabled="true" dynamic-reload-poll-interval-in-seconds="2" autodeploy-enabled="true" autodeploy-polling-interval-in-seconds="2" autodeploy-dir="${com.sun.aas.instanceRoot}/autodeploy" autodeploy-verifier-enabled="false" autodeploy-jsp-precompilation-enabled="false" deploy-xml-validation="full"/>
</admin-service>
<web-container><session-config>
<session-manager>
- <manager-properties/>
- <store-properties/>
+ <manager-properties/>
+ <store-properties/>
</session-manager>
<session-properties/>
</session-config></web-container>
<ejb-container steady-pool-size="0" pool-resize-quantity="8" max-pool-size="32" cache-resize-quantity="32" max-cache-size="512" pool-idle-timeout-in-seconds="600" cache-idle-timeout-in-seconds="600" removal-timeout-in-seconds="5400" victim-selection-policy="nru" commit-option="B" session-store="${com.sun.aas.instanceRoot}/session-store">
- <ejb-timer-service/>
+ <ejb-timer-service/>
</ejb-container>
<mdb-container steady-pool-size="0" pool-resize-quantity="8" max-pool-size="32" idle-timeout-in-seconds="600"/>
<jms-service init-timeout-in-seconds="60" type="REMOTE" reconnect-interval-in-seconds="60" reconnect-attempts="3" reconnect-enabled="true" addresslist-behavior="random" addresslist-iterations="3">
- <jms-host name="default_JMS_host" host="toby-compaq.red.iplanet.com" port="7676" admin-user-name="admin" admin-password="admin"/>
+ <jms-host name="default_JMS_host" host="toby-compaq.red.iplanet.com" port="7676" admin-user-name="admin" admin-password="admin"/>
</jms-service>
<log-service file="${com.sun.aas.instanceRoot}/logs/server.log" use-system-logging="false" log-to-console="false" alarms="false" log-rotation-limit-in-bytes="2000000000">
- <module-log-levels root="INFO" server="INFO" ejb-container="INFO" cmp-container="INFO" mdb-container="INFO" web-container="INFO" classloader="INFO" configuration="INFO" naming="INFO" security="INFO" admin="INFO" jts="INFO" jta="INFO" deployment="INFO" verifier="INFO" jaxr="INFO" jaxrpc="INFO" saaj="INFO" corba="INFO" javamail="INFO" jms="INFO" connector="INFO" jdo="INFO" cmp="INFO" resource-adapter="INFO"/>
+ <module-log-levels root="INFO" server="INFO" ejb-container="INFO" cmp-container="INFO" mdb-container="INFO" web-container="INFO" classloader="INFO" configuration="INFO" naming="INFO" security="INFO" admin="INFO" jts="INFO" jta="INFO" deployment="INFO" verifier="INFO" jaxr="INFO" jaxrpc="INFO" saaj="INFO" corba="INFO" javamail="INFO" jms="INFO" connector="INFO" jdo="INFO" cmp="INFO" resource-adapter="INFO"/>
</log-service>
<security-service default-realm="file" anonymous-role="ANYONE" audit-enabled="false" jacc="default" audit-modules="default">
- <!-- All administrative tasks within any server instance use this admin-realm by default. -->
- <auth-realm name="admin-realm" classname="com.sun.enterprise.security.auth.realm.file.FileRealm">
- <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"/>
- <property name="jaas-context" value="fileRealm"/>
- </auth-realm>
- <!-- All administrative tasks within any server instance use this admin-realm by default. -->
- <auth-realm name="file" classname="com.sun.enterprise.security.auth.realm.file.FileRealm">
- <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"/>
- <property name="jaas-context" value="fileRealm"/>
- </auth-realm>
- <auth-realm name="certificate" classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm">
- </auth-realm>
- <jacc-provider name="default" policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory">
- <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"/>
- </jacc-provider>
- <audit-module name="default" classname="com.sun.enterprise.security.Audit">
- <property name="auditOn" value="false"/>
- </audit-module>
+ <!-- All administrative tasks within any server instance use this admin-realm by default. -->
+ <auth-realm name="admin-realm" classname="com.sun.enterprise.security.auth.realm.file.FileRealm">
+ <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"/>
+ <property name="jaas-context" value="fileRealm"/>
+ </auth-realm>
+ <!-- All administrative tasks within any server instance use this admin-realm by default. -->
+ <auth-realm name="file" classname="com.sun.enterprise.security.auth.realm.file.FileRealm">
+ <property name="file" value="${com.sun.aas.instanceRoot}/config/keyfile"/>
+ <property name="jaas-context" value="fileRealm"/>
+ </auth-realm>
+ <auth-realm name="certificate" classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm">
+ </auth-realm>
+ <jacc-provider name="default" policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory">
+ <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"/>
+ </jacc-provider>
+ <audit-module name="default" classname="com.sun.enterprise.security.Audit">
+ <property name="auditOn" value="false"/>
+ </audit-module>
</security-service>
<transaction-service automatic-recovery="false" timeout-in-seconds="0" tx-log-dir="${com.sun.aas.instanceRoot}/logs" heuristic-decision="rollback" keypoint-interval="2048" retry-timeout-in-seconds="600"/>
<monitoring-service>
- <module-monitoring-levels thread-pool="OFF" orb="OFF" ejb-container="OFF" web-container="OFF" transaction-service="OFF" http-service="OFF" jdbc-connection-pool="OFF" connector-connection-pool="OFF"/>
+ <module-monitoring-levels thread-pool="OFF" orb="OFF" ejb-container="OFF" web-container="OFF" transaction-service="OFF" http-service="OFF" jdbc-connection-pool="OFF" connector-connection-pool="OFF"/>
</monitoring-service>
<java-config java-home="${com.sun.aas.javaRoot}" debug-enabled="false" debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=1044" rmic-options="-iiop -poa -alwaysgenerate -keepgenerated -g" javac-options="-g" server-classpath="${com.sun.aas.javaRoot}/lib/tools.jar${path.separator}${com.sun.aas.installRoot}/lib/install/applications/jmsra/imqjmsra.jar${path.separator}${com.sun.aas.imqLib}/jaxm-api.jar${path.separator}${com.sun.aas.imqLib}/fscontext.jar${path.separator}${com.sun.aas.installRoot}/lib/ant/lib/ant.jar${path.separator}${com.sun.aas.hadbRoot}/lib/hadbjdbc4.jar${path.separator}/usr/lib/audit/Audit.jar${path.separator}${com.sun.aas.jdmkHome}/lib/jdmkrt.jar" classpath-suffix="${com.sun.aas.installRoot}/pointbase/lib/pbclient.jar${path.separator}${com.sun.aas.installRoot}/pointbase/lib/pbembedded.jar" env-classpath-ignored="true">
- <!-- various required jvm-options -->
- <jvm-options>-client</jvm-options>
- <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
- <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
- <jvm-options>-Dsun.rmi.dgc.server.gcInterval=3600000</jvm-options>
- <jvm-options>-Dsun.rmi.dgc.client.gcInterval=3600000</jvm-options>
- <jvm-options>-Xmx512m</jvm-options>
- <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
- <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
- <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/config/${com.sun.aas.configName}/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
- <jvm-options> -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver</jvm-options>
- <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
- <jvm-options>-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar</jvm-options>
- <jvm-options>-Dcom.sun.enterprise.taglisteners=jsf-impl.jar</jvm-options>
- <jvm-options>-XX:NewRatio=2</jvm-options>
- <jvm-options>-Dcom.sun.appserv.pluggable.features=com.sun.enterprise.ee.server.pluggable.EEPluggableFeatureImpl</jvm-options><jvm-options>-Dcom.sun.appserv.nss.db=${com.sun.aas.instanceRoot}/config</jvm-options>
+ <!-- various required jvm-options -->
+ <jvm-options>-client</jvm-options>
+ <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options>
+ <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>
+ <jvm-options>-Dsun.rmi.dgc.server.gcInterval=3600000</jvm-options>
+ <jvm-options>-Dsun.rmi.dgc.client.gcInterval=3600000</jvm-options>
+ <jvm-options>-Xmx512m</jvm-options>
+ <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options>
+ <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options>
+ <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/config/${com.sun.aas.configName}/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options>
+ <jvm-options> -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver</jvm-options>
+ <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options>
+ <jvm-options>-Dcom.sun.enterprise.taglibs=appserv-jstl.jar,jsf-impl.jar</jvm-options>
+ <jvm-options>-Dcom.sun.enterprise.taglisteners=jsf-impl.jar</jvm-options>
+ <jvm-options>-XX:NewRatio=2</jvm-options>
+ <jvm-options>-Dcom.sun.appserv.pluggable.features=com.sun.enterprise.ee.server.pluggable.EEPluggableFeatureImpl</jvm-options><jvm-options>-Dcom.sun.appserv.nss.db=${com.sun.aas.instanceRoot}/config</jvm-options>
</java-config>
<availability-service availability-enabled="true">
- <web-container-availability availability-enabled="true" http-session-store-pool-name="jdbc/hastore" persistence-frequency="web-method" persistence-scope="session" persistence-store-health-check-enabled="false" persistence-type="ha" sso-failover-enabled="false"/>
- <ejb-container-availability availability-enabled="true" sfsb-checkpoint-enabled="false" sfsb-ha-persistence-type="ha" sfsb-persistence-type="file" sfsb-quick-checkpoint-enabled="false" sfsb-store-pool-name="jdbc/hastore"/>
+ <web-container-availability availability-enabled="true" http-session-store-pool-name="jdbc/hastore" persistence-frequency="web-method" persistence-scope="session" persistence-store-health-check-enabled="false" persistence-type="ha" sso-failover-enabled="false"/>
+ <ejb-container-availability availability-enabled="true" sfsb-checkpoint-enabled="false" sfsb-ha-persistence-type="ha" sfsb-persistence-type="file" sfsb-quick-checkpoint-enabled="false" sfsb-store-pool-name="jdbc/hastore"/>
</availability-service>
<thread-pools>
- <thread-pool thread-pool-id="thread-pool-1" min-thread-pool-size="0" max-thread-pool-size="200" idle-thread-timeout-in-seconds="120" num-work-queues="1"/>
+ <thread-pool thread-pool-id="thread-pool-1" min-thread-pool-size="0" max-thread-pool-size="200" idle-thread-timeout-in-seconds="120" num-work-queues="1"/>
</thread-pools>
<system-property name="http-listener-1-port" value="8079"/>
@@ -265,7 +265,7 @@
</config>
</configs>
<servers>
- <server name="server" config-ref="server-config">
+ <server name="server" config-ref="server-config">
<application-ref enabled="true" ref="adminapp" virtual-servers="__asadmin" lb-enabled="false" disable-timeout-in-minutes="30"/>
<application-ref enabled="true" ref="admingui" virtual-servers="__asadmin" lb-enabled="false" disable-timeout-in-minutes="30"/>
<application-ref enabled="true" ref="com_sun_web_ui" virtual-servers="__asadminUnSecure,__asadmin" lb-enabled="false" disable-timeout-in-minutes="30"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/build.xml
index acd0f4c..489f0d9 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/build.xml
@@ -42,16 +42,16 @@
<ant dir="ejb" target="orb_integration"/>
<record name="orb_integration.output" action="stop" />
<antcall target="report">
- <param name="result_count.sh"
+ <param name="result_count.sh"
value="orb_integration_resultCount.sh" />
</antcall>
</target>
<target name="usage">
- <echo>
- Usage:
- ant orb_integration (Executes the orb integration tests)
+ <echo>
+ Usage:
+ ant orb_integration (Executes the orb integration tests)
- </echo>
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/build.xml
index 30b0d46..7b21525 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/build.xml
@@ -37,9 +37,9 @@
</delete>
<record name="callflow.output" action="start" />
<antcall target="setup"/>
- <ant dir="simpleServlet" target="all"/>
- <ant dir="simpleJsp" target="all"/>
- <antcall target="report"/>
+ <ant dir="simpleServlet" target="all"/>
+ <ant dir="simpleJsp" target="all"/>
+ <antcall target="report"/>
<antcall target="unsetup"/>
</target>
@@ -67,9 +67,9 @@
</target>
<target name="usage">
- <echo>
- Usage:
- ant all (Executes all the callflow tests)
- </echo>
+ <echo>
+ Usage:
+ ant all (Executes all the callflow tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/WebTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/WebTest.java
index cdc4e53..8efcfc9 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/WebTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/WebTest.java
@@ -33,7 +33,7 @@
port = args[1];
contextRoot = args[2];
}
-
+
public static void main(String[] args) {
WebTest webTest = new WebTest(args);
try {
@@ -59,8 +59,8 @@
InputStream is = conn.getInputStream();
BufferedReader input = new BufferedReader(new InputStreamReader(is));
String line = input.readLine();
- System.out.println ("Callflow Data : "+line);
- System.out.println (input.readLine());
- }
+ System.out.println ("Callflow Data : "+line);
+ System.out.println (input.readLine());
+ }
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/build.properties
index 08bf660..59cd563 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/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="callflow-dbreader"/>
-<property name="appname" value="${module}-servlet"/>
+<property name="appname" value="${module}-servlet"/>\u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
<property name="web.xml" value="descriptor/web.xml"/>
<property name="contextroot" value="/dbReader"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/build.xml
index 2983c58..22b5366 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/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"/>
@@ -42,15 +42,15 @@
</target>
<target name="build" depends="compile">
- <property name="hasWebclient" value="yes"/>
+ <property name="hasWebclient" value="yes"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
- <param name="webclient.war.classes" value="**/*.class"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
</antcall>
- </target>
+ </target>
<target name="build-publish-war" depends="build, publish-war-common" />
-
+
<target name="re-deploy" depends="init-common">
<antcall target="deploy-war-common"/>
</target>
@@ -58,7 +58,7 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-war-common"/>
</target>
-
+
<target name="run" depends="init-common">
<javac
@@ -76,10 +76,10 @@
</classpath>
</java>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-war-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/servlet/dbReader.java b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/servlet/dbReader.java
index 52be7be..6919cce 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/servlet/dbReader.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/dbreader/servlet/dbReader.java
@@ -40,7 +40,7 @@
* @version
*/
public class dbReader extends HttpServlet {
-
+
/** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
* @param request servlet request
* @param response servlet response
@@ -53,30 +53,30 @@
private static final String __DELETE =" delete from ";
private static final String REQUEST_START_TBL__SERVER = "REQUEST_START_TBL__SERVER";
private static final String RS = REQUEST_START_TBL__SERVER;
-
+
private static final String REQUEST_END_TBL__SERVER = "REQUEST_END_TBL__SERVER";
private static final String RE = REQUEST_END_TBL__SERVER;
-
+
private static final String METHOD_START_TBL__SERVER = "METHOD_START_TBL__SERVER";
private static final String MS = METHOD_START_TBL__SERVER;
-
+
private static final String METHOD_END_TBL__SERVER ="METHOD_END_TBL__SERVER";
private static final String ME = METHOD_END_TBL__SERVER;
-
+
private static final String START_TIME_TBL__SERVER ="START_TIME_TBL__SERVER";
private static final String ST = START_TIME_TBL__SERVER;
-
+
private static final String END_TIME_TBL__SERVER ="END_TIME_TBL__SERVER";
private static final String ET = END_TIME_TBL__SERVER;
-
+
private static final String AND = " AND ";
private static final String RID = ".REQUEST_ID ";
private static final String COMMA = ",";
private static final String EQUAL = " = ";
-
+
// name of the servlet whose db value is to be queried
private static final String SERVLET_NAME = "";
-
+
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
@@ -86,10 +86,10 @@
String cleandb = request.getParameter ("cleandb");
if (cleandb != null){
deleteRows (con);
- out.println ("Cleaned rows from all tables in db");
+ out.println ("Cleaned rows from all tables in db");
return;
}
- String servletName = request.getParameter ("servletName");
+ String servletName = request.getParameter ("servletName");
if (servletName == null){
out.println (" Specify servlet name whose data is to be looked up"+
" via a request parameter name ="+servletName);
@@ -122,15 +122,15 @@
ex.printStackTrace();
}
}
-
+
private Connection getConnection () throws ServletException{
-
+
Connection con = null;
try {
con = callflowDS.getConnection();
} catch (SQLException ex) {
throw new ServletException (ex);
- }
+ }
return con;
}
private String getRequestId (Connection con , String sql) throws ServletException {
@@ -158,24 +158,24 @@
throw new ServletException (ex);
}
return count;
-
+
}
private void deleteRows (Connection con) throws ServletException{
try {
Statement stmt = con.createStatement();
- stmt.execute (__DELETE + REQUEST_START_TBL__SERVER);
+ stmt.execute (__DELETE + REQUEST_START_TBL__SERVER);
stmt.execute (__DELETE + REQUEST_END_TBL__SERVER);
-
+
stmt.execute (__DELETE + METHOD_START_TBL__SERVER);
stmt.execute (__DELETE + METHOD_END_TBL__SERVER);
-
+
stmt.execute (__DELETE + START_TIME_TBL__SERVER);
stmt.execute (__DELETE + END_TIME_TBL__SERVER);
-
+
} catch (SQLException ex) {
throw new ServletException (ex);
}
- }
+ }
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/** Handles the HTTP <code>GET</code> method.
* @param request servlet request
@@ -185,7 +185,7 @@
throws ServletException, IOException {
processRequest(request, response);
}
-
+
/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
@@ -194,7 +194,7 @@
throws ServletException, IOException {
processRequest(request, response);
}
-
+
/** Returns a short description of the servlet.
*/
public String getServletInfo() {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/report.xml b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/report.xml
index 1ec2184..4a7847b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/report.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/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/v2-tests/appserv-tests/devtests/callflow/simpleJsp/WebTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/WebTest.java
index 490d079..447ebc5 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/WebTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/WebTest.java
@@ -21,22 +21,22 @@
import com.sun.ejte.ccl.reporter.*;
public class WebTest {
-
+
private static SimpleReporterAdapter stat
= new SimpleReporterAdapter("appserv-tests");
-
+
private static final String TEST_NAME = "callflow-simple-jsp";
-
+
private String host;
private String port;
private String contextRoot;
-
+
public WebTest(String[] args) {
host = args[0];
port = args[1];
contextRoot = args[2];
}
-
+
public static void main(String[] args) {
WebTest webTest = new WebTest(args);
try {
@@ -45,12 +45,12 @@
stat.addDescription("Callflow Simple JSP Test");
webTest.analyseResult(args[4]);
stat.printSummary(TEST_NAME);
-
+
}
- }else if (args.length == 4){
+ }else if (args.length == 4){
if (args[3].equalsIgnoreCase ("clean-db")){
- webTest.cleandb ();
- }
+ webTest.cleandb ();
+ }
}else
webTest.doTest();
} catch (Exception ex) {
@@ -58,17 +58,17 @@
ex.printStackTrace();
}
}
-
+
public void doTest() throws Exception {
-
+
URL url = new URL("http://" + host + ":" + port
+ contextRoot + "/including.jsp");
System.out.println("Connecting to: " + url.toString());
-
+
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect();
int responseCode = conn.getResponseCode();
-
+
if (responseCode != 200) {
System.err.println("Unexpected return code: " + responseCode);
stat.addStatus(TEST_NAME, stat.FAIL);
@@ -77,19 +77,19 @@
BufferedReader input = new BufferedReader(new InputStreamReader(is));
String line = input.readLine();
}
- conn.disconnect ();
+ conn.disconnect ();
}
-
+
public void analyseResult(String result) throws Exception {
-
+
URL url = new URL("http://" + host + ":" + port
+"/dbReader/dbReader?servletName=callflow-simple-jsp");
System.out.println("Analysing Result .... Connecting to: " + url.toString());
-
+
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect();
int responseCode = conn.getResponseCode();
-
+
if (responseCode != 200) {
System.err.println("Unexpected return code: " + responseCode);
stat.addStatus(TEST_NAME, stat.FAIL);
@@ -97,37 +97,37 @@
InputStream is = conn.getInputStream();
BufferedReader input = new BufferedReader(new InputStreamReader(is));
String line = input.readLine();
- System.out.println ("Expected Result :" + result);
+ System.out.println ("Expected Result :" + result);
System.out.println ("Actual Result :" + line);
- if(result.equals (line))
- stat.addStatus(TEST_NAME, stat.PASS);
- else
- stat.addStatus(TEST_NAME, stat.FAIL);
+ if(result.equals (line))
+ stat.addStatus(TEST_NAME, stat.PASS);
+ else
+ stat.addStatus(TEST_NAME, stat.FAIL);
}
- conn.disconnect ();
+ conn.disconnect ();
}
public void cleandb() throws Exception {
-
+
URL url = new URL("http://" + host + ":" + port
+"/dbReader/dbReader?cleandb=true");
System.out.println("Cleaning DB .... Connecting to: " + url.toString());
-
+
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect();
int responseCode = conn.getResponseCode();
-
+
if (responseCode != 200) {
System.err.println("Unexpected return code: " + responseCode);
} else {
InputStream is = conn.getInputStream();
BufferedReader input = new BufferedReader(new InputStreamReader(is));
String line = input.readLine();
- System.out.println (line);
- System.out.println (input.readLine());
- }
-
- conn.disconnect ();
- }
+ System.out.println (line);
+ System.out.println (input.readLine());
+ }
+
+ conn.disconnect ();
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/build.properties
index 2549883..6f9d7af 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/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="callflow"/>
-<property name="appname" value="${module}-simple-jsp"/>
+<property name="appname" value="${module}-simple-jsp"/>\u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
<property name="web.xml" value="descriptor/web.xml"/>
<property name="contextroot" value="/${appname}"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/build.xml
index 61402ca..ec5624d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleJsp/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"/>
@@ -42,15 +42,15 @@
</target>
<target name="build" depends="compile">
- <property name="hasWebclient" value="yes"/>
+ <property name="hasWebclient" value="yes"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
- <param name="webclient.war.classes" value="**/*.class"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
</antcall>
- </target>
+ </target>
<target name="build-publish-war" depends="build, publish-war-common" />
-
+
<target name="re-deploy" depends="init-common">
<antcall target="deploy-war-common"/>
</target>
@@ -58,7 +58,7 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-war-common"/>
</target>
-
+
<target name="run" depends="init-common">
<javac
srcdir="."
@@ -77,26 +77,26 @@
</target>
<target name="just-run">
- <antcall target="start-callflow"/>
- <!-- <antcall target="clean-db"/> -->
- <antcall target="run"/>
- <antcall target="stop-callflow"/>
- <antcall target="run-report"/>
- <!-- <antcall target="clean-db"/> -->
- </target>
+ <antcall target="start-callflow"/>
+ <!-- <antcall target="clean-db"/> -->
+ <antcall target="run"/>
+ <antcall target="stop-callflow"/>
+ <antcall target="run-report"/>
+ <!-- <antcall target="clean-db"/> -->
+ </target>
<target name="run-report" depends="init-common">
<javac
srcdir="."
classpath="${env.APS_HOME}/lib/reporter.jar"
includes="WebTest.java"/>
- <sleep seconds ="10"/>
+ <sleep seconds ="10"/>
<java classname="WebTest">
<arg value="${http.host}"/>
<arg value="${http.port}"/>
<arg value="/dbReader"/>
- <arg value="report"/>
- <arg value="${expectedresult}"/>
+ <arg value="report"/>
+ <arg value="${expectedresult}"/>
<classpath>
<pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
<pathelement location="."/>
@@ -109,12 +109,12 @@
srcdir="."
classpath="${env.APS_HOME}/lib/reporter.jar"
includes="WebTest.java"/>
- <sleep seconds ="4"/>
+ <sleep seconds ="4"/>
<java classname="WebTest">
<arg value="${http.host}"/>
<arg value="${http.port}"/>
<arg value="/dbReader"/>
- <arg value="clean-db"/>
+ <arg value="clean-db"/>
<classpath>
<pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
<pathelement location="."/>
@@ -122,23 +122,23 @@
</java>
</target>
<target name="start-callflow" depends="init-common">
- <antcall target="asadmin-common" >
- <param name="admin.command" value="start-callflow-monitoring"/>
- <param name="operand.props" value="server"/>
- </antcall>
- <sleep seconds="5" />
- </target>
+ <antcall target="asadmin-common" >
+ <param name="admin.command" value="start-callflow-monitoring"/>
+ <param name="operand.props" value="server"/>
+ </antcall>
+ <sleep seconds="5" />
+ </target>
<target name="stop-callflow" depends="init-common">
- <antcall target="asadmin-common" >
- <param name="admin.command" value="stop-callflow-monitoring"/>
- <param name="operand.props" value="server"/>
- </antcall>
- </target>
+ <antcall target="asadmin-common" >
+ <param name="admin.command" value="stop-callflow-monitoring"/>
+ <param name="operand.props" value="server"/>
+ </antcall>
+ </target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-war-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/WebTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/WebTest.java
index 59e0577..9ab8ec6 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/WebTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/WebTest.java
@@ -21,22 +21,22 @@
import com.sun.ejte.ccl.reporter.*;
public class WebTest {
-
+
private static SimpleReporterAdapter stat
= new SimpleReporterAdapter("appserv-tests");
-
+
private static final String TEST_NAME = "callflow-simple-servlet";
-
+
private String host;
private String port;
private String contextRoot;
-
+
public WebTest(String[] args) {
host = args[0];
port = args[1];
contextRoot = args[2];
}
-
+
public static void main(String[] args) {
WebTest webTest = new WebTest(args);
try {
@@ -45,12 +45,12 @@
stat.addDescription("Callflow Simple Servlet Test");
webTest.analyseResult(args[4]);
stat.printSummary(TEST_NAME);
-
+
}
- }else if (args.length == 4){
+ }else if (args.length == 4){
if (args[3].equalsIgnoreCase ("clean-db")){
- webTest.cleandb ();
- }
+ webTest.cleandb ();
+ }
}else
webTest.doTest();
} catch (Exception ex) {
@@ -58,17 +58,17 @@
ex.printStackTrace();
}
}
-
+
public void doTest() throws Exception {
-
+
URL url = new URL("http://" + host + ":" + port
+ contextRoot + "/SimpleServlet");
System.out.println("Connecting to: " + url.toString());
-
+
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect();
int responseCode = conn.getResponseCode();
-
+
if (responseCode != 200) {
System.err.println("Unexpected return code: " + responseCode);
stat.addStatus(TEST_NAME, stat.FAIL);
@@ -77,19 +77,19 @@
BufferedReader input = new BufferedReader(new InputStreamReader(is));
String line = input.readLine();
}
- conn.disconnect ();
+ conn.disconnect ();
}
-
+
public void analyseResult(String result) throws Exception {
-
+
URL url = new URL("http://" + host + ":" + port
+"/dbReader/dbReader?servletName=callflow-simple-servlet");
System.out.println("Analysing Result .... Connecting to: " + url.toString());
-
+
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect();
int responseCode = conn.getResponseCode();
-
+
if (responseCode != 200) {
System.err.println("Unexpected return code: " + responseCode);
stat.addStatus(TEST_NAME, stat.FAIL);
@@ -97,36 +97,36 @@
InputStream is = conn.getInputStream();
BufferedReader input = new BufferedReader(new InputStreamReader(is));
String line = input.readLine();
- System.out.println ("Expected Result :" + result);
+ System.out.println ("Expected Result :" + result);
System.out.println ("Actual Result :" + line);
- if(result.equals (line))
- stat.addStatus(TEST_NAME, stat.PASS);
- else
- stat.addStatus(TEST_NAME, stat.FAIL);
+ if(result.equals (line))
+ stat.addStatus(TEST_NAME, stat.PASS);
+ else
+ stat.addStatus(TEST_NAME, stat.FAIL);
}
- conn.disconnect ();
+ conn.disconnect ();
}
public void cleandb() throws Exception {
-
+
URL url = new URL("http://" + host + ":" + port
+"/dbReader/dbReader?cleandb=true");
System.out.println("Cleaning DB .... Connecting to: " + url.toString());
-
+
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.connect();
int responseCode = conn.getResponseCode();
-
+
if (responseCode != 200) {
System.err.println("Unexpected return code: " + responseCode);
} else {
InputStream is = conn.getInputStream();
BufferedReader input = new BufferedReader(new InputStreamReader(is));
String line = input.readLine();
- System.out.println (line);
- }
-
- conn.disconnect ();
- }
+ System.out.println (line);
+ }
+
+ conn.disconnect ();
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/build.properties
index 0c43a95..52a4b30 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/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="callflow"/>
-<property name="appname" value="${module}-simple-servlet"/>
+<property name="appname" value="${module}-simple-servlet"/>\u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
<property name="web.xml" value="descriptor/web.xml"/>
<property name="contextroot" value="/${appname}"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/build.xml
index 40e9bf6..c9bbd60 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/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"/>
@@ -42,15 +42,15 @@
</target>
<target name="build" depends="compile">
- <property name="hasWebclient" value="yes"/>
+ <property name="hasWebclient" value="yes"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
- <param name="webclient.war.classes" value="**/*.class"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
</antcall>
- </target>
+ </target>
<target name="build-publish-war" depends="build, publish-war-common" />
-
+
<target name="re-deploy" depends="init-common">
<antcall target="deploy-war-common"/>
</target>
@@ -58,7 +58,7 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-war-common"/>
</target>
-
+
<target name="run" depends="init-common">
<javac
srcdir="."
@@ -77,25 +77,25 @@
</target>
<target name="just-run">
- <antcall target="start-callflow"/>
- <!-- <antcall target="clean-db"/>-->
- <antcall target="run"/>
- <antcall target="stop-callflow"/>
- <antcall target="run-report"/>
- </target>
+ <antcall target="start-callflow"/>
+ <!-- <antcall target="clean-db"/>-->
+ <antcall target="run"/>
+ <antcall target="stop-callflow"/>
+ <antcall target="run-report"/>
+ </target>
<target name="run-report" depends="init-common">
<javac
srcdir="."
classpath="${env.APS_HOME}/lib/reporter.jar"
includes="WebTest.java"/>
- <sleep seconds ="4"/>
+ <sleep seconds ="4"/>
<java classname="WebTest">
<arg value="${http.host}"/>
<arg value="${http.port}"/>
<arg value="/dbReader"/>
- <arg value="report"/>
- <arg value="${expectedresult}"/>
+ <arg value="report"/>
+ <arg value="${expectedresult}"/>
<classpath>
<pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
<pathelement location="."/>
@@ -108,12 +108,12 @@
srcdir="."
classpath="${env.APS_HOME}/lib/reporter.jar"
includes="WebTest.java"/>
- <sleep seconds ="4"/>
+ <sleep seconds ="4"/>
<java classname="WebTest">
<arg value="${http.host}"/>
<arg value="${http.port}"/>
<arg value="/dbReader"/>
- <arg value="clean-db"/>
+ <arg value="clean-db"/>
<classpath>
<pathelement location="${env.APS_HOME}/lib/reporter.jar"/>
<pathelement location="."/>
@@ -121,22 +121,22 @@
</java>
</target>
<target name="start-callflow" depends="init-common">
- <antcall target="asadmin-common" >
- <param name="admin.command" value="start-callflow-monitoring"/>
- <param name="operand.props" value="server"/>
- </antcall>
- </target>
+ <antcall target="asadmin-common" >
+ <param name="admin.command" value="start-callflow-monitoring"/>
+ <param name="operand.props" value="server"/>
+ </antcall>
+ </target>
<target name="stop-callflow" depends="init-common">
- <antcall target="asadmin-common" >
- <param name="admin.command" value="stop-callflow-monitoring"/>
- <param name="operand.props" value="server"/>
- </antcall>
- </target>
+ <antcall target="asadmin-common" >
+ <param name="admin.command" value="stop-callflow-monitoring"/>
+ <param name="operand.props" value="server"/>
+ </antcall>
+ </target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-war-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/descriptor/web.xml
index 9525b8b..02d9ddc 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/descriptor/web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/descriptor/web.xml
@@ -22,12 +22,12 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
-
+
<servlet>
<servlet-name>SimpleServlet</servlet-name>
<servlet-class>SimpleServlet</servlet-class>
- </servlet>
-
+ </servlet>
+
<servlet-mapping>
<servlet-name>SimpleServlet</servlet-name>
<url-pattern>/SimpleServlet</url-pattern>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/servlet/SimpleServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/servlet/SimpleServlet.java
index bb53ad2..b66f05d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/servlet/SimpleServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/callflow/simpleServlet/servlet/SimpleServlet.java
@@ -19,7 +19,7 @@
import jakarta.servlet.http.*;
public class SimpleServlet extends HttpServlet {
-
+
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/build.xml
index 526938b..3fe11c8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/build.xml
@@ -39,8 +39,8 @@
<target name="usage">
- <echo> Usage:
- ant all (Executes all the classloader devtests)
- </echo>
+ <echo> Usage:
+ ant all (Executes all the classloader devtests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/build.properties
index 2dc60cf..d5b2b1b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/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="web"/>
-<property name="appname" value="${module}-bookstore"/>
+<property name="appname" value="${module}-bookstore"/> \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="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="bookstore3"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/build.xml
index 7264d05..30d56e4 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/build.xml
@@ -30,13 +30,13 @@
&commonBuild;
&commonRun;
&testproperties;
-
+
<target name="all" depends="build,setup,deploy-war,run-war, unsetup"/>
<target name="run-test" depends="build,deploy-war,run-war,undeploy-war"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<target name="setup" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create_${db.type}.sql"/>
@@ -44,22 +44,22 @@
<antcall target="deploy-jdbc-common">
<param name="jdbc.conpool.name" value="web-bookstore-pool"/>
<param name="jdbc.resource.name" value="jdbc/BookDB"/>
- </antcall>
+ </antcall>
<echo message="copying foolib.jar to domain's lib/applibs"/>
<copy file="lib/foolib.jar" todir="${admin.domain.dir}/${admin.domain}/lib/applibs"/>
- </target>
-
+ </target>
+
<target name="sql" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create_${db.type}.sql"/>
</antcall>
-
+
</target>
-
+
<target name="unsetup" depends="init-common">
<antcall target="execute-sql-common">
@@ -72,27 +72,27 @@
</antcall>
</target>
<delete file="${admin.domain.dir}/${admin.domain}/lib/applibs/foolib.jar"/>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="src"/>
- </antcall>
+ </antcall>
</target>
<target name="build" depends="compile">
- <property name="hasWebclient" value="yes"/>
- <property name="tlds-exist" value="yes"/>
+ <property name="hasWebclient" value="yes"/>
+ <property name="tlds-exist" value="yes"/>
<antcall target="copy-tlds"/>
<antcall target="copy-tagfiles"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
- <param name="webclient.war.classes" value="**/*.class"/>
- </antcall>
-
+ <param name="webclient.war.classes" value="**/*.class"/>
+ </antcall>
+
<!-- <antcall target="ear-common"/>-->
-
- </target>
-
+
+ </target>
+
<target name="deploy-ear" depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -109,20 +109,20 @@
<arg line="--libraries foolib.jar"/>
<arg line="${assemble.dir}/${appname}-web.war"/>
</exec>
- </target>
-
+ </target>
+
<target name="undeploy-ear" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="undeploy-war" depends="init-common">
<antcall target="undeploy-war-common"/>
- </target>
+ </target>
<target name="run-war" depends="init-common">
<antcall target="runwebclient-common">
- <param name="testsuite.id" value="jstl-servlet (stand-alone war based)"/>
- </antcall>
+ <param name="testsuite.id" value="jstl-servlet (stand-alone war based)"/>
+ </antcall>
</target>
<target name="usage">
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/create_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/create_derby.sql
index a4ec6c9..a02b593 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/create_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/sql/create_derby.sql
@@ -1,13 +1,13 @@
DROP TABLE books;
CREATE TABLE books (
- ID VARCHAR(8),
- SURNAME VARCHAR(24),
- FIRST_NAME VARCHAR(24),
- TITLE VARCHAR(96),
- PRICE FLOAT,
- YEAR1 INTEGER NOT NULL,
+ ID VARCHAR(8),
+ SURNAME VARCHAR(24),
+ FIRST_NAME VARCHAR(24),
+ TITLE VARCHAR(96),
+ PRICE FLOAT,
+ YEAR1 INTEGER NOT NULL,
DESCRIPTION VARCHAR(30),
- INVENTORY INTEGER NOT NULL
+ INVENTORY INTEGER NOT NULL
);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages.java
index 3b1817e..5f58e73 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages.java
@@ -33,7 +33,7 @@
{ "TitleCashier", "Cashier" },
{ "TitleBookDescription", "Book Description" },
{ "Visitor", "You are visitor number " },
-
+
{ "What", "What We\'re Reading" },
{
"Talk",
@@ -79,14 +79,14 @@
"Your order could not be completed due to insufficient inventory."
},
{ "With", "With" },
-
+
{ "Shipping", "Shipping:" },
{ "QuickShip", "Quick Shipping" },
{ "NormalShip", "Normal Shipping" },
{ "SaverShip", "Saver Shipping" },
{ "ShipDate", "Your order will be shipped on " },
{ "ShipDateLC", "your order will be shipped on " },
-
+
{ "ConfirmAdd", "You just added \"{0}\" to your shopping cart" },
{ "ConfirmRemove", "You just removed \"{0}\" from your shopping cart" },
{
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_de_DE.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_de_DE.java
index e8f7f41..1a8aa13 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_de_DE.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_de_DE.java
@@ -33,7 +33,7 @@
{ "TitleCashier", "Kasse" },
{ "TitleBookDescription", "Buchbeschreibung" },
{ "Visitor", "Sie sind Besucher Nummer " },
-
+
{ "What", "Was wir gerade lesen" },
{
"Talk",
@@ -79,14 +79,14 @@
"Ihre Bestellung konnte aufgrund unzureichenden Inventars nicht ausgefuehrt werden."
},
{ "With", "Mit" },
-
+
{ "Shipping", "Versand:" },
{ "QuickShip", "Schnellversand" },
{ "NormalShip", "Normalversand" },
{ "SaverShip", "Spar-Option Versand" },
{ "ShipDate", "Ihre Sendung wird geliefert am " },
{ "ShipDateLC", "ihre sendung wird geliefert am " },
-
+
{ "ConfirmAdd", "Sie haben gerade \"{0}\" in Ihren Einkaufswagen gelegt" },
{
"ConfirmRemove",
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_en_US.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_en_US.java
index 9d965bd..a543dae 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_en_US.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_en_US.java
@@ -33,7 +33,7 @@
{ "TitleCashier", "Cashier" },
{ "TitleBookDescription", "Book Description" },
{ "Visitor", "You are visitor number " },
-
+
{ "What", "What We\'re Reading" },
{
"Talk",
@@ -79,14 +79,14 @@
"Your order could not be completed due to insufficient inventory."
},
{ "With", "With" },
-
+
{ "Shipping", "Shipping:" },
{ "QuickShip", "Quick Shipping" },
{ "NormalShip", "Normal Shipping" },
{ "SaverShip", "Saver Shipping" },
{ "ShipDate", "Your order will be shipped on " },
{ "ShipDateLC", "your order will be shipped on " },
-
+
{ "ConfirmAdd", "You just added \"{0}\" to your shopping cart" },
{ "ConfirmRemove", "You just removed \"{0}\" from your shopping cart" },
{
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_es_MX.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_es_MX.java
index ac4c61d..83df47a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_es_MX.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/messages/BookstoreMessages_es_MX.java
@@ -80,7 +80,7 @@
{ "Catalog", "Volver al Cat" + "\u00e1" + "logo" },
{ "ThankYou", "Gracias por su compra " },
{ "ThankYouParam", "Gracias, {0} por comprar sus libros aqui" },
-
+
{ "OrderError", "No se pudo completar su pedido debido a escasez de inventario." },
{ "With", "Con" },
{ "Shipping", "Env" + "\u00ed" + "o:" },
@@ -94,46 +94,46 @@
"Acaba de a" + "\u00f1" + "adir \"{0}\" a su cesta de compras"
},
{ "ConfirmRemove", "Acaba de sacar \"{0}\" de su cesta de compras" },
-
+
{
"CartItemCount",
-
+
"Su cesta de compras contiene " + "{0,choice,0#ning" + "\u00fa" +
"n articulo|1#un articulo|1< {0} articulos}"
},
-
+
{
"Newsletters",
"Suscripci" + "\u00f3" + "n gratuita a nuestro bolet" + "\u00ed" +
"n:"
},
-
+
{ "ThanksMsg", "Gracias. Por favor cliquee aqui para comprar sus libros." },
-
+
{
"DukeFanClub",
"Desear" + "\u00ed" +
"a hacerme miembro del Duke Fan Club gratuitamente con mi compra de mas de 100" +
"\u20a0"
},
-
+
{ "UpdateQuantities", "Actualice las cantidades" },
-
+
{
"QuantitiesUpdated",
"Acaba de actualizar las cantidades en su cesta de compras"
},
-
+
{ "Quantities", "Copias del libro en su cesta de compras" },
-
+
{ "ChooseLocale", "Elija su Idioma en el Mapa" },
-
+
{ "English", "ingl" + "\u00e9" + "s" },
-
+
{ "German", "al" + "\u00e9" + "man" },
-
+
{ "Spanish", "espa" + "\u00f1" + "ol" },
-
+
{ "French", "franc" + "\u00e9" + "es" },
{ "CustomerInfo", "Incorpore su informaci" + "\u00f3" +
"n en la forma." },
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/InsertTag.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/InsertTag.java
index 30c67c6..6139e66 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/InsertTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/servlet/src/template/InsertTag.java
@@ -65,7 +65,7 @@
context.getOut()
.print(parameter.getValue());
}
- // if parameter is indirect, include results of dispatching to page
+ // if parameter is indirect, include results of dispatching to page
else {
if ((parameter != null) && (parameter.getValue() != null)) {
context.include(parameter.getValue());
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/build.xml
index ae72ce1..1bc90a1 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/build.xml
@@ -82,16 +82,16 @@
</target>
<target name="usage">
- <echo> Usage:
- ant converter (Executes the converter tests)
- ant all (Executes all the ejb session stateless tests)
- ant clean (cleans all the ejb session stateless tests)
- ant build (builds all the ejb session stateless tests)
- ant setup (sets up all resources for stateless tests)
- ant deploy (deploys all the ejb session stateless apps)
- ant run (Executes all the ejb session stateless tests)
- ant undeploy (undeploys all the session stateless apps)
- ant unsetup (unsets all resources for stateless tests)
- </echo>
+ <echo> Usage:
+ ant converter (Executes the converter tests)
+ ant all (Executes all the ejb session stateless tests)
+ ant clean (cleans all the ejb session stateless tests)
+ ant build (builds all the ejb session stateless tests)
+ ant setup (sets up all resources for stateless tests)
+ ant deploy (deploys all the ejb session stateless apps)
+ ant run (Executes all the ejb session stateless tests)
+ ant undeploy (undeploys all the session stateless apps)
+ ant unsetup (unsets all resources for stateless tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/build.properties
index eaa4b7c..f20c699 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/build.properties
@@ -15,28 +15,28 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="ejb-stateless"/>
-<property name="appname" value="${module}-converter"/>
+<property name="appname" value="${module}-converter"/> \u0020
-<property name="assemble"
- value="${build.classes.dir}/archive"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
-<property name="appclient.jar"
- value="${assemble.dir}/${appname}-client.jar"/>
+<property name="assemble"\u0020
+ value="${build.classes.dir}/archive"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
+<property name="appclient.jar"\u0020
+ value="${assemble.dir}/${appname}-client.jar"/> \u0020
-<property name="test.client"
- value="com.sun.s1peqe.ejb.stateless.converter.client.ConverterClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.ejb.stateless.converter.client.ConverterClient"/>
<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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.xml"/>
<property name="app.type" value="application"/>
@@ -45,8 +45,8 @@
<!-- ============================================================ -->
<!--
<property name="jndi.name" value="converter"/>
-<property name="provider.url" value="iiop://localhost:${orb.port}"/>
-<property name="ctxfactory" value="com.sun.enterprise.naming.SerialInitContextFactory"/>
-<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/>
+<property name="provider.url" value="iiop://localhost:${orb.port}"/>\u0020
+<property name="ctxfactory" value="com.sun.enterprise.naming.SerialInitContextFactory"/>\u0020
+<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/>\u0020
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/build.xml
index ff0daf3..347e2c8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/build.xml
@@ -57,7 +57,7 @@
<param name="jdbc.conpool.name" value="sqe-timer-pool"/>
</antcall>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -69,8 +69,8 @@
<target name="build" depends="compile">
<antcall target="build-ear-common"/>
- </target>
-
+ </target>
+
<target name="deploy" depends="init-common">
<!-- <antcall target="deploy-common"/> -->
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
@@ -87,7 +87,7 @@
<echo message="Deployment on target server ${appserver.instance.name} successful"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
<antcall target="run-standalone-client"/>
@@ -99,27 +99,27 @@
<target name="run-standalone-client" depends="init-common">
<property name="jndi.name" value="converter"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<!--
- <property name="ctxfactory"
- value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
+ <property name="ctxfactory"
+ value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
-->
- <echo message="provider.url used is ${provider.url}"/>
+ <echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
</java>
</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/v2-tests/appserv-tests/devtests/classloader/stateless/converter/client/ConverterClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/client/ConverterClient.java
index 75db78e..9430c5f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/client/ConverterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/client/ConverterClient.java
@@ -27,42 +27,42 @@
public class ConverterClient {
- private SimpleReporterAdapter stat =
+ private SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
ConverterClient() {
}
public static void main(String[] args) {
- ConverterClient client = new ConverterClient();
- client.run(args);
+ ConverterClient client = new ConverterClient();
+ client.run(args);
}
private void run(String[] args) {
String url = null;
- String testId = null;
+ String testId = null;
String jndiName = null;
Context context = null;
String ctxFactory = null;
- java.lang.Object obj = null;
+ java.lang.Object obj = null;
try {
stat.addDescription("This is to test parser overrideability for EJB jars");
if (args.length == 3) {
url = args[0];
ctxFactory = args[1];
- jndiName = args[2];
+ jndiName = args[2];
}
if ( (url == null) || (ctxFactory == null) ) {
- testId = "ParserOverrideablityEJB::Sample AppClient";
+ testId = "ParserOverrideablityEJB::Sample AppClient";
// Initialize the Context with default properties
context = new InitialContext();
System.out.println("Default Context Initialized...");
// Create Home object
obj = context.lookup("java:comp/env/ejb/SimpleConverter");
} else {
- testId = "ParserOverrideabilityEJB::Sample Standalone-Client";
+ testId = "ParserOverrideabilityEJB::Sample Standalone-Client";
Properties env = new Properties();
env.put("java.naming.provider.url", url);
env.put("java.naming.factory.initial", ctxFactory);
@@ -81,7 +81,7 @@
ConverterRemote currencyConverter = home.create();
String expectedParser = "org.apache.xerces.jaxp.SAXParserFactoryImpl";
-
+
System.out.println("\n\n\n===========Beginning Simple Test=====\n\n");
String parserFactoryClassName = currencyConverter.getParserFactoryClassName();
@@ -97,7 +97,7 @@
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
} finally {
- stat.printSummary(testId);
+ stat.printSummary(testId);
}
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/application.xml
index dc859fe..a076d61 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/descriptor/application.xml
@@ -23,7 +23,7 @@
<small-icon></small-icon>
<large-icon></large-icon>
</icon>
- <display-name>ConverterApp</display-name>
+ <display-name>ConverterApp</display-name>
<module>
<java>ejb-stateless-converter-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/ejb/ConverterBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/ejb/ConverterBean.java
index c73ac2f..2fb08d2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/ejb/ConverterBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/classloader/stateless/converter/ejb/ConverterBean.java
@@ -35,7 +35,7 @@
* @see ConverterHome
*/
public class ConverterBean implements SessionBean, TimedObject {
-
+
SessionContext sessionContext_;
public String getParserFactoryClassName() {
@@ -66,7 +66,7 @@
* Loads the state of the bean from secondary storage. Required by EJB spec.
*/
public void ejbActivate() {}
-
+
/**
* Keeps the state of the bean to secondary storage. Required by EJB spec.
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/build.properties
index 20e4a83..7246099 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/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="Blob"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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="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"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/build.xml
index 7695261..71f3401 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/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,14 +48,14 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/*Blob*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/BlobTestHome.class,**/BlobTest.class,**/*Client*.class" />
</antcall>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/blob_derby.sql"/>
@@ -74,22 +74,22 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_blob_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/client/Client.java
index b035a51..9036863 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/client/Client.java
@@ -32,13 +32,13 @@
*/
public class Client {
private static test.BlobTestHome bhome = null;
-
+
private static SimpleReporterAdapter stat =
- new SimpleReporterAdapter("appserv-tests");
+ new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
boolean isJava2DBTest = args.length > 0;
-
+
try {
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteBlobTest");
@@ -47,7 +47,7 @@
objref, test.BlobTestHome.class);
System.out.println("START");
- stat.addDescription("Blob");
+ stat.addDescription("Blob");
test(100, "FOO", new byte[]{'A', 'B', 'C'});
test(200, "BAR", new byte[]{'M', 'N', 'O'});
@@ -62,30 +62,30 @@
} else {
try {
test(40, "BAZ", null);
- stat.addStatus("ejbclient Blob", stat.FAIL);
+ stat.addStatus("ejbclient Blob", stat.FAIL);
throw new Exception(
"Failed to catch expected exception for insert of null blob value");
} catch (Exception ex) {
System.out.println(
"Caught expected exception when inserting null blob value");
- //stat.addStatus("ejbclient Blob", stat.PASS);
+ //stat.addStatus("ejbclient Blob", stat.PASS);
}
}
- stat.addStatus("ejbclient Blob", stat.PASS);
+ stat.addStatus("ejbclient Blob", stat.PASS);
System.out.println("FINISH");
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient Blob", stat.FAIL);
+ stat.addStatus("ejbclient Blob", stat.FAIL);
}
- stat.printSummary("Blob");
+ stat.printSummary("Blob");
}
static void test(int id, String name, byte chars[])
throws Exception {
-
+
Integer pk = new Integer(id);
test.BlobTest bean = bhome.create(pk, name, chars);
System.out.println("Created: " + bean.getPrimaryKey());
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/sun-ejb-jar.xml
index 0eb74ef..d90c9ff 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/descriptor/sun-ejb-jar.xml
@@ -24,14 +24,14 @@
<ejb>
<ejb-name>BlobTest</ejb-name>
<jndi-name>SimpleBlobTest</jndi-name>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <bean-cache>
- <max-cache-size>60</max-cache-size>
- <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
- <victim-selection-policy>FIFO</victim-selection-policy>
- </bean-cache>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <bean-cache>
+ <max-cache-size>60</max-cache-size>
+ <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
+ <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
+ <victim-selection-policy>FIFO</victim-selection-policy>
+ </bean-cache>
</ejb>
<pm-descriptors>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTestBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTestBean.java
index 706fdca..db487aa 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTestBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTestBean.java
@@ -25,65 +25,65 @@
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);
@@ -113,8 +113,8 @@
return null;
}
-
+
public void ejbPostCreate(Integer id, java.lang.String name, byte[] b) throws jakarta.ejb.CreateException {
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTestHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTestHome.java
index e9e7791..a4cddfb 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTestHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/ejb/BlobTestHome.java
@@ -24,9 +24,9 @@
*/
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;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_db2.sql
index d9e5942..fca977a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_db2.sql
@@ -1,19 +1,19 @@
drop table myblob;
create table myblob (
- id int primary key NOT NULL,
- name VARCHAR(100),
- blb BLOB,
- byteblb BLOB,
- byteblb2 BLOB
+ id int primary key NOT NULL,
+ name VARCHAR(100),
+ blb BLOB,
+ byteblb BLOB,
+ byteblb2 BLOB
);
commit;
insert into myblob values (
- 1,
- 'AAA',
- CAST('4444444444' as BLOB),
- CAST('7777777777' as BLOB),
- CAST('9999999999' as BLOB));
+ 1,
+ 'AAA',
+ CAST('4444444444' as BLOB),
+ CAST('7777777777' as BLOB),
+ CAST('9999999999' as BLOB));
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_derby.sql
index 1901a41..9964205 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_derby.sql
@@ -1,17 +1,17 @@
drop table MYBLOB;
create table MYBLOB (
- ID int primary key NOT NULL,
- NAME VARCHAR(100),
- BLB BLOB,
- BYTEBLB BLOB,
- BYTEBLB2 BLOB
+ ID int primary key NOT NULL,
+ NAME VARCHAR(100),
+ BLB BLOB,
+ BYTEBLB BLOB,
+ BYTEBLB2 BLOB
);
insert into MYBLOB values (
- 1,
- 'AAA',
- CAST(X'4444444444' as BLOB),
- CAST(X'7777777777' as BLOB),
- CAST(X'9999999999' as BLOB));
+ 1,
+ 'AAA',
+ CAST(X'4444444444' as BLOB),
+ CAST(X'7777777777' as BLOB),
+ CAST(X'9999999999' as BLOB));
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_ifx.sql
index 2ce6023..bae48c8 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_ifx.sql
@@ -1,19 +1,19 @@
drop table myblob;
create table myblob (
- id int primary key,
- name VARCHAR(100),
- blb BLOB,
- byteblb BLOB,
- byteblb2 BLOB
+ id int primary key,
+ name VARCHAR(100),
+ blb BLOB,
+ byteblb BLOB,
+ byteblb2 BLOB
);
commit;
insert into myblob values (
- 1,
- 'AAA',
- CAST('4444444444' AS BLOB),
- CAST('7777777777' AS BLOB),
- CAST('9999999999' AS BLOB));
+ 1,
+ 'AAA',
+ CAST('4444444444' AS BLOB),
+ CAST('7777777777' AS BLOB),
+ CAST('9999999999' AS BLOB));
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_mssql.sql
index f9f70c9..c2d7028 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_mssql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_mssql.sql
@@ -2,19 +2,19 @@
go
create table MYBLOB (
- ID INT PRIMARY KEY,
- NAME VARCHAR(100),
- BLB IMAGE,
- BYTEBLB IMAGE,
- BYTEBLB2 IMAGE
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(100),
+ BLB IMAGE,
+ BYTEBLB IMAGE,
+ BYTEBLB2 IMAGE
)
go
insert into MYBLOB values (
- 1,
- 'AAA',
- '4444444444',
- '7777777777',
- '9999999999')
+ 1,
+ 'AAA',
+ '4444444444',
+ '7777777777',
+ '9999999999')
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_mysql.sql
index 4e31799..33d93db 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_mysql.sql
@@ -1,19 +1,19 @@
drop table MYBLOB;
create table MYBLOB (
- ID int primary key,
- NAME VARCHAR(100),
- BLB BLOB(255),
- BYTEBLB BLOB(255),
- BYTEBLB2 BLOB(255)
+ ID int primary key,
+ NAME VARCHAR(100),
+ BLB BLOB(255),
+ BYTEBLB BLOB(255),
+ BYTEBLB2 BLOB(255)
) ENGINE=InnoDB;
commit;
insert into MYBLOB values (
- 1,
- 'AAA',
- '4444444444',
- '7777777777',
- '9999999999');
+ 1,
+ 'AAA',
+ '4444444444',
+ '7777777777',
+ '9999999999');
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_ora.sql
index 2128c04..b0e7b12 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_ora.sql
@@ -1,19 +1,19 @@
drop table MYBLOB;
create table MYBLOB (
- ID int primary key,
- NAME VARCHAR2(100),
- BLB RAW(255),
- BYTEBLB RAW(255),
- BYTEBLB2 RAW(255)
+ ID int primary key,
+ NAME VARCHAR2(100),
+ BLB RAW(255),
+ BYTEBLB RAW(255),
+ BYTEBLB2 RAW(255)
);
commit;
insert into MYBLOB values (
- 1,
- 'AAA',
- '4444444444',
- '7777777777',
- '9999999999');
+ 1,
+ 'AAA',
+ '4444444444',
+ '7777777777',
+ '9999999999');
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_pbs.sql
index 990766f..bc05018 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_pbs.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_pbs.sql
@@ -1,19 +1,19 @@
drop table myblob;
create table myblob (
- id int primary key,
- name VARCHAR2(100),
- blb BLOB(10k),
- byteblb BLOB(10k),
- byteblb2 BLOB(10k)
+ id int primary key,
+ name VARCHAR2(100),
+ blb BLOB(10k),
+ byteblb BLOB(10k),
+ byteblb2 BLOB(10k)
);
commit;
insert into myblob values (
- 1,
- 'AAA',
- CAST('4444444444' as BLOB),
- CAST('7777777777' as BLOB),
- CAST('9999999999' as BLOB));
+ 1,
+ 'AAA',
+ CAST('4444444444' as BLOB),
+ CAST('7777777777' as BLOB),
+ CAST('9999999999' as BLOB));
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_psql.sql
index 5666aad..0aac8b1 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_psql.sql
@@ -1,19 +1,19 @@
drop table MYBLOB cascade;
create table MYBLOB (
- ID int primary key,
- NAME VARCHAR(100),
- BLB BYTEA,
- BYTEBLB BYTEA,
- BYTEBLB2 BYTEA
+ ID int primary key,
+ NAME VARCHAR(100),
+ BLB BYTEA,
+ BYTEBLB BYTEA,
+ BYTEBLB2 BYTEA
) ;
commit;
insert into MYBLOB values (
- 1,
- 'AAA',
- '4444444444',
- '7777777777',
- '9999999999');
+ 1,
+ 'AAA',
+ '4444444444',
+ '7777777777',
+ '9999999999');
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_syb.sql
index 86b7f39..98a95f5 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_syb.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blob/sql/blob_syb.sql
@@ -2,20 +2,20 @@
go
create table MYBLOB (
- ID INT primary key NOT NULL,
- NAME VARCHAR(100),
- BLB IMAGE,
- BYTEBLB IMAGE,
- BYTEBLB2 IMAGE
+ ID INT primary key NOT NULL,
+ NAME VARCHAR(100),
+ BLB IMAGE,
+ BYTEBLB IMAGE,
+ BYTEBLB2 IMAGE
)
go
insert into MYBLOB values (
- 1,
- 'AAA',
- '4444444444',
- '7777777777',
- '9999999999')
+ 1,
+ 'AAA',
+ '4444444444',
+ '7777777777',
+ '9999999999')
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/build.properties
index 8641afd..38e7bc4 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/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="BlobJ2DB"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/build.xml
index 0a6e173..e22d53a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/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="**/*Blob*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/BlobTestHome.class,**/BlobTest.class,**/*Client*.class" />
</antcall>
- </target>
-
+ </target>
+
<target name="create-resources" depends="init-common">
<antcall target="asadmin-batch-common">
<param name="asadmin.file" value="${basedir}/../common/create_resources.asadmin"/>
@@ -66,23 +66,23 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="deploy"
depends="init-common">
- <antcall target="execute-ejb-sql-common">
+ <antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_blob_derby.sql"/>
</antcall>
<antcall target="deploy-common">
- <param name="extra-params"
+ <param name="extra-params"
value="--uniquetablenames=true --dropandcreatetables=true"/>
- </antcall>
+ </antcall>
</target>
<target name="run" depends="init-common">
<antcall target="runclient-common">
- <param name="appclient.application.args"
+ <param name="appclient.application.args"
value="Java2DBTest"/>
- </antcall>
+ </antcall>
</target>
<target name="undeploy" depends="init-common">
@@ -91,7 +91,7 @@
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/client/Client.java
index b035a51..9036863 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/client/Client.java
@@ -32,13 +32,13 @@
*/
public class Client {
private static test.BlobTestHome bhome = null;
-
+
private static SimpleReporterAdapter stat =
- new SimpleReporterAdapter("appserv-tests");
+ new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
boolean isJava2DBTest = args.length > 0;
-
+
try {
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteBlobTest");
@@ -47,7 +47,7 @@
objref, test.BlobTestHome.class);
System.out.println("START");
- stat.addDescription("Blob");
+ stat.addDescription("Blob");
test(100, "FOO", new byte[]{'A', 'B', 'C'});
test(200, "BAR", new byte[]{'M', 'N', 'O'});
@@ -62,30 +62,30 @@
} else {
try {
test(40, "BAZ", null);
- stat.addStatus("ejbclient Blob", stat.FAIL);
+ stat.addStatus("ejbclient Blob", stat.FAIL);
throw new Exception(
"Failed to catch expected exception for insert of null blob value");
} catch (Exception ex) {
System.out.println(
"Caught expected exception when inserting null blob value");
- //stat.addStatus("ejbclient Blob", stat.PASS);
+ //stat.addStatus("ejbclient Blob", stat.PASS);
}
}
- stat.addStatus("ejbclient Blob", stat.PASS);
+ stat.addStatus("ejbclient Blob", stat.PASS);
System.out.println("FINISH");
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient Blob", stat.FAIL);
+ stat.addStatus("ejbclient Blob", stat.FAIL);
}
- stat.printSummary("Blob");
+ stat.printSummary("Blob");
}
static void test(int id, String name, byte chars[])
throws Exception {
-
+
Integer pk = new Integer(id);
test.BlobTest bean = bhome.create(pk, name, chars);
System.out.println("Created: " + bean.getPrimaryKey());
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/sun-ejb-jar.xml
index 5d047a8..f0ec84e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/descriptor/sun-ejb-jar.xml
@@ -24,14 +24,14 @@
<ejb>
<ejb-name>BlobTest</ejb-name>
<jndi-name>SimpleBlobTest</jndi-name>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <bean-cache>
- <max-cache-size>60</max-cache-size>
- <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
- <victim-selection-policy>FIFO</victim-selection-policy>
- </bean-cache>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <bean-cache>
+ <max-cache-size>60</max-cache-size>
+ <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
+ <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
+ <victim-selection-policy>FIFO</victim-selection-policy>
+ </bean-cache>
</ejb>
<pm-descriptors>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTestBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTestBean.java
index 706fdca..db487aa 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTestBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTestBean.java
@@ -25,65 +25,65 @@
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);
@@ -113,8 +113,8 @@
return null;
}
-
+
public void ejbPostCreate(Integer id, java.lang.String name, byte[] b) throws jakarta.ejb.CreateException {
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTestHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTestHome.java
index e9e7791..a4cddfb 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTestHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/ejb/BlobTestHome.java
@@ -24,9 +24,9 @@
*/
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;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_db2.sql
index d9e5942..fca977a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_db2.sql
@@ -1,19 +1,19 @@
drop table myblob;
create table myblob (
- id int primary key NOT NULL,
- name VARCHAR(100),
- blb BLOB,
- byteblb BLOB,
- byteblb2 BLOB
+ id int primary key NOT NULL,
+ name VARCHAR(100),
+ blb BLOB,
+ byteblb BLOB,
+ byteblb2 BLOB
);
commit;
insert into myblob values (
- 1,
- 'AAA',
- CAST('4444444444' as BLOB),
- CAST('7777777777' as BLOB),
- CAST('9999999999' as BLOB));
+ 1,
+ 'AAA',
+ CAST('4444444444' as BLOB),
+ CAST('7777777777' as BLOB),
+ CAST('9999999999' as BLOB));
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_derby.sql
index 1901a41..9964205 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_derby.sql
@@ -1,17 +1,17 @@
drop table MYBLOB;
create table MYBLOB (
- ID int primary key NOT NULL,
- NAME VARCHAR(100),
- BLB BLOB,
- BYTEBLB BLOB,
- BYTEBLB2 BLOB
+ ID int primary key NOT NULL,
+ NAME VARCHAR(100),
+ BLB BLOB,
+ BYTEBLB BLOB,
+ BYTEBLB2 BLOB
);
insert into MYBLOB values (
- 1,
- 'AAA',
- CAST(X'4444444444' as BLOB),
- CAST(X'7777777777' as BLOB),
- CAST(X'9999999999' as BLOB));
+ 1,
+ 'AAA',
+ CAST(X'4444444444' as BLOB),
+ CAST(X'7777777777' as BLOB),
+ CAST(X'9999999999' as BLOB));
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_ifx.sql
index 2ce6023..bae48c8 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_ifx.sql
@@ -1,19 +1,19 @@
drop table myblob;
create table myblob (
- id int primary key,
- name VARCHAR(100),
- blb BLOB,
- byteblb BLOB,
- byteblb2 BLOB
+ id int primary key,
+ name VARCHAR(100),
+ blb BLOB,
+ byteblb BLOB,
+ byteblb2 BLOB
);
commit;
insert into myblob values (
- 1,
- 'AAA',
- CAST('4444444444' AS BLOB),
- CAST('7777777777' AS BLOB),
- CAST('9999999999' AS BLOB));
+ 1,
+ 'AAA',
+ CAST('4444444444' AS BLOB),
+ CAST('7777777777' AS BLOB),
+ CAST('9999999999' AS BLOB));
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_mssql.sql
index f9f70c9..c2d7028 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_mssql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_mssql.sql
@@ -2,19 +2,19 @@
go
create table MYBLOB (
- ID INT PRIMARY KEY,
- NAME VARCHAR(100),
- BLB IMAGE,
- BYTEBLB IMAGE,
- BYTEBLB2 IMAGE
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(100),
+ BLB IMAGE,
+ BYTEBLB IMAGE,
+ BYTEBLB2 IMAGE
)
go
insert into MYBLOB values (
- 1,
- 'AAA',
- '4444444444',
- '7777777777',
- '9999999999')
+ 1,
+ 'AAA',
+ '4444444444',
+ '7777777777',
+ '9999999999')
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_mysql.sql
index 4e31799..33d93db 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_mysql.sql
@@ -1,19 +1,19 @@
drop table MYBLOB;
create table MYBLOB (
- ID int primary key,
- NAME VARCHAR(100),
- BLB BLOB(255),
- BYTEBLB BLOB(255),
- BYTEBLB2 BLOB(255)
+ ID int primary key,
+ NAME VARCHAR(100),
+ BLB BLOB(255),
+ BYTEBLB BLOB(255),
+ BYTEBLB2 BLOB(255)
) ENGINE=InnoDB;
commit;
insert into MYBLOB values (
- 1,
- 'AAA',
- '4444444444',
- '7777777777',
- '9999999999');
+ 1,
+ 'AAA',
+ '4444444444',
+ '7777777777',
+ '9999999999');
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_ora.sql
index 2128c04..b0e7b12 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_ora.sql
@@ -1,19 +1,19 @@
drop table MYBLOB;
create table MYBLOB (
- ID int primary key,
- NAME VARCHAR2(100),
- BLB RAW(255),
- BYTEBLB RAW(255),
- BYTEBLB2 RAW(255)
+ ID int primary key,
+ NAME VARCHAR2(100),
+ BLB RAW(255),
+ BYTEBLB RAW(255),
+ BYTEBLB2 RAW(255)
);
commit;
insert into MYBLOB values (
- 1,
- 'AAA',
- '4444444444',
- '7777777777',
- '9999999999');
+ 1,
+ 'AAA',
+ '4444444444',
+ '7777777777',
+ '9999999999');
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_pbs.sql
index 990766f..bc05018 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_pbs.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_pbs.sql
@@ -1,19 +1,19 @@
drop table myblob;
create table myblob (
- id int primary key,
- name VARCHAR2(100),
- blb BLOB(10k),
- byteblb BLOB(10k),
- byteblb2 BLOB(10k)
+ id int primary key,
+ name VARCHAR2(100),
+ blb BLOB(10k),
+ byteblb BLOB(10k),
+ byteblb2 BLOB(10k)
);
commit;
insert into myblob values (
- 1,
- 'AAA',
- CAST('4444444444' as BLOB),
- CAST('7777777777' as BLOB),
- CAST('9999999999' as BLOB));
+ 1,
+ 'AAA',
+ CAST('4444444444' as BLOB),
+ CAST('7777777777' as BLOB),
+ CAST('9999999999' as BLOB));
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_psql.sql
index 5666aad..0aac8b1 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_psql.sql
@@ -1,19 +1,19 @@
drop table MYBLOB cascade;
create table MYBLOB (
- ID int primary key,
- NAME VARCHAR(100),
- BLB BYTEA,
- BYTEBLB BYTEA,
- BYTEBLB2 BYTEA
+ ID int primary key,
+ NAME VARCHAR(100),
+ BLB BYTEA,
+ BYTEBLB BYTEA,
+ BYTEBLB2 BYTEA
) ;
commit;
insert into MYBLOB values (
- 1,
- 'AAA',
- '4444444444',
- '7777777777',
- '9999999999');
+ 1,
+ 'AAA',
+ '4444444444',
+ '7777777777',
+ '9999999999');
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_syb.sql
index 86b7f39..98a95f5 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_syb.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/blobJava2DB/sql/blob_syb.sql
@@ -2,20 +2,20 @@
go
create table MYBLOB (
- ID INT primary key NOT NULL,
- NAME VARCHAR(100),
- BLB IMAGE,
- BYTEBLB IMAGE,
- BYTEBLB2 IMAGE
+ ID INT primary key NOT NULL,
+ NAME VARCHAR(100),
+ BLB IMAGE,
+ BYTEBLB IMAGE,
+ BYTEBLB2 IMAGE
)
go
insert into MYBLOB values (
- 1,
- 'AAA',
- '4444444444',
- '7777777777',
- '9999999999')
+ 1,
+ 'AAA',
+ '4444444444',
+ '7777777777',
+ '9999999999')
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/build.xml
index 57ac4ae..05e1058 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/build.xml
@@ -42,7 +42,7 @@
</delete>
<record name="cmp.output" action="start" />
- <ant dir="blob" target="all"/>
+ <ant dir="blob" target="all"/>
<ant dir="cascadeDelete" target="all"/>
<!-- Need to fix the client to report pass/fail status
@@ -266,9 +266,9 @@
<target name="usage">
- <echo>
- Usage:
- ant all (Executes all the ejb-ejb30 tests)
- </echo>
+ <echo>
+ Usage:
+ ant all (Executes all the ejb-ejb30 tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/build.properties
index ce73fb0..c897d10 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/build.properties
@@ -15,30 +15,30 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="CascadeDelete"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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="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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.xml"/>
<property name="web.xml"
value="descriptor/web.xml"/>
<property name="sun-web.xml"
value="descriptor/sun-web.xml"/>
<property name="ejb.xml"
- value="descriptor/ejb.xml"/>
+ value="descriptor/ejb.xml"/>
<property name="cdclient.xml"
- value="descriptor/cdclient.xml"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
+ value="descriptor/cdclient.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
<property name="war.file" value="${assemble.dir}/${appname}-cdclient.war"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/build.xml
index bbb1791..c56be78 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/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"/>
@@ -42,20 +42,20 @@
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
- <antcall target="compile-common">
+ <antcall target="compile-common">
<param name="src" value="servlet"/>
- </antcall>
+ </antcall>
- </target>
+ </target>
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="war.classes"
- value="**/Servlet.class" />
- <param name="ejbjar.classes"
+ <param name="war.classes"
+ value="**/Servlet.class" />
+ <param name="ejbjar.classes"
value="**/A*.class,**/B*.class,**/C*.class,**/D*.class,**/Local*.class"/>
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/AHome.class,**/A.class,**/BHome.class,**/B.class,**/CHome.class,**/C.class,**/DHome.class,**/D.class,**/LocalAHome.class,**/LocalA.class,**/LocalBHome.class,**/LocalB.class,**/LocalCHome.class,**/LocalC.class,**/LocalDHome.class,**/LocalD.class,**/*Client*.class" />
</antcall>
@@ -63,16 +63,16 @@
<echo message="Preparing ear file with proper xml files" />
<unjar src="${assemble.dir}/${appname}App.ear" dest="${TEMPDIR}" overwrite="true" />
- <echo message="Copying xml file to the ear" />
- <copy file="${ejb.xml}" todir="${TEMPDIR}" failonerror="false"/>
- <copy file="${cdclient.xml}" todir="${TEMPDIR}" failonerror="false"/>
+ <echo message="Copying xml file to the ear" />
+ <copy file="${ejb.xml}" todir="${TEMPDIR}" failonerror="false"/>
+ <copy file="${cdclient.xml}" todir="${TEMPDIR}" failonerror="false"/>
<jar jarfile="${assemble.dir}/${appname}App.ear">
<fileset dir="${TEMPDIR}" />
</jar>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/cascadeDelete_derby.sql"/>
@@ -91,22 +91,22 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_cascadeDelete_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/client/Client.java
index e020681..1b2b861 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/client/Client.java
@@ -33,12 +33,12 @@
* @version
*/
public class Client {
-
+
private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
-
+
try {
System.out.println("START");
stat.addDescription("copySemantics");
@@ -108,10 +108,10 @@
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient cascadeDelete", stat.FAIL);
+ stat.addStatus("ejbclient cascadeDelete", stat.FAIL);
}
- stat.printSummary("cascadeDelete");
+ stat.printSummary("cascadeDelete");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-ejb-jar.xml
index 95edce2..7d305f2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/descriptor/sun-ejb-jar.xml
@@ -36,14 +36,14 @@
<ejb-ref-name>ejb/SimpleD</ejb-ref-name>
<jndi-name>localejbs/SimpleD</jndi-name>
</ejb-ref>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <bean-cache>
- <max-cache-size>60</max-cache-size>
- <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
- <victim-selection-policy>FIFO</victim-selection-policy>
- </bean-cache>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <bean-cache>
+ <max-cache-size>60</max-cache-size>
+ <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
+ <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
+ <victim-selection-policy>FIFO</victim-selection-policy>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>B</ejb-name>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/A.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/A.java
index 8c4a937..b47e03d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/A.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/A.java
@@ -25,8 +25,8 @@
*/
public interface A extends jakarta.ejb.EJBObject {
-
+
public void addAll() throws java.rmi.RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/ABean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/ABean.java
index f671c75..e5d00de 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/ABean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/ABean.java
@@ -28,14 +28,14 @@
public abstract class ABean implements jakarta.ejb.EntityBean {
-
+
private jakarta.ejb.EntityContext context;
LocalBHome bhome;
LocalCHome chome;
LocalDHome dhome;
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#setEntityContext(jakarta.ejb.EntityContext)
*/
@@ -49,24 +49,24 @@
throw new EJBException(e.getMessage());
}
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbActivate()
*/
public void ejbActivate() {
-
+
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbPassivate()
*/
public void ejbPassivate() {
-
+
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbRemove()
*/
@@ -79,79 +79,79 @@
for (java.util.Iterator it = bs.iterator(); it.hasNext();) {
((LocalB)it.next()).cascadeDeleteFromA();
}
-
+
}
-
-
+
+
/**
* @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 java.lang.Integer getId();
public abstract void setId(java.lang.Integer id);
-
+
public abstract java.lang.String getName();
public abstract void setName(java.lang.String name);
-
+
public abstract java.util.Collection getDs();
-
+
public abstract void setDs(java.util.Collection ds);
-
+
public abstract java.util.Collection getCs();
-
+
public abstract void setCs(java.util.Collection cs);
-
+
public abstract java.util.Collection getBs();
-
+
public abstract void setBs(java.util.Collection bs);
-
+
public java.lang.Integer ejbCreate(java.lang.Integer id, java.lang.String name) throws jakarta.ejb.CreateException {
setId(id);
setName(name);
return null;
}
-
+
public void ejbPostCreate(java.lang.Integer id, java.lang.String name) throws jakarta.ejb.CreateException {
}
-
+
public void addAll() {
try {
System.out.println("Debug: A addB");
Collection bs = bhome.findAll();
getBs().addAll(bs);
-
+
System.out.println("Debug: A addC");
Collection cs = chome.findAll();
getCs().addAll(cs);
-
+
System.out.println("Debug: A addD");
Collection ds = dhome.findAll();
getDs().addAll(ds);
-
+
System.out.println("Debug: A addOthers");
for (Iterator it = bs.iterator(); it.hasNext();) {
LocalB b = (LocalB)it.next();
Integer pk = b.getId();
-
+
System.out.println("Debug: A add to B " + pk);
LocalC c = chome.findByPrimaryKey(pk);
b.setC(c);
@@ -166,21 +166,21 @@
throw new EJBException(e.getMessage());
}
}
-
+
private LocalBHome lookupB() throws NamingException {
System.out.println("Debug: A lookupB");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleB");
return (LocalBHome) objref;
}
-
+
private LocalCHome lookupC() throws NamingException {
System.out.println("Debug: A lookupC");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleC");
return (LocalCHome) objref;
}
-
+
private LocalDHome lookupD() throws NamingException {
System.out.println("Debug: A lookupD");
Context initial = new InitialContext();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/AHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/AHome.java
index 0deba24..a330bd3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/AHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/AHome.java
@@ -25,12 +25,12 @@
*/
public interface AHome extends jakarta.ejb.EJBHome {
-
+
public cascadeDelete.A findByPrimaryKey(java.lang.Integer aKey)
throws jakarta.ejb.FinderException, java.rmi.RemoteException;
-
+
public A create(java.lang.Integer id, java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
public java.util.Collection findAll() throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/B.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/B.java
index 7110b8c..bc94be2 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/B.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/B.java
@@ -25,6 +25,6 @@
*/
public interface B extends jakarta.ejb.EJBObject {
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/BBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/BBean.java
index bc75f0e..46df9a4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/BBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/BBean.java
@@ -26,36 +26,36 @@
public abstract class BBean implements jakarta.ejb.EntityBean {
-
+
private jakarta.ejb.EntityContext context;
private boolean cascadeDeleteFromA = false;
private boolean cascadeDeleteFromC = false;
-
-
+
+
/**
* @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()
*/
@@ -63,7 +63,7 @@
System.out.println("Debug: B ejbRemove");
cascadeDelete.LocalA a = getA();
System.out.println("A: " + ((a==null)? "null" : a.getName()));
-
+
cascadeDelete.LocalC c = getC();
System.out.println("C: " + ((c==null)? "null" : c.getName()));
@@ -81,69 +81,69 @@
}
System.out.println("Ds: " + getDs().size());
-
-
+
+
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbLoad()
*/
public void ejbLoad() {
cascadeDeleteFromA = false;
cascadeDeleteFromC = false;
-
+
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbStore()
*/
public void ejbStore() {
-
+
}
-
+
public abstract java.lang.Integer getId();
public abstract void setId(java.lang.Integer id);
-
+
public abstract java.lang.String getName();
public abstract void setName(java.lang.String name);
-
+
public abstract java.util.Collection getDs();
-
+
public abstract void setDs(java.util.Collection ds);
-
+
public abstract cascadeDelete.LocalC getC();
-
+
public abstract void setC(cascadeDelete.LocalC c);
-
+
public abstract cascadeDelete.LocalA getA();
-
+
public abstract void setA(cascadeDelete.LocalA a);
-
+
public java.lang.Integer ejbCreate(java.lang.Integer id, java.lang.String name) throws jakarta.ejb.CreateException {
setId(id);
setName(name);
return null;
}
-
+
public void ejbPostCreate(java.lang.Integer id, java.lang.String name) throws jakarta.ejb.CreateException {
}
public void cascadeDeleteFromA() {
cascadeDeleteFromA = true;
}
-
+
public void cascadeDeleteFromC() {
cascadeDeleteFromC = true;
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/BHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/BHome.java
index 2f4c132..416bf4a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/BHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/BHome.java
@@ -25,11 +25,11 @@
*/
public interface BHome extends jakarta.ejb.EJBHome {
-
+
public cascadeDelete.B findByPrimaryKey(java.lang.Integer aKey) throws jakarta.ejb.FinderException, java.rmi.RemoteException;
-
+
public java.util.Collection findAll() throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public B create(java.lang.Integer id, java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/C.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/C.java
index 1d1d337..558edc3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/C.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/C.java
@@ -25,6 +25,6 @@
*/
public interface C extends jakarta.ejb.EJBObject {
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/CBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/CBean.java
index d600b91..a0bce3c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/CBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/CBean.java
@@ -26,47 +26,47 @@
public abstract class CBean implements jakarta.ejb.EntityBean {
-
+
private jakarta.ejb.EntityContext context;
private boolean cascadeDeleteFromA = false;
private boolean cascadeDeleteFromB = false;
-
-
+
+
/**
* @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: C ejbRemove");
-
+
cascadeDelete.LocalA a = getA();
System.out.println("A: " + ((a==null)? "null" : a.getName()));
if (cascadeDeleteFromA && (a != null) )
throw new EJBException("In C - getA() not NULL in CascadeDeleteFromA!");
-
+
cascadeDelete.LocalB b = getB();
System.out.println("B: " + ((b==null)? "null" : b.getName()));
if (b != null) {
@@ -76,65 +76,65 @@
b.cascadeDeleteFromC();
}
}
-
+
System.out.println("Ds: " + getDs().size());
-
-
+
+
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbLoad()
*/
public void ejbLoad() {
cascadeDeleteFromA = false;
cascadeDeleteFromB = false;
-
+
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbStore()
*/
public void ejbStore() {
-
+
}
-
+
public abstract java.lang.Integer getId();
public abstract void setId(java.lang.Integer id);
-
+
public abstract java.lang.String getName();
public abstract void setName(java.lang.String name);
-
+
public abstract java.util.Collection getDs();
-
+
public abstract void setDs(java.util.Collection ds);
-
+
public abstract cascadeDelete.LocalA getA();
-
+
public abstract void setA(cascadeDelete.LocalA a);
-
+
public abstract cascadeDelete.LocalB getB();
-
+
public abstract void setB(cascadeDelete.LocalB b);
-
+
public java.lang.Integer ejbCreate(java.lang.Integer id, java.lang.String name) throws jakarta.ejb.CreateException {
setId(id);
setName(name);
return null;
}
-
+
public void ejbPostCreate(java.lang.Integer id, java.lang.String name) throws jakarta.ejb.CreateException {
}
-
+
public void cascadeDeleteFromA() {
cascadeDeleteFromA = true;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/CHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/CHome.java
index 75376b8..13bbf94 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/CHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/CHome.java
@@ -25,11 +25,11 @@
*/
public interface CHome extends jakarta.ejb.EJBHome {
-
+
public cascadeDelete.C findByPrimaryKey(java.lang.Integer aKey) throws jakarta.ejb.FinderException, java.rmi.RemoteException;
-
+
public java.util.Collection findAll() throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public C create(java.lang.Integer id, java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/D.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/D.java
index 3ad44aa..7f85476 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/D.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/D.java
@@ -25,6 +25,6 @@
*/
public interface D extends jakarta.ejb.EJBObject {
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/DBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/DBean.java
index 313635a..8246025 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/DBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/DBean.java
@@ -26,100 +26,100 @@
public abstract class DBean 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: D ejbRemove");
-
+
cascadeDelete.LocalA a = getA();
System.out.println("A: " + ((a==null)? "null" : a.getName()));
-
+
cascadeDelete.LocalB b = getB();
System.out.println("B: " + ((b==null)? "null" : b.getName()));
-
+
cascadeDelete.LocalC c = getC();
System.out.println("C: " + ((c==null)? "null" : c.getName()));
-
+
}
-
-
+
+
/**
* @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 java.lang.Integer getId();
public abstract void setId(java.lang.Integer id);
-
+
public abstract java.lang.String getName();
public abstract void setName(java.lang.String name);
-
+
public abstract cascadeDelete.LocalA getA();
-
+
public abstract void setA(cascadeDelete.LocalA a);
-
+
public abstract cascadeDelete.LocalB getB();
-
+
public abstract void setB(cascadeDelete.LocalB b);
-
+
public abstract cascadeDelete.LocalC getC();
-
+
public abstract void setC(cascadeDelete.LocalC c);
-
+
public java.lang.Integer ejbCreate(java.lang.Integer id, java.lang.String name) throws jakarta.ejb.CreateException {
setId(id);
setName(name);
return null;
}
-
+
public void ejbPostCreate(java.lang.Integer id, java.lang.String name) throws jakarta.ejb.CreateException {
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/DHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/DHome.java
index 5f09b85..9f8f883 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/DHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/DHome.java
@@ -25,11 +25,11 @@
*/
public interface DHome extends jakarta.ejb.EJBHome {
-
+
public cascadeDelete.D findByPrimaryKey(java.lang.Integer aKey) throws jakarta.ejb.FinderException, java.rmi.RemoteException;
-
+
public java.util.Collection findAll() throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public D create(java.lang.Integer id, java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalA.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalA.java
index 80839ee..09a8959 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalA.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalA.java
@@ -25,8 +25,8 @@
*/
public interface LocalA extends jakarta.ejb.EJBLocalObject {
-
+
public String getName();
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalAHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalAHome.java
index d0b9579..9acb894 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalAHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalAHome.java
@@ -25,10 +25,10 @@
*/
public interface LocalAHome extends jakarta.ejb.EJBLocalHome {
-
+
public cascadeDelete.LocalA findByPrimaryKey(java.lang.Integer aKey)
throws jakarta.ejb.FinderException;
-
+
public java.util.Collection findAll() throws jakarta.ejb.FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalB.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalB.java
index 089f0ca..bd910e3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalB.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalB.java
@@ -25,18 +25,18 @@
*/
public interface LocalB extends jakarta.ejb.EJBLocalObject {
-
+
public java.lang.Integer getId();
-
+
public void setC(cascadeDelete.LocalC c);
-
+
public java.util.Collection getDs();
-
+
public String getName();
public void cascadeDeleteFromA();
-
+
public void cascadeDeleteFromC();
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalBHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalBHome.java
index 13cdfa3..14e9df0 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalBHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalBHome.java
@@ -25,10 +25,10 @@
*/
public interface LocalBHome extends jakarta.ejb.EJBLocalHome {
-
+
public cascadeDelete.LocalB findByPrimaryKey(java.lang.Integer aKey)
throws jakarta.ejb.FinderException;
-
+
public java.util.Collection findAll() throws jakarta.ejb.FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalC.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalC.java
index 44d38b9..54e85b5 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalC.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalC.java
@@ -25,14 +25,14 @@
*/
public interface LocalC extends jakarta.ejb.EJBLocalObject {
-
+
public java.util.Collection getDs();
-
+
public String getName();
public void cascadeDeleteFromA();
public void cascadeDeleteFromB();
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalCHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalCHome.java
index b266756..79615b5 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalCHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalCHome.java
@@ -25,10 +25,10 @@
*/
public interface LocalCHome extends jakarta.ejb.EJBLocalHome {
-
+
public cascadeDelete.LocalC findByPrimaryKey(java.lang.Integer aKey)
throws jakarta.ejb.FinderException;
-
+
public java.util.Collection findAll() throws jakarta.ejb.FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalD.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalD.java
index 785022d..bcdecb0 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalD.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalD.java
@@ -25,8 +25,8 @@
*/
public interface LocalD extends jakarta.ejb.EJBLocalObject {
-
+
public String getName();
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalDHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalDHome.java
index 3efc4de..7fea021 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalDHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/ejb/LocalDHome.java
@@ -25,12 +25,12 @@
*/
public interface LocalDHome extends jakarta.ejb.EJBLocalHome {
-
+
public cascadeDelete.LocalD findByPrimaryKey(java.lang.Integer aKey)
throws jakarta.ejb.FinderException;
-
+
public java.util.Collection findAll() throws jakarta.ejb.FinderException;
-
+
public java.util.Collection findInRange(java.lang.Integer p0, java.lang.Integer p1) throws jakarta.ejb.FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/servlet/Servlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/servlet/Servlet.java
index b47962b..f739527 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/servlet/Servlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/servlet/Servlet.java
@@ -30,20 +30,20 @@
* @version
*/
public class Servlet extends HttpServlet {
-
+
/** Initializes the servlet.
*/
public void init(ServletConfig config) throws ServletException {
super.init(config);
-
+
}
-
+
/** Destroys the servlet.
*/
public void destroy() {
-
+
}
-
+
/** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
* @param request servlet request
* @param response servlet response
@@ -52,13 +52,13 @@
throws ServletException, java.io.IOException {
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
-
+
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet</title>");
out.println("</head>");
out.println("<body>");
-
+
out.println("</body>");
out.println("</html>");
try {
@@ -77,7 +77,7 @@
cascadeDelete.CHome chome =
(cascadeDelete.CHome)PortableRemoteObject.narrow(objref,
cascadeDelete.CHome.class);
-
+
objref = initial.lookup("java:comp/env/ejb/RemoteD");
cascadeDelete.DHome dhome =
(cascadeDelete.DHome)PortableRemoteObject.narrow(objref,
@@ -85,27 +85,27 @@
cascadeDelete.A abean = ahome.create(new Integer(1), "A1");
-
+
cascadeDelete.B bbean = bhome.create(new Integer(100), "B100");
bbean = bhome.create(new Integer(200), "B200");
-
+
cascadeDelete.C cbean = chome.create(new Integer(100), "C100");
cbean = chome.create(new Integer(200), "C200");
-
+
cascadeDelete.D dbean = dhome.create(new Integer(1000), "D1000");
dbean = dhome.create(new Integer(1100), "D1100");
dbean = dhome.create(new Integer(2000), "D2000");
dbean = dhome.create(new Integer(2200), "D2200");
abean.addAll();
-
+
out.println("<pre>");
out.println("Created " + ahome.findAll().size() + " As.");
out.println("Created " + bhome.findAll().size() + " Bs.");
out.println("Created " + chome.findAll().size() + " Cs.");
out.println("Created " + dhome.findAll().size() + " Ds.");
-
+
out.println("Removing last C...");
cbean.remove();
@@ -113,8 +113,8 @@
out.println("Left " + bhome.findAll().size() + " Bs.");
out.println("Left " + chome.findAll().size() + " Cs.");
out.println("Left " + dhome.findAll().size() + " Ds.");
-
-
+
+
out.println("Removing A...");
abean.remove();
@@ -122,7 +122,7 @@
out.println("Left " + bhome.findAll().size() + " Bs.");
out.println("Left " + chome.findAll().size() + " Cs.");
out.println("Left " + dhome.findAll().size() + " Ds.");
-
+
out.println("</pre>");
} catch (Exception ex) {
@@ -132,7 +132,7 @@
out.close();
}
-
+
/** Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
@@ -141,7 +141,7 @@
throws ServletException, java.io.IOException {
processRequest(request, response);
}
-
+
/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
@@ -150,11 +150,11 @@
throws ServletException, java.io.IOException {
processRequest(request, response);
}
-
+
/** Returns a short description of the servlet.
*/
public String getServletInfo() {
return "Short description";
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_ifx.sql
index 03c9184..f7b139c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/cascadeDelete/sql/cascadeDelete_ifx.sql
@@ -7,7 +7,7 @@
CREATE TABLE A
(
id INT PRIMARY KEY,
- name VARCHAR(32)
+ name VARCHAR(32)
);
CREATE TABLE B
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/build.properties
index e60efd3..81ac555 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/build.properties
@@ -15,13 +15,13 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="College"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<!-- <property name="assemble.dir" value="{build.classes.dir}/archive"/> -->
-<property name="test.client"
- value="CollegeClient"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="test.client"\u0020
+ value="CollegeClient"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
<property name="appclient.jar" value="appclient_client.jar"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/build.xml
index e76a123..f8f9d21 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/build.xml
@@ -34,19 +34,19 @@
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
- <target name="deploy"
+
+ <target name="deploy"
depends="init-common">
- <mkdir dir="${build.classes.dir}"/>
- <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}"/>
+ <mkdir dir="${assemble.dir}"/>
<echo message="assemble.dir => ${assemble.dir} " />
- <copy file="${basedir}/ear/CollegeApp.ear" todir="${assemble.dir}" />
+ <copy file="${basedir}/ear/CollegeApp.ear" todir="${assemble.dir}" />
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/CollegeApp_derby.sql"/>
</antcall>
<antcall target="deploy-common">
- <param name="${deployed.app}" value="${basedir}/ear/CollegeApp.ear"/>
- </antcall>
+ <param name="${deployed.app}" value="${basedir}/ear/CollegeApp.ear"/>
+ </antcall>
</target>
<target name="create-resources" depends="init-common">
@@ -60,22 +60,22 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_CollegeApp_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp.sql
index b22bd92..6695e0e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp.sql
@@ -21,7 +21,7 @@
create table course (courseId Number, deptId Number, courseName Varchar2(255), sylabus BLOB ,constraint course_ct primary key (courseId),
FOREIGN KEY (deptId) REFERENCES dept (deptId)
);
-
+
drop table stud_course CASCADE CONSTRAINTS;
create table stud_course (courseId Number, studentId Number,
constraint stuc_c primary key (courseId,studentId),
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_db2.sql
index 5f5212e..bcf2886 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_db2.sql
@@ -7,34 +7,34 @@
create table address (
- addressId NUMERIC(30) NOT NULL,
- street VARCHAR(255),
- code NUMERIC(30),
- city VARCHAR(255),
- state VARCHAR(255),
+ addressId NUMERIC(30) NOT NULL,
+ street VARCHAR(255),
+ code NUMERIC(30),
+ city VARCHAR(255),
+ state VARCHAR(255),
constraint addr_ct primary key (addressId)
);
create table account (
- accountId VARCHAR(255) NOT NULL,
- feesPaid NUMERIC(30,2),
- feesDue NUMERIC(30,2),
- dueDate DATE,
+ accountId VARCHAR(255) NOT NULL,
+ feesPaid NUMERIC(30,2),
+ feesDue NUMERIC(30,2),
+ dueDate DATE,
constraint acc_ct primary key (accountId)
);
create table dept (
- deptId NUMERIC(30) NOT NULL,
- deptName VARCHAR(255),
+ deptId NUMERIC(30) NOT NULL,
+ deptName VARCHAR(255),
constraint dept_ct primary key (deptId)
);
create table student (
- studentId NUMERIC(30) NOT NULL,
- studentName VARCHAR(255),
- deptId NUMERIC(30),
- addressId NUMERIC(30),
- accountId VARCHAR(255),
+ studentId NUMERIC(30) NOT NULL,
+ studentName VARCHAR(255),
+ deptId NUMERIC(30),
+ addressId NUMERIC(30),
+ accountId VARCHAR(255),
constraint st_ct primary key (studentId),
FOREIGN KEY (deptId) REFERENCES dept (deptId),
FOREIGN KEY (addressId) REFERENCES address (addressId),
@@ -42,16 +42,16 @@
);
create table course (
- courseId NUMERIC(30) NOT NULL,
- deptId NUMERIC(30),
- courseName VARCHAR(255),
- sylabus BLOB,
+ courseId NUMERIC(30) NOT NULL,
+ deptId NUMERIC(30),
+ courseName VARCHAR(255),
+ sylabus BLOB,
constraint course_ct primary key (courseId),
FOREIGN KEY (deptId) REFERENCES dept (deptId)
);
-
+
create table stud_course (
- courseId NUMERIC(30) NOT NULL,
+ courseId NUMERIC(30) NOT NULL,
studentId NUMERIC(30) NOT NULL,
constraint stco_ct primary key (courseId, studentId),
FOREIGN KEY (courseId) REFERENCES course (courseId),
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_derby.sql
index 2b279a5..70f272c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_derby.sql
@@ -7,34 +7,34 @@
create table address (
- addressId NUMERIC(30) NOT NULL,
- street VARCHAR(255),
- code NUMERIC(30),
- city VARCHAR(255),
- state VARCHAR(255),
+ addressId NUMERIC(30) NOT NULL,
+ street VARCHAR(255),
+ code NUMERIC(30),
+ city VARCHAR(255),
+ state VARCHAR(255),
constraint addr_ct primary key (addressId)
);
create table account (
- accountId VARCHAR(255) NOT NULL,
- feesPaid NUMERIC(30,2),
- feesDue NUMERIC(30,2),
- dueDate DATE,
+ accountId VARCHAR(255) NOT NULL,
+ feesPaid NUMERIC(30,2),
+ feesDue NUMERIC(30,2),
+ dueDate DATE,
constraint acc_ct primary key (accountId)
);
create table dept (
- deptId NUMERIC(30) NOT NULL,
- deptName VARCHAR(255),
+ deptId NUMERIC(30) NOT NULL,
+ deptName VARCHAR(255),
constraint dept_ct primary key (deptId)
);
create table student (
- studentId NUMERIC(30) NOT NULL,
- studentName VARCHAR(255),
- deptId NUMERIC(30),
- addressId NUMERIC(30),
- accountId VARCHAR(255),
+ studentId NUMERIC(30) NOT NULL,
+ studentName VARCHAR(255),
+ deptId NUMERIC(30),
+ addressId NUMERIC(30),
+ accountId VARCHAR(255),
constraint st_ct primary key (studentId),
FOREIGN KEY (deptId) REFERENCES dept (deptId),
FOREIGN KEY (addressId) REFERENCES address (addressId),
@@ -42,16 +42,16 @@
);
create table course (
- courseId NUMERIC(30) NOT NULL,
- deptId NUMERIC(30),
- courseName VARCHAR(255),
- sylabus BLOB,
+ courseId NUMERIC(30) NOT NULL,
+ deptId NUMERIC(30),
+ courseName VARCHAR(255),
+ sylabus BLOB,
constraint course_ct primary key (courseId),
FOREIGN KEY (deptId) REFERENCES dept (deptId)
);
-
+
create table stud_course (
- courseId NUMERIC(30) NOT NULL,
+ courseId NUMERIC(30) NOT NULL,
studentId NUMERIC(30) NOT NULL,
constraint stco_ct primary key (courseId, studentId),
FOREIGN KEY (courseId) REFERENCES course (courseId),
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_ifx.sql
index b349c3e..7132d8f 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_ifx.sql
@@ -7,34 +7,34 @@
create table address (
- addressId DECIMAL(32),
- street VARCHAR(127),
- code DECIMAL(32),
- city VARCHAR(127),
- state VARCHAR(127),
+ addressId DECIMAL(32),
+ street VARCHAR(127),
+ code DECIMAL(32),
+ city VARCHAR(127),
+ state VARCHAR(127),
primary key (addressId)
);
create table account (
- accountId VARCHAR(127),
- feesPaid DECIMAL(32,2),
- feesDue DECIMAL(32,2),
- dueDate DATE,
+ accountId VARCHAR(127),
+ feesPaid DECIMAL(32,2),
+ feesDue DECIMAL(32,2),
+ dueDate DATE,
primary key (accountId)
);
create table dept (
- deptId DECIMAL(32),
- deptName VARCHAR(127),
+ deptId DECIMAL(32),
+ deptName VARCHAR(127),
primary key (deptId)
);
create table student (
- studentId DECIMAL(32),
- studentName VARCHAR(127),
- deptId DECIMAL(32),
- addressId DECIMAL(32),
- accountId VARCHAR(127),
+ studentId DECIMAL(32),
+ studentName VARCHAR(127),
+ deptId DECIMAL(32),
+ addressId DECIMAL(32),
+ accountId VARCHAR(127),
primary key (studentId),
FOREIGN KEY (deptId) REFERENCES dept (deptId),
FOREIGN KEY (addressId) REFERENCES address (addressId),
@@ -42,16 +42,16 @@
);
create table course (
- courseId DECIMAL(32),
- deptId DECIMAL(32),
- courseName VARCHAR(127),
- sylabus BYTE,
+ courseId DECIMAL(32),
+ deptId DECIMAL(32),
+ courseName VARCHAR(127),
+ sylabus BYTE,
primary key (courseId),
FOREIGN KEY (deptId) REFERENCES dept (deptId)
);
-
+
create table stud_course (
- courseId DECIMAL(32),
+ courseId DECIMAL(32),
studentId DECIMAL(32),
primary key (courseId, studentId),
FOREIGN KEY (courseId) REFERENCES course (courseId),
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_mssql.sql
index 50aab44..aa055e6 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_mssql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_mssql.sql
@@ -7,34 +7,34 @@
go
create table ADDRESS (
- ADDRESSID NUMERIC(38),
- STREET VARCHAR(255),
- CODE NUMERIC(38),
- CITY VARCHAR(255),
- STATE VARCHAR(255),
+ ADDRESSID NUMERIC(38),
+ STREET VARCHAR(255),
+ CODE NUMERIC(38),
+ CITY VARCHAR(255),
+ STATE VARCHAR(255),
CONSTRAINT ADDR_CT PRIMARY KEY (ADDRESSID)
)
create table ACCOUNT (
- ACCOUNTID VARCHAR(255),
- FEESPAID NUMERIC(38,2),
- FEESDUE NUMERIC(38,2),
- DUEDATE DATETIME,
+ ACCOUNTID VARCHAR(255),
+ FEESPAID NUMERIC(38,2),
+ FEESDUE NUMERIC(38,2),
+ DUEDATE DATETIME,
CONSTRAINT ACC_CT PRIMARY KEY (ACCOUNTID)
)
create table DEPT (
- DEPTID NUMERIC(38),
- DEPTNAME VARCHAR(255),
+ DEPTID NUMERIC(38),
+ DEPTNAME VARCHAR(255),
CONSTRAINT DEPT_CT PRIMARY KEY (DEPTID)
)
create table STUDENT (
- STUDENTID NUMERIC(38),
- STUDENTNAME VARCHAR(255),
- DEPTID NUMERIC(38),
- ADDRESSID NUMERIC(38),
- ACCOUNTID VARCHAR(255),
+ STUDENTID NUMERIC(38),
+ STUDENTNAME VARCHAR(255),
+ DEPTID NUMERIC(38),
+ ADDRESSID NUMERIC(38),
+ ACCOUNTID VARCHAR(255),
CONSTRAINT ST_CT PRIMARY KEY (STUDENTID),
FOREIGN KEY (DEPTID) REFERENCES DEPT (DEPTID),
FOREIGN KEY (ADDRESSID) REFERENCES ADDRESS (ADDRESSID),
@@ -42,16 +42,16 @@
)
create table COURSE (
- COURSEID NUMERIC(38),
- DEPTID NUMERIC(38),
- COURSENAME VARCHAR(255),
- SYLABUS IMAGE,
+ COURSEID NUMERIC(38),
+ DEPTID NUMERIC(38),
+ COURSENAME VARCHAR(255),
+ SYLABUS IMAGE,
CONSTRAINT COURSE_CT PRIMARY KEY (COURSEID),
FOREIGN KEY (DEPTID) REFERENCES DEPT (DEPTID)
)
-
+
create table STUD_COURSE (
- COURSEID NUMERIC(38),
+ COURSEID NUMERIC(38),
STUDENTID NUMERIC(38),
CONSTRAINT STCO_CT PRIMARY KEY (COURSEID, STUDENTID),
FOREIGN KEY (COURSEID) REFERENCES COURSE (COURSEID),
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_mysql.sql
index 8fbe82d..7aa27f9 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_mysql.sql
@@ -7,34 +7,34 @@
CREATE TABLE ADDRESS (
- ADDRESSID DECIMAL(38),
- STREET VARCHAR(255),
- CODE DECIMAL(38),
- CITY VARCHAR(255),
- STATE VARCHAR(255),
+ ADDRESSID DECIMAL(38),
+ STREET VARCHAR(255),
+ CODE DECIMAL(38),
+ CITY VARCHAR(255),
+ STATE VARCHAR(255),
CONSTRAINT ADDR_CT PRIMARY KEY (ADDRESSID)
) ENGINE=INNODB;
CREATE TABLE ACCOUNT (
- ACCOUNTID VARCHAR(255),
- FEESPAID DECIMAL(38,2),
- FEESDUE DECIMAL(38,2),
- DUEDATE DATE,
+ ACCOUNTID VARCHAR(255),
+ FEESPAID DECIMAL(38,2),
+ FEESDUE DECIMAL(38,2),
+ DUEDATE DATE,
CONSTRAINT ACC_CT PRIMARY KEY (ACCOUNTID)
) ENGINE=INNODB;
CREATE TABLE DEPT (
- DEPTID DECIMAL(38),
- DEPTNAME VARCHAR(255),
+ DEPTID DECIMAL(38),
+ DEPTNAME VARCHAR(255),
CONSTRAINT DEPT_CT PRIMARY KEY (DEPTID)
) ENGINE=INNODB;
CREATE TABLE STUDENT (
- STUDENTID DECIMAL(38),
- STUDENTNAME VARCHAR(255),
- DEPTID DECIMAL(38),
- ADDRESSID DECIMAL(38),
- ACCOUNTID VARCHAR(255),
+ STUDENTID DECIMAL(38),
+ STUDENTNAME VARCHAR(255),
+ DEPTID DECIMAL(38),
+ ADDRESSID DECIMAL(38),
+ ACCOUNTID VARCHAR(255),
CONSTRAINT st_CT PRIMARY KEY (STUDENTID),
FOREIGN KEY (DEPTID) REFERENCES DEPT (DEPTID),
FOREIGN KEY (ADDRESSID) REFERENCES ADDRESS (ADDRESSID),
@@ -42,16 +42,16 @@
) ENGINE=INNODB;
CREATE TABLE COURSE (
- COURSEID DECIMAL(38),
- DEPTID DECIMAL(38),
- COURSENAME VARCHAR(255),
- SYLABUS BLOB,
+ COURSEID DECIMAL(38),
+ DEPTID DECIMAL(38),
+ COURSENAME VARCHAR(255),
+ SYLABUS BLOB,
CONSTRAINT COURSE_CT PRIMARY KEY (COURSEID),
FOREIGN KEY (DEPTID) REFERENCES DEPT (DEPTID)
) ENGINE=INNODB;
-
+
CREATE TABLE STUD_COURSE (
- COURSEID DECIMAL(38),
+ COURSEID DECIMAL(38),
STUDENTID DECIMAL(38),
CONSTRAINT STCO_CT PRIMARY KEY (COURSEID, STUDENTID),
FOREIGN KEY (COURSEID) REFERENCES COURSE (COURSEID),
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_ora.sql
index 92c0801..4e31d14 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_ora.sql
@@ -7,34 +7,34 @@
create table address (
- addressId NUMBER(38),
- street VARCHAR2(255),
- code NUMBER(38),
- city VARCHAR2(255),
- state VARCHAR2(255),
+ addressId NUMBER(38),
+ street VARCHAR2(255),
+ code NUMBER(38),
+ city VARCHAR2(255),
+ state VARCHAR2(255),
constraint addr_ct primary key (addressId)
);
create table account (
- accountId VARCHAR2(255),
- feesPaid NUMBER(38,2),
- feesDue NUMBER(38,2),
- dueDate DATE,
+ accountId VARCHAR2(255),
+ feesPaid NUMBER(38,2),
+ feesDue NUMBER(38,2),
+ dueDate DATE,
constraint acc_ct primary key (accountId)
);
create table dept (
- deptId NUMBER(38),
- deptName VARCHAR2(255),
+ deptId NUMBER(38),
+ deptName VARCHAR2(255),
constraint dept_ct primary key (deptId)
);
create table student (
- studentId NUMBER(38),
- studentName VARCHAR2(255),
- deptId NUMBER(38),
- addressId NUMBER(38),
- accountId VARCHAR2(255),
+ studentId NUMBER(38),
+ studentName VARCHAR2(255),
+ deptId NUMBER(38),
+ addressId NUMBER(38),
+ accountId VARCHAR2(255),
constraint st_ct primary key (studentId),
FOREIGN KEY (deptId) REFERENCES dept (deptId),
FOREIGN KEY (addressId) REFERENCES address (addressId),
@@ -42,16 +42,16 @@
);
create table course (
- courseId NUMBER(38),
- deptId NUMBER(38),
- courseName VARCHAR2(255),
- sylabus BLOB,
+ courseId NUMBER(38),
+ deptId NUMBER(38),
+ courseName VARCHAR2(255),
+ sylabus BLOB,
constraint course_ct primary key (courseId),
FOREIGN KEY (deptId) REFERENCES dept (deptId)
);
-
+
create table stud_course (
- courseId NUMBER(38),
+ courseId NUMBER(38),
studentId NUMBER(38),
constraint stco_ct primary key (courseId, studentId),
FOREIGN KEY (courseId) REFERENCES course (courseId),
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_pbs.sql
index 57a0362..5a0a06f 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_pbs.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_pbs.sql
@@ -7,34 +7,34 @@
create table address (
- addressId NUMBER(38),
- street VARCHAR2(255),
- code NUMBER(38),
- city VARCHAR2(255),
- state VARCHAR2(255),
+ addressId NUMBER(38),
+ street VARCHAR2(255),
+ code NUMBER(38),
+ city VARCHAR2(255),
+ state VARCHAR2(255),
constraint addr_ct primary key (addressId)
);
create table account (
- accountId VARCHAR2(255),
- feesPaid NUMBER(38,2),
- feesDue NUMBER(38,2),
- dueDate TIMESTAMP,
+ accountId VARCHAR2(255),
+ feesPaid NUMBER(38,2),
+ feesDue NUMBER(38,2),
+ dueDate TIMESTAMP,
constraint acc_ct primary key (accountId)
);
create table dept (
- deptId NUMBER(38),
- deptName VARCHAR2(255),
+ deptId NUMBER(38),
+ deptName VARCHAR2(255),
constraint dept_ct primary key (deptId)
);
create table student (
- studentId NUMBER(38),
- studentName VARCHAR2(255),
- deptId NUMBER(38),
- addressId NUMBER(38),
- accountId VARCHAR2(255),
+ studentId NUMBER(38),
+ studentName VARCHAR2(255),
+ deptId NUMBER(38),
+ addressId NUMBER(38),
+ accountId VARCHAR2(255),
constraint st_ct primary key (studentId),
FOREIGN KEY (deptId) REFERENCES dept (deptId),
FOREIGN KEY (addressId) REFERENCES address (addressId),
@@ -42,16 +42,16 @@
);
create table course (
- courseId NUMBER(38),
- deptId NUMBER(38),
- courseName VARCHAR2(255),
- sylabus BLOB (10k),
+ courseId NUMBER(38),
+ deptId NUMBER(38),
+ courseName VARCHAR2(255),
+ sylabus BLOB (10k),
constraint course_ct primary key (courseId),
FOREIGN KEY (deptId) REFERENCES dept (deptId)
);
-
+
create table stud_course (
- courseId NUMBER(38),
+ courseId NUMBER(38),
studentId NUMBER(38),
constraint stco_ct primary key (courseId, studentId),
FOREIGN KEY (courseId) REFERENCES course (courseId),
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_psql.sql
index 6342587..be1fe4b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/collegeapp/sql/CollegeApp_psql.sql
@@ -7,34 +7,34 @@
CREATE TABLE ADDRESS (
- ADDRESSID DECIMAL(38),
- STREET VARCHAR(255),
- CODE DECIMAL(38),
- CITY VARCHAR(255),
- STATE VARCHAR(255),
+ ADDRESSID DECIMAL(38),
+ STREET VARCHAR(255),
+ CODE DECIMAL(38),
+ CITY VARCHAR(255),
+ STATE VARCHAR(255),
CONSTRAINT ADDR_CT PRIMARY KEY (ADDRESSID)
);
CREATE TABLE ACCOUNT (
- ACCOUNTID VARCHAR(255),
- FEESPAID DECIMAL(38,2),
- FEESDUE DECIMAL(38,2),
- DUEDATE TIMESTAMP,
+ ACCOUNTID VARCHAR(255),
+ FEESPAID DECIMAL(38,2),
+ FEESDUE DECIMAL(38,2),
+ DUEDATE TIMESTAMP,
CONSTRAINT ACC_CT PRIMARY KEY (ACCOUNTID)
);
CREATE TABLE DEPT (
- DEPTID DECIMAL(38),
- DEPTNAME VARCHAR(255),
+ DEPTID DECIMAL(38),
+ DEPTNAME VARCHAR(255),
CONSTRAINT DEPT_CT PRIMARY KEY (DEPTID)
);
CREATE TABLE STUDENT (
- STUDENTID DECIMAL(38),
- STUDENTNAME VARCHAR(255),
- DEPTID DECIMAL(38),
- ADDRESSID DECIMAL(38),
- ACCOUNTID VARCHAR(255),
+ STUDENTID DECIMAL(38),
+ STUDENTNAME VARCHAR(255),
+ DEPTID DECIMAL(38),
+ ADDRESSID DECIMAL(38),
+ ACCOUNTID VARCHAR(255),
CONSTRAINT st_CT PRIMARY KEY (STUDENTID),
FOREIGN KEY (DEPTID) REFERENCES DEPT (DEPTID),
FOREIGN KEY (ADDRESSID) REFERENCES ADDRESS (ADDRESSID),
@@ -42,16 +42,16 @@
);
CREATE TABLE COURSE (
- COURSEID DECIMAL(38),
- DEPTID DECIMAL(38),
- COURSENAME VARCHAR(255),
- SYLABUS BYTEA,
+ COURSEID DECIMAL(38),
+ DEPTID DECIMAL(38),
+ COURSENAME VARCHAR(255),
+ SYLABUS BYTEA,
CONSTRAINT COURSE_CT PRIMARY KEY (COURSEID),
FOREIGN KEY (DEPTID) REFERENCES DEPT (DEPTID)
);
-
+
CREATE TABLE STUD_COURSE (
- COURSEID DECIMAL(38),
+ COURSEID DECIMAL(38),
STUDENTID DECIMAL(38),
CONSTRAINT STCO_CT PRIMARY KEY (COURSEID, STUDENTID),
FOREIGN KEY (COURSEID) REFERENCES COURSE (COURSEID),
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/build.properties
index c2cdb96..a9120a7 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/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="CopySemantics"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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="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"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/build.xml
index cc761c8..a42879b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/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,14 +46,14 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/A*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/AHome.class,**/A.class,**/*Client*.class" />
</antcall>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/copySemantics_derby.sql"/>
@@ -72,22 +72,22 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_copySemantics_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/client/Client.java
index 39c23aa..4a6ccbf 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/client/Client.java
@@ -33,34 +33,34 @@
* @version
*/
public class Client {
-
+
private static SimpleReporterAdapter stat =
- new SimpleReporterAdapter("appserv-tests");
+ new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
-
+
try {
System.out.println("START");
- stat.addDescription("copySemantics");
+ stat.addDescription("copySemantics");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteA1");
test.AHome ahome = (test.AHome)PortableRemoteObject.narrow(objref, test.AHome.class);
- test.A abean = ahome.create(new Integer(1), "A1", new java.util.Date(600000000000L),
+ test.A abean = ahome.create(new Integer(1), "A1", new java.util.Date(600000000000L),
new byte[]{'A', 'B', 'C'});
abean.test();
- stat.addStatus("ejbclient copySemantics", stat.PASS);
+ stat.addStatus("ejbclient copySemantics", stat.PASS);
System.out.println("FINISH");
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient copySemantics", stat.FAIL);
+ stat.addStatus("ejbclient copySemantics", stat.FAIL);
}
- stat.printSummary("copySemantics");
+ stat.printSummary("copySemantics");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-ejb-jar.xml
index 4346bcc..4941f67 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/descriptor/sun-ejb-jar.xml
@@ -23,14 +23,14 @@
<ejb>
<ejb-name>A1</ejb-name>
<jndi-name>SimpleA1</jndi-name>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <bean-cache>
- <max-cache-size>60</max-cache-size>
- <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
- <victim-selection-policy>FIFO</victim-selection-policy>
- </bean-cache>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <bean-cache>
+ <max-cache-size>60</max-cache-size>
+ <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
+ <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
+ <victim-selection-policy>FIFO</victim-selection-policy>
+ </bean-cache>
</ejb>
<cmp-resource>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/A.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/A.java
index fb87acd..3920725 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/A.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/A.java
@@ -24,8 +24,8 @@
*/
public interface A extends jakarta.ejb.EJBObject {
-
+
public void test() throws java.rmi.RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/ABean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/ABean.java
index d881218..044e640 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/ABean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/ABean.java
@@ -25,65 +25,65 @@
public abstract class ABean 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: ABean 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);
@@ -96,7 +96,7 @@
public abstract byte[] getBlb();
public abstract void setBlb(byte[] b);
- public java.lang.Integer ejbCreate(Integer id, java.lang.String name, java.util.Date date, byte[] b)
+ public java.lang.Integer ejbCreate(Integer id, java.lang.String name, java.util.Date date, byte[] b)
throws jakarta.ejb.CreateException {
setId(id);
@@ -106,14 +106,14 @@
return null;
}
-
- public void ejbPostCreate(Integer id, java.lang.String name, java.util.Date date, byte[] b)
+
+ public void ejbPostCreate(Integer id, java.lang.String name, java.util.Date date, byte[] b)
throws jakarta.ejb.CreateException { }
-
+
public void test() {
java.util.Date d1 = getDate();
System.out.println("Debug: ABean d1: " + d1);
-
+
d1.setYear(2000);
System.out.println("Debug: ABean d1 after setYear: " + d1);
@@ -128,8 +128,8 @@
d1 = getDate();
System.out.println("Debug: ABean d1: " + d1);
- if (d1.equals(d2))
- throw new EJBException("Same d1 and d2 after set!");
+ if (d1.equals(d2))
+ throw new EJBException("Same d1 and d2 after set!");
setDate(null);
if (getDate() != null)
@@ -139,21 +139,21 @@
System.out.println("Debug: ABean b[0]: " + b[0]);
b[0] = 90;
- byte[] b1 = getBlb();
+ byte[] b1 = getBlb();
System.out.println("Debug: ABean b[0]: " + b[0]);
System.out.println("Debug: ABean b1[0]: " + b1[0]);
if (b[0] == b1[0])
- throw new EJBException("Same b and b1!");
-
+ throw new EJBException("Same b and b1!");
+
setBlb(b);
- b1[1] = 90;
+ b1[1] = 90;
System.out.println("Debug: ABean b[0]: " + b[0]);
System.out.println("Debug: ABean b[1]: " + b[1]);
System.out.println("Debug: ABean b1[0]: " + b1[0]);
System.out.println("Debug: ABean b1[1]: " + b1[1]);
- b = getBlb();
+ b = getBlb();
System.out.println("Debug: ABean b[0]: " + b[0]);
System.out.println("Debug: ABean b[1]: " + b[1]);
@@ -161,7 +161,7 @@
System.out.println("Debug: ABean b1[1]: " + b1[1]);
if (b[1] == b1[1])
- throw new EJBException("Same b and b1 after set!");
+ throw new EJBException("Same b and b1 after set!");
setBlb(null);
if (getBlb() != null)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/AHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/AHome.java
index 822b1c0..07c8486 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/AHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/ejb/AHome.java
@@ -24,7 +24,7 @@
*/
public interface AHome extends jakarta.ejb.EJBHome {
-
+
public A create(Integer i, java.lang.String name, java.util.Date d, byte[] b) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_db2.sql
index 0c425a4..45ffa4c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_db2.sql
@@ -1,10 +1,10 @@
drop table COPYTEST;
create table COPYTEST (
- id int primary key NOT NULL,
- name VARCHAR(100),
- mydate TIMESTAMP,
- blb BLOB
+ id int primary key NOT NULL,
+ name VARCHAR(100),
+ mydate TIMESTAMP,
+ blb BLOB
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_derby.sql
index 82fdd0a..3d52d72 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_derby.sql
@@ -1,8 +1,8 @@
drop table COPYTEST;
create table COPYTEST (
- id int primary key NOT NULL,
- name VARCHAR(100),
- mydate TIMESTAMP,
- blb BLOB
+ id int primary key NOT NULL,
+ name VARCHAR(100),
+ mydate TIMESTAMP,
+ blb BLOB
);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_ifx.sql
index 9f9276c..885778c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_ifx.sql
@@ -1,10 +1,10 @@
drop table COPYTEST;
create table COPYTEST (
- id int primary key,
- name VARCHAR(100),
- mydate DATE,
- blb BLOB
+ id int primary key,
+ name VARCHAR(100),
+ mydate DATE,
+ blb BLOB
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_mssql.sql
index c2ced74..fe21efa 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_mssql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_mssql.sql
@@ -2,10 +2,10 @@
go
create table COPYTEST (
- ID INT PRIMARY KEY,
- NAME VARCHAR(100),
- MYDATE DATETIME,
- BLB IMAGE
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(100),
+ MYDATE DATETIME,
+ BLB IMAGE
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_mysql.sql
index 111f25e..2e56de4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_mysql.sql
@@ -1,10 +1,10 @@
DROP TABLE COPYTEST;
CREATE TABLE COPYTEST (
- ID INT PRIMARY KEY,
- NAME VARCHAR(100),
- MYDATE DATE,
- BLB BLOB(255)
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(100),
+ MYDATE DATE,
+ BLB BLOB(255)
) ENGINE=INNODB;
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_ora.sql
index 343d3fd..a059fed 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_ora.sql
@@ -1,10 +1,10 @@
drop table COPYTEST;
create table COPYTEST (
- id int primary key,
- name VARCHAR2(100),
- mydate DATE,
- blb RAW(255)
+ id int primary key,
+ name VARCHAR2(100),
+ mydate DATE,
+ blb RAW(255)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_pbs.sql
index 0a1ef8c..08a2e7f 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_pbs.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_pbs.sql
@@ -1,10 +1,10 @@
drop table COPYTEST;
create table COPYTEST (
- id int primary key,
- name VARCHAR2(100),
- mydate DATE,
- blb BLOB(10k)
+ id int primary key,
+ name VARCHAR2(100),
+ mydate DATE,
+ blb BLOB(10k)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_psql.sql
index 2ac8a86..15543e9 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_psql.sql
@@ -1,10 +1,10 @@
DROP TABLE COPYTEST cascade;
CREATE TABLE COPYTEST (
- ID INT PRIMARY KEY,
- NAME VARCHAR(100),
- MYDATE TIMESTAMP,
- BLB BYTEA
+ ID INT PRIMARY KEY,
+ NAME VARCHAR(100),
+ MYDATE TIMESTAMP,
+ BLB BYTEA
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_syb.sql
index 34f903b..3dd740d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_syb.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/copySemantics/sql/copySemantics_syb.sql
@@ -2,10 +2,10 @@
go
create table COPYTEST (
- ID INT primary key NOT NULL,
- NAME VARCHAR(100),
- MYDATE DATETIME,
- BLB IMAGE
+ ID INT primary key NOT NULL,
+ NAME VARCHAR(100),
+ MYDATE DATETIME,
+ BLB IMAGE
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/build.properties
index bad5b59..c9d7225 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/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="CreateExceptionsTest"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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="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"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/build.xml
index ff50a6f..6de7f1b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/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,14 +46,14 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/A*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/A1Home.class,**/A1.class,**/A1UnPKHome.class,**/A2UnPKHome.class,**/A2Home.class,**/A2.class,**/*Client*.class" />
</antcall>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -69,15 +69,15 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<!--
@@ -85,12 +85,12 @@
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/delete_tables.sql"/>
</antcall>
- </target>
+ </target>
-->
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/client/Client.java
index 189e3ae..4ccb307 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/client/Client.java
@@ -39,12 +39,12 @@
private static create.A1UnPKHome a1unhome;
private static create.A2Home a2home;
private static create.A2UnPKHome a2unhome;
-
+
private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
-
+
try {
System.out.println("START");
stat.addDescription("createExceptionsTest");
@@ -54,13 +54,13 @@
runCreateException11Test();
runBeanStateResetTest();
- stat.addStatus("ejbclient createExceptionsTest", stat.PASS);
+ stat.addStatus("ejbclient createExceptionsTest", stat.PASS);
System.out.println("FINISH");
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient createExceptionsTest", stat.FAIL);
+ stat.addStatus("ejbclient createExceptionsTest", stat.FAIL);
}
stat.printSummary("createExceptionsTest");
}
@@ -73,14 +73,14 @@
a2home = (create.A2Home)PortableRemoteObject.narrow(objref, create.A2Home.class);
objref = initial.lookup("java:comp/env/ejb/CRUN2");
- a2unhome = (create.A2UnPKHome)PortableRemoteObject.narrow(objref,
+ a2unhome = (create.A2UnPKHome)PortableRemoteObject.narrow(objref,
create.A2UnPKHome.class);
objref = initial.lookup("java:comp/env/ejb/CR1");
a1home = (create.A1Home)PortableRemoteObject.narrow(objref, create.A1Home.class);
objref = initial.lookup("java:comp/env/ejb/CRUN1");
- a1unhome = (create.A1UnPKHome)PortableRemoteObject.narrow(objref,
+ a1unhome = (create.A1UnPKHome)PortableRemoteObject.narrow(objref,
create.A1UnPKHome.class);
}
@@ -90,7 +90,7 @@
* If ejbCreate throws CreateException, the transaction is rolled back.
* If ejbPostCreate throws CreateException, the transaction is committed.
*/
- private static void runCreateException20Test() throws java.rmi.RemoteException,
+ private static void runCreateException20Test() throws java.rmi.RemoteException,
jakarta.ejb.FinderException, jakarta.ejb.RemoveException {
// Test CreateException from ejbPostCreate
@@ -104,7 +104,7 @@
create.A2 a2bean = a2home.findByPrimaryKey("A2");
System.out.println("FOUND A2 Bean after failed ejbPostCreate");
- // Test CreateException from ejbCreate
+ // Test CreateException from ejbCreate
try {
a2home.create();
} catch (jakarta.ejb.CreateException e) {
@@ -130,7 +130,7 @@
if (c.size() == 1)
System.out.println("FOUND A2 Bean with Unknown PK after failed ejbPostCreate");
else
- System.out.println("ERROR found " + c.size()
+ System.out.println("ERROR found " + c.size()
+ " A2 Beans with Unknown PK after failed ejbPostCreate");
}
@@ -140,7 +140,7 @@
* If ejbCreate throws CreateException, the transaction is rolled back.
* If ejbPostCreate throws CreateException, the transaction is committed.
*/
- private static void runCreateException11Test() throws java.rmi.RemoteException,
+ private static void runCreateException11Test() throws java.rmi.RemoteException,
jakarta.ejb.FinderException, jakarta.ejb.RemoveException {
// Test CreateException from ejbPostCreate
@@ -156,7 +156,7 @@
// Test CreateException from ejbPostCreate without a container transaction.
try {
- a1home.create("A11", true);
+ a1home.create("A11", true);
} catch (jakarta.ejb.CreateException e) {
System.out.println("Caught expected CreateException: " + e.getMessage());
}
@@ -167,7 +167,7 @@
// We will also test non-transactional remove, as there are no other
// CMP unit test that tests this feature.
- a1bean.remove();
+ a1bean.remove();
// Only 1 A1 bean should be left.
Collection c = a1home.findAll();
@@ -179,7 +179,7 @@
// Test CreateException from ejbCreate without a container transaction.
try {
- a1home.create("A111", false);
+ a1home.create("A111", false);
} catch (jakarta.ejb.CreateException e) {
System.out.println("Caught expected CreateException: " + e.getMessage());
}
@@ -204,7 +204,7 @@
if (c.size() == 1)
System.out.println("FOUND A1 Bean with Unknown PK after failed ejbPostCreate");
else
- System.out.println("ERROR found " + c.size()
+ System.out.println("ERROR found " + c.size()
+ " A1 Beans with Unknown PK after failed ejbPostCreate");
}
@@ -242,5 +242,5 @@
}
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1.java
index 3de1f8c..3d32e99 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1.java
@@ -24,6 +24,6 @@
*/
public interface A1 extends jakarta.ejb.EJBObject {
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1Bean.java
index dfa89a8..26f4709 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1Bean.java
@@ -20,64 +20,64 @@
import javax.naming.*;
/**
- * 1.1 bean.
+ * 1.1 bean.
* @author mvatkina
*/
public class A1Bean 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: A1Bean ejbRemove");
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbLoad()
*/
public void ejbLoad() {
-
+
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbStore()
*/
@@ -94,11 +94,11 @@
this.name = name;
return null;
}
-
- public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
+
+ public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
throw new jakarta.ejb.CreateException("A1Bean.ejbPostCreate");
}
-
+
/** This ejbCreate/ejbPostCreate combination tests CreateException
* thrown from either ejbCreate (if b is false) or ejbPostCreate.
* Executed in a non-transactional context to test both options.
@@ -106,7 +106,7 @@
public java.lang.String ejbCreate(java.lang.String name, boolean b) throws jakarta.ejb.CreateException {
if (b) {
this.name = name;
- } else {
+ } else {
throw new jakarta.ejb.CreateException("A1Bean.ejbCreate");
}
return null;
@@ -122,7 +122,7 @@
* reset prior to call to ejbCreate.
*/
public java.lang.String ejbCreate(int i) throws jakarta.ejb.CreateException {
- if (this.name != null) {
+ if (this.name != null) {
throw new java.lang.IllegalStateException("A1Bean.ejbCreate not reset");
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1Home.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1Home.java
index b68dce9..8ebe2b0 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1Home.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1Home.java
@@ -24,15 +24,15 @@
*/
public interface A1Home extends jakarta.ejb.EJBHome {
-
+
public A1 findByPrimaryKey(java.lang.String pk) throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public java.util.Collection findAll() throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public A1 create(java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
public A1 create(java.lang.String name, boolean b) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
public A1 create(int i) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1UnPKBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1UnPKBean.java
index 2c279c9..16b8da0 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1UnPKBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1UnPKBean.java
@@ -26,58 +26,58 @@
public class A1UnPKBean 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: A1UnPKBean ejbRemove");
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbLoad()
*/
public void ejbLoad() {
-
+
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbStore()
*/
@@ -86,19 +86,19 @@
public java.lang.String name;
- /** This ejbCreate/ejbPostCreate combination tests CreateException
- * thrown from ejbPostCreate.
+ /** This ejbCreate/ejbPostCreate combination tests CreateException
+ * thrown from ejbPostCreate.
*/
public java.lang.Object ejbCreate(java.lang.String name) throws jakarta.ejb.CreateException {
this.name = name;
return null;
}
-
- public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
+
+ public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
throw new jakarta.ejb.CreateException("A1UnPKBean.ejbPostCreate");
}
-
+
/** This ejbCreate/ejbPostCreate combination tests that bean state is
* reset prior to call to ejbCreate.
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1UnPKHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1UnPKHome.java
index 0f88cdc..3dc6259 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1UnPKHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A1UnPKHome.java
@@ -24,11 +24,11 @@
*/
public interface A1UnPKHome extends jakarta.ejb.EJBHome {
-
+
public java.util.Collection findAll() throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public A1 create(java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
public A1 create(int i) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2.java
index 079f0ea..e25a09c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2.java
@@ -24,5 +24,5 @@
*/
public interface A2 extends jakarta.ejb.EJBObject {
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2Bean.java
index 8fd4ba5..95d7197 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2Bean.java
@@ -20,64 +20,64 @@
import javax.naming.*;
/**
- * 2.0 bean.
+ * 2.0 bean.
* @author mvatkina
*/
public abstract class A2Bean 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: A2Bean ejbRemove");
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbLoad()
*/
public void ejbLoad() {
-
+
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbStore()
*/
@@ -87,21 +87,21 @@
public abstract java.lang.String getName() ;
public abstract void setName(java.lang.String s) ;
- /** This ejbCreate/ejbPostCreate combination tests CreateException
- * thrown from ejbPostCreate.
+ /** This ejbCreate/ejbPostCreate combination tests CreateException
+ * thrown from ejbPostCreate.
*/
public java.lang.String ejbCreate(java.lang.String name) throws jakarta.ejb.CreateException {
setName(name);
return null;
}
-
- public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
+
+ public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
throw new jakarta.ejb.CreateException("A2Bean.ejbPostCreate");
}
- /** This ejbCreate/ejbPostCreate combination tests CreateException
- * thrown from ejbCreate.
+ /** This ejbCreate/ejbPostCreate combination tests CreateException
+ * thrown from ejbCreate.
*/
public java.lang.String ejbCreate() throws jakarta.ejb.CreateException {
throw new jakarta.ejb.CreateException("A2Bean.ejbCreate");
@@ -109,7 +109,7 @@
public void ejbPostCreate() throws jakarta.ejb.CreateException {
}
-
+
/** This ejbCreate/ejbPostCreate combination tests that bean state is
* reset prior to call to ejbCreate.
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2Home.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2Home.java
index cfc9e37..9a8f11b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2Home.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2Home.java
@@ -24,15 +24,15 @@
*/
public interface A2Home extends jakarta.ejb.EJBHome {
-
+
public A2 findByPrimaryKey(java.lang.String pk) throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public java.util.Collection findAll() throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public A2 create(java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
public A2 create() throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
public A2 create(int i) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2UnPKBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2UnPKBean.java
index 3ae3ab8..cb4b423 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2UnPKBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2UnPKBean.java
@@ -20,64 +20,64 @@
import javax.naming.*;
/**
- * 2.0 bean with unknown PK.
+ * 2.0 bean with unknown PK.
* @author mvatkina
*/
public abstract class A2UnPKBean 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: A2UnPKBean ejbRemove");
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbLoad()
*/
public void ejbLoad() {
-
+
}
-
-
+
+
/**
* @see jakarta.ejb.EntityBean#ejbStore()
*/
@@ -87,25 +87,25 @@
public abstract java.lang.String getName() ;
public abstract void setName(java.lang.String s) ;
- /** This ejbCreate/ejbPostCreate combination tests CreateException
- * thrown from ejbPostCreate.
+ /** This ejbCreate/ejbPostCreate combination tests CreateException
+ * thrown from ejbPostCreate.
*/
public java.lang.Object ejbCreate(java.lang.String name) throws jakarta.ejb.CreateException {
setName(name);
return null;
}
-
- public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
+
+ public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
throw new jakarta.ejb.CreateException("A2UnPKBean.ejbPostCreate");
}
-
+
/** This ejbCreate/ejbPostCreate combination tests that bean state is
* reset prior to call to ejbCreate.
*/
public java.lang.Object ejbCreate(int i) throws jakarta.ejb.CreateException {
if (getName() != null) {
- throw new java.lang.IllegalStateException("A2UnPKBean.ejbCreate not reset");
+ throw new java.lang.IllegalStateException("A2UnPKBean.ejbCreate not reset");
}
setName("A2UnPKBean_" + i);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2UnPKHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2UnPKHome.java
index e355d91..c35871c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2UnPKHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/createExceptionsTest/ejb/A2UnPKHome.java
@@ -24,11 +24,11 @@
*/
public interface A2UnPKHome extends jakarta.ejb.EJBHome {
-
+
public java.util.Collection findAll() throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public A2 create(java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
public A2 create(int i) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/build.properties
index 953ec76..4bce90b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/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="EjbFlush"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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="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"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/build.xml
index 91b678b..985ec3b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/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,14 +46,14 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/A*.class,**/FlushException.class,**/Test*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/A1LocalHome.class,**/A1Local.class,**/A2LocalHome.class,**/A2Local.class,**/TestHome.class,**/Test.class,**/FlushException.class,**/*Client*.class" />
</antcall>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/ejbflush_derby.sql"/>
@@ -72,22 +72,22 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_ejbflush_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/client/Client.java
index 3f02094..cd66191 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/client/Client.java
@@ -37,15 +37,15 @@
* @author mvatkina
*/
public class Client {
-
+
private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
-
+
try {
System.out.println("START");
- stat.addDescription("ejbflush");
+ stat.addDescription("ejbflush");
Context initial = new InitialContext();
@@ -76,38 +76,38 @@
System.out.println("A2 OK");
}
- // Run CMP1.1 test with flush. This test should throw
+ // Run CMP1.1 test with flush. This test should throw
// a FlushException.
try {
t.testA1WithFlush();
System.out.println("A1 FAILED");
} catch (test.FlushException e) {
System.out.println("A1 OK");
- } catch (Exception e) {
+ } catch (Exception e) {
System.out.println("A1 FAILED " + e.getMessage());
}
- // Run CMP1.1 test with flush. This test should throw
+ // Run CMP1.1 test with flush. This test should throw
// a FlushException.
try {
t.testA2WithFlush();
System.out.println("A2 FAILED");
} catch (test.FlushException e) {
System.out.println("A2 OK");
- } catch (Exception e) {
+ } catch (Exception e) {
System.out.println("A2 FAILED " + e.getMessage());
}
- stat.addStatus("ejbclient ejbflush", stat.PASS);
+ stat.addStatus("ejbclient ejbflush", stat.PASS);
System.out.println("FINISH");
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient ejbflush", stat.PASS);
+ stat.addStatus("ejbclient ejbflush", stat.PASS);
}
- stat.printSummary("ejbflush");
+ stat.printSummary("ejbflush");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1Bean.java
index e37cd7b..1b1848a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1Bean.java
@@ -19,64 +19,64 @@
import jakarta.ejb.*;
/**
- * 1.1 bean.
+ * 1.1 bean.
* @author mvatkina
*/
public class A1Bean implements EntityBean {
-
+
private EntityContext context;
-
-
+
+
/**
* @see EntityBean#setEntityContext(EntityContext)
*/
public void setEntityContext(EntityContext aContext) {
context=aContext;
}
-
-
+
+
/**
* @see EntityBean#ejbActivate()
*/
public void ejbActivate() {
-
+
}
-
-
+
+
/**
* @see EntityBean#ejbPassivate()
*/
public void ejbPassivate() {
-
+
}
-
-
+
+
/**
* @see EntityBean#ejbRemove()
*/
public void ejbRemove() {
}
-
-
+
+
/**
* @see EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
-
+
+
/**
* @see EntityBean#ejbLoad()
*/
public void ejbLoad() {
-
+
}
-
-
+
+
/**
* @see EntityBean#ejbStore()
*/
@@ -92,8 +92,8 @@
name = "ABC";
return null;
}
-
- public void ejbPostCreate(String id) throws CreateException {
+
+ public void ejbPostCreate(String id) throws CreateException {
}
public void setName(String s) {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1Local.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1Local.java
index 24a93aa..bc5ebe5 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1Local.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1Local.java
@@ -24,9 +24,9 @@
public interface A1Local extends jakarta.ejb.EJBLocalObject {
- public void setName(String name);
+ public void setName(String name);
- public void setNameWithFlush(String name);
+ public void setNameWithFlush(String name);
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1LocalHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1LocalHome.java
index dfe5413..412a4e4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1LocalHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A1LocalHome.java
@@ -24,9 +24,9 @@
*/
public interface A1LocalHome extends jakarta.ejb.EJBLocalHome {
-
+
public A1Local findByPrimaryKey(java.lang.String pk) throws jakarta.ejb.FinderException;
-
+
public A1Local create(java.lang.String id) throws jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2Bean.java
index 8064190..106526f 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2Bean.java
@@ -19,64 +19,64 @@
import jakarta.ejb.*;
/**
- * 2.0 bean.
+ * 2.0 bean.
* @author mvatkina
*/
public abstract class A2Bean implements EntityBean {
-
+
private EntityContext context;
-
-
+
+
/**
* @see EntityBean#setEntityContext(EntityContext)
*/
public void setEntityContext(EntityContext aContext) {
context=aContext;
}
-
-
+
+
/**
* @see EntityBean#ejbActivate()
*/
public void ejbActivate() {
-
+
}
-
-
+
+
/**
* @see EntityBean#ejbPassivate()
*/
public void ejbPassivate() {
-
+
}
-
-
+
+
/**
* @see EntityBean#ejbRemove()
*/
public void ejbRemove() {
}
-
-
+
+
/**
* @see EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
-
+
+
/**
* @see EntityBean#ejbLoad()
*/
public void ejbLoad() {
-
+
}
-
-
+
+
/**
* @see EntityBean#ejbStore()
*/
@@ -95,8 +95,8 @@
setName("ABC");
return null;
}
-
- public void ejbPostCreate(String name) throws CreateException {
+
+ public void ejbPostCreate(String name) throws CreateException {
}
public void setNameWithFlush(String s) {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2Local.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2Local.java
index be14b82..49c71cd 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2Local.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2Local.java
@@ -25,8 +25,8 @@
public interface A2Local extends jakarta.ejb.EJBLocalObject {
- public void setName(String name);
-
- public void setNameWithFlush(String name);
-
+ public void setName(String name);
+
+ public void setNameWithFlush(String name);
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2LocalHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2LocalHome.java
index d54b444..591e6cd 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2LocalHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/A2LocalHome.java
@@ -24,9 +24,9 @@
*/
public interface A2LocalHome extends jakarta.ejb.EJBLocalHome {
-
+
public A2Local findByPrimaryKey(java.lang.String pk) throws jakarta.ejb.FinderException;
-
+
public A2Local create(java.lang.String name) throws jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/FlushException.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/FlushException.java
index f3d1c49..2d9b685 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/FlushException.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/FlushException.java
@@ -18,23 +18,23 @@
public class FlushException extends Exception {
- String flushEx;
+ String flushEx;
- public FlushException() {
- super(); // call superclass constructor
- }
+ public FlushException() {
+ super(); // call superclass constructor
+ }
- public FlushException(String flushException) {
- super(flushException);
- flushEx = flushException;
- }
+ public FlushException(String flushException) {
+ super(flushException);
+ flushEx = flushException;
+ }
- public String getError()
- {
- return flushEx;
- }
+ public String getError()
+ {
+ return flushEx;
+ }
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/Test.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/Test.java
index 3e9be5d..e12d815 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/Test.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/Test.java
@@ -20,15 +20,15 @@
import java.rmi.*;
public interface Test extends EJBObject {
-
+
public void testA1() throws CreateException, RemoteException;
-
+
public void testA2() throws CreateException, RemoteException;
-
- public void testA1WithFlush() throws CreateException,
+
+ public void testA1WithFlush() throws CreateException,
FlushException, RemoteException;
-
- public void testA2WithFlush() throws CreateException,
+
+ public void testA2WithFlush() throws CreateException,
FlushException, RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/TestBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/TestBean.java
index 936675e..7b23104 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/TestBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/TestBean.java
@@ -20,12 +20,12 @@
import javax.naming.*;
/**
- * This SessionBean is used to test setting CMP field 'name' to a value
+ * This SessionBean is used to test setting CMP field 'name' to a value
* that is too large for the column size that it is mapped to.
- * The test is expected to be executed with flush after business method
+ * The test is expected to be executed with flush after business method
* set to true for setNameWithFlush() and to false for setName().
* The test is executed for CMP1.1 bean (A1) and CMP2.x bean (A2).
- */
+ */
public class TestBean implements SessionBean {
private A1LocalHome a1Home = null;
@@ -34,21 +34,21 @@
private A2Local a2bean = null;
// SessionBean methods
-
+
public void ejbCreate() throws CreateException {
System.out.println("TestBean ejbCreate");
try {
a1Home = lookupA1();
a2Home = lookupA2();
-
+
} catch (NamingException ex) {
throw new EJBException(ex.getMessage());
}
- }
-
+ }
+
public void ejbActivate() {
System.out.println("TestBean ejbActivate");
- }
+ }
public void ejbPassivate() {
a1Home = null;
@@ -58,7 +58,7 @@
public void ejbRemove() {
}
-
+
public void setSessionContext(SessionContext sc) {
}
@@ -67,35 +67,35 @@
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/A1Flush");
return (A1LocalHome) objref;
- }
+ }
private A2LocalHome lookupA2() throws NamingException {
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/A2Flush");
return (A2LocalHome) objref;
- }
+ }
- /**
+ /**
* Run test for CMP1.1 bean without flush after business
* method. This method will fail at commit and the client
* will get a RuntimeException.
*/
public void testA1() throws CreateException {
a1bean = a1Home.create("A1");
- a1bean.setName("A12345678901234567890");
+ a1bean.setName("A12345678901234567890");
}
- /**
+ /**
* Run test for CMP2.x bean without flush after business
* method. This method will fail at commit and the client
* will get a RuntimeException.
*/
public void testA2() throws CreateException {
a2bean = a2Home.create("A2");
- a2bean.setName("A12345678901234567890");
+ a2bean.setName("A12345678901234567890");
}
- /**
+ /**
* Run test for CMP1.1 bean with flush after business
* method. This method will fail at flush and the client
* will get our FlushException.
@@ -103,7 +103,7 @@
public void testA1WithFlush() throws CreateException, FlushException {
a1bean = a1Home.create("B1");
try {
- a1bean.setNameWithFlush("A12345678901234567890");
+ a1bean.setNameWithFlush("A12345678901234567890");
} catch (EJBException e) {
if (isExpectedException(e))
throw new FlushException(e.toString());
@@ -112,7 +112,7 @@
}
}
- /**
+ /**
* Run test for CMP2.x bean with flush after business
* method. This method will fail at flush and the client
* will get our FlushException.
@@ -120,7 +120,7 @@
public void testA2WithFlush() throws CreateException, FlushException {
a2bean = a2Home.create("B2");
try {
- a2bean.setNameWithFlush("A12345678901234567890");
+ a2bean.setNameWithFlush("A12345678901234567890");
} catch (EJBException e) {
if (isExpectedException(e))
throw new FlushException(e.toString());
@@ -134,7 +134,7 @@
boolean expected = false;
Throwable c = e.getCause();
- if (c != null &&
+ if (c != null &&
(c instanceof com.sun.jdo.api.persistence.support.JDODataStoreException)) {
String msg = c.getMessage();
@@ -143,4 +143,4 @@
return expected;
}
-}
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/TestHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/TestHome.java
index 4995503..7d3e3b6 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/TestHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/ejb/TestHome.java
@@ -20,6 +20,6 @@
import java.rmi.*;
public interface TestHome extends EJBHome {
-
+
Test create() throws RemoteException, CreateException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_ifx.sql
index 4dbe720..f5ea478 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_ifx.sql
@@ -2,13 +2,13 @@
DROP TABLE FLUSHTEST2;
CREATE TABLE FLUSHTEST1 (
- ID VARCHAR(3) NOT NULL PRIMARY KEY ,
- NAME VARCHAR(5)
+ ID VARCHAR(3) NOT NULL PRIMARY KEY ,
+ NAME VARCHAR(5)
);
CREATE TABLE FLUSHTEST2 (
- ID VARCHAR(3) NOT NULL PRIMARY KEY ,
- NAME VARCHAR(5)
+ ID VARCHAR(3) NOT NULL PRIMARY KEY ,
+ NAME VARCHAR(5)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_mysql.sql
index 77009b8..933b53f 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_mysql.sql
@@ -2,13 +2,13 @@
DROP TABLE FLUSHTEST2;
CREATE TABLE FLUSHTEST1 (
- ID VARCHAR(3) PRIMARY KEY NOT NULL,
- NAME VARCHAR(5) NULL
+ ID VARCHAR(3) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(5) NULL
) engine=InnoDB;
CREATE TABLE FLUSHTEST2 (
- ID VARCHAR(3) PRIMARY KEY NOT NULL,
- NAME VARCHAR(5) NULL
+ ID VARCHAR(3) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(5) NULL
) engine=InnoDB;
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_ora.sql
index 54d269a..a4b0dde 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_ora.sql
@@ -2,13 +2,13 @@
DROP TABLE FLUSHTEST2;
CREATE TABLE FLUSHTEST1 (
- ID VARCHAR(3) PRIMARY KEY NOT NULL,
- NAME VARCHAR(5) NULL
+ ID VARCHAR(3) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(5) NULL
);
CREATE TABLE FLUSHTEST2 (
- ID VARCHAR(3) PRIMARY KEY NOT NULL,
- NAME VARCHAR(5) NULL
+ ID VARCHAR(3) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(5) NULL
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_psql.sql
index 70488eb..6bf21f1 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/ejbflush/sql/ejbflush_psql.sql
@@ -2,13 +2,13 @@
DROP TABLE FLUSHTEST2 cascade;
CREATE TABLE FLUSHTEST1 (
- ID VARCHAR(3) PRIMARY KEY NOT NULL,
- NAME VARCHAR(5) NULL
+ ID VARCHAR(3) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(5) NULL
) ;
CREATE TABLE FLUSHTEST2 (
- ID VARCHAR(3) PRIMARY KEY NOT NULL,
- NAME VARCHAR(5) NULL
+ ID VARCHAR(3) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(5) NULL
) ;
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/build.properties
index ce87c1c..85cf669 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/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="FieldTest"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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="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"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/build.xml
index be67b00..f2b42cd 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/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,14 +46,14 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/A*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/A1Home.class,**/A1.class,**/A2Home.class,**/A2.class,**/A1PK.class,**/A2PK.class,**/*Client*.class" />
</antcall>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -69,19 +69,19 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/client/Client.java
index 4031153..f1962a6 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/client/Client.java
@@ -33,12 +33,12 @@
* @version
*/
public class Client {
-
+
private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
-
+
try {
System.out.println("START");
stat.addDescription("fieldtest");
@@ -77,12 +77,12 @@
throw new RuntimeException("Wrong result after UPDATE 2.x");
System.out.println("UPDATED 2.x: " + a2bean.getSqlDate());
- if(a2bean.getSqlDate().getYear() != new java.util.Date().getYear())
+ if(a2bean.getSqlDate().getYear() != new java.util.Date().getYear())
throw new RuntimeException("Wrong result after UPDATE 2.x");
System.out.println("UPDATED 2.x: " + a2bean.getBlb()[0] + " " + a2bean.getBlb()[1]);
if(a2bean.getBlb().length != 2) throw new RuntimeException("Wrong result after UPDATE 2.x");
-
+
System.out.println("UPDATED 2.x: " + a2bean.getList());
if(a2bean.getList().size() != 1 || !a2bean.getList().get(0).equals("A2"))
throw new RuntimeException("Wrong result after UPDATE 2.x");
@@ -119,12 +119,12 @@
throw new RuntimeException("Wrong result after UPDATE 1.x");
System.out.println("UPDATED 1.1: " + a1bean.getSqlDate());
- if(a1bean.getSqlDate().getYear() != new java.util.Date().getYear())
+ if(a1bean.getSqlDate().getYear() != new java.util.Date().getYear())
throw new RuntimeException("Wrong result after UPDATE 1.x");
System.out.println("UPDATED 1.1: " + a1bean.getBlb()[0] + " " + a1bean.getBlb()[1]);
if(a1bean.getBlb().length != 2) throw new RuntimeException("Wrong result after UPDATE 1.x");
-
+
System.out.println("UPDATED 1.1: " + a1bean.getList());
if(a1bean.getList().size() != 1 || !a1bean.getList().get(0).equals("A1"))
throw new RuntimeException("Wrong result after UPDATE 1.x");
@@ -132,16 +132,16 @@
a1bean = a1home.findByPrimaryKey(pk1);
System.out.println("FOUND 1.1: " + a1bean.getName());
- stat.addStatus("ejbclient fieldtest", stat.PASS);
+ stat.addStatus("ejbclient fieldtest", stat.PASS);
System.out.println("FINISH");
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient fieldtest", stat.FAIL);
+ stat.addStatus("ejbclient fieldtest", stat.FAIL);
}
stat.printSummary("fieldtest");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1.java
index 63fffdf..a61bc64 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1.java
@@ -24,18 +24,18 @@
*/
public interface A1 extends jakarta.ejb.EJBObject {
-
+
public String getName() throws java.rmi.RemoteException;
public java.util.Date getMyDate() throws java.rmi.RemoteException;
public java.sql.Date getSqlDate() throws java.rmi.RemoteException;
-
+
public byte[] getBlb() throws java.rmi.RemoteException;
-
+
public java.util.ArrayList getList() throws java.rmi.RemoteException;
-
+
public void update() throws java.rmi.RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1Bean.java
index 679952b..92753ed 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1Bean.java
@@ -20,57 +20,57 @@
import javax.naming.*;
/**
- * 1.1 bean.
+ * 1.1 bean.
* @author mvatkina
*/
public class A1Bean 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: A1Bean ejbRemove");
}
-
+
/**
* @see jakarta.ejb.EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
+
/**
* @see jakarta.ejb.EntityBean#ejbLoad()
*/
public void ejbLoad() {
-
+
}
-
+
/**
* @see jakarta.ejb.EntityBean#ejbStore()
*/
@@ -82,7 +82,7 @@
mydate.setTime(0);
list.add(name);
}
-
+
public java.lang.String getName() {
return name;
}
@@ -122,10 +122,10 @@
return null;
}
-
- public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
+
+ public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
blb = new byte[]{1,2};
list = new java.util.ArrayList();
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1Home.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1Home.java
index 9d3fa23..ae8c14d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1Home.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1Home.java
@@ -24,9 +24,9 @@
*/
public interface A1Home extends jakarta.ejb.EJBHome {
-
+
public A1 findByPrimaryKey(A1PK pk) throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public A1 create(java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1PK.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1PK.java
index abef258..06673e8 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1PK.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A1PK.java
@@ -22,7 +22,7 @@
public java.util.Date iddate;
public A1PK() {}
-
+
public boolean equals(java.lang.Object obj) {
if( obj==null ||
!this.getClass().equals(obj.getClass()) ) return( false );
@@ -30,7 +30,7 @@
if( !this.id1.equals(o.id1) || !this.iddate.equals(o.iddate) ) return( false );
return( true );
}
-
+
public int hashCode() {
int hashCode=0;
hashCode += id1.hashCode() + iddate.hashCode();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2.java
index ed5efe3..51bbd98 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2.java
@@ -24,9 +24,9 @@
*/
public interface A2 extends jakarta.ejb.EJBObject {
-
+
public String getName() throws java.rmi.RemoteException;
-
+
public java.util.Date getMyDate() throws java.rmi.RemoteException;
public java.sql.Date getSqlDate() throws java.rmi.RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2Bean.java
index ee959c8..86314c9 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2Bean.java
@@ -20,57 +20,57 @@
import javax.naming.*;
/**
- * 2.0 bean.
+ * 2.0 bean.
* @author mvatkina
*/
public abstract class A2Bean 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: A2Bean ejbRemove");
}
-
+
/**
* @see jakarta.ejb.EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
+
/**
* @see jakarta.ejb.EntityBean#ejbLoad()
*/
public void ejbLoad() {
-
+
}
-
+
/**
* @see jakarta.ejb.EntityBean#ejbStore()
*/
@@ -119,10 +119,10 @@
return null;
}
-
- public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
+
+ public void ejbPostCreate(java.lang.String name) throws jakarta.ejb.CreateException {
setBlb(new byte[]{1,2});
setList(new java.util.ArrayList());
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2Home.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2Home.java
index 67602af..a06c22e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2Home.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2Home.java
@@ -24,9 +24,9 @@
*/
public interface A2Home extends jakarta.ejb.EJBHome {
-
+
public A2 findByPrimaryKey(A2PK pk) throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public A2 create(java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2PK.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2PK.java
index 3e60a4e..d3fc498 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2PK.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/fieldtest/ejb/A2PK.java
@@ -22,7 +22,7 @@
public java.util.Date iddate;
public A2PK() {}
-
+
public boolean equals(java.lang.Object obj) {
if( obj==null ||
!this.getClass().equals(obj.getClass()) ) return( false );
@@ -30,7 +30,7 @@
if( !this.id1.equals(o.id1) || !this.iddate.equals(o.iddate) ) return( false );
return( true );
}
-
+
public int hashCode() {
int hashCode=0;
hashCode += id1.hashCode() + iddate.hashCode();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/build.properties
index eb56127..3b94f37 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/build.properties
@@ -15,22 +15,22 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="Inheritedpk"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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="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="ejb/test.dbschema"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/build.xml
index 7bcc6d8..842b9ba 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/build.xml
@@ -34,12 +34,12 @@
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
</antcall>
-
+
<echo message="Copying dbschema file to ejb classes dir" />
<copy file="${dbschema}" todir="${build.classes.dir}/pkvalidation" failonerror="false"/>
<antcall target="compile-common">
@@ -49,14 +49,14 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/A**.class,**/B**.class,**/C**.class,**/T**.class,**/test.dbschema" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/AHome.class,**/A.class,**/BHome.class,**/B.class,**/CHome.class,**/C.class,**/APK.class,**/CPK.class,**/TestPKSuper.class,**/TestOidSuper.class,**/*Client*.class" />
</antcall>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/inheritedpk_derby.sql"/>
@@ -75,18 +75,18 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_inheritedpk_derby.sql"/>
</antcall>
- </target>
+ </target>
<!--
@@ -94,12 +94,12 @@
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/delete_tables.sql"/>
</antcall>
- </target>
+ </target>
-->
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/client/Client.java
index c7de062..8f1e406 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/client/Client.java
@@ -33,15 +33,15 @@
* @version
*/
public class Client {
-
+
private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
-
+
try {
System.out.println("START");
- stat.addDescription("inheritedpk");
+ stat.addDescription("inheritedpk");
Context initial = new InitialContext();
@@ -79,15 +79,15 @@
cbean = chome.findByPrimaryKey(cpk);
System.out.println("FOUND C: " + cbean.getName());
- stat.addStatus("ejbclient inheritedpk", stat.PASS);
+ stat.addStatus("ejbclient inheritedpk", stat.PASS);
System.out.println("FINISH");
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient inheritedpk", stat.FAIL);
+ stat.addStatus("ejbclient inheritedpk", stat.FAIL);
}
stat.printSummary("inheritedpk");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/sun-ejb-jar.xml
index 1749051..aa45a96 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/descriptor/sun-ejb-jar.xml
@@ -23,38 +23,38 @@
<ejb>
<ejb-name>PKA</ejb-name>
<jndi-name>PKA</jndi-name>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <bean-cache>
- <max-cache-size>60</max-cache-size>
- <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
- <victim-selection-policy>FIFO</victim-selection-policy>
- </bean-cache>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <bean-cache>
+ <max-cache-size>60</max-cache-size>
+ <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
+ <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
+ <victim-selection-policy>FIFO</victim-selection-policy>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>PKB</ejb-name>
<jndi-name>PKB</jndi-name>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <bean-cache>
- <max-cache-size>60</max-cache-size>
- <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
- <victim-selection-policy>FIFO</victim-selection-policy>
- </bean-cache>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <bean-cache>
+ <max-cache-size>60</max-cache-size>
+ <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
+ <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
+ <victim-selection-policy>FIFO</victim-selection-policy>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>PKC</ejb-name>
<jndi-name>PKC</jndi-name>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <bean-cache>
- <max-cache-size>60</max-cache-size>
- <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
- <victim-selection-policy>FIFO</victim-selection-policy>
- </bean-cache>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <bean-cache>
+ <max-cache-size>60</max-cache-size>
+ <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
+ <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
+ <victim-selection-policy>FIFO</victim-selection-policy>
+ </bean-cache>
</ejb>
<cmp-resource>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/A.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/A.java
index 0ddc8d0..fe2e458 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/A.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/A.java
@@ -24,8 +24,8 @@
*/
public interface A extends jakarta.ejb.EJBObject {
-
+
public String getLastname() throws java.rmi.RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/ABean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/ABean.java
index ff3bd24..c9f637b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/ABean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/ABean.java
@@ -25,65 +25,65 @@
public abstract class ABean 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: ABean 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 long getId();
public abstract void setId(long id);
@@ -101,8 +101,8 @@
return null;
}
-
+
public void ejbPostCreate(long id, java.lang.String name, double s)
throws jakarta.ejb.CreateException { }
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/AHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/AHome.java
index a5961c8..18890a1 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/AHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/AHome.java
@@ -24,9 +24,9 @@
*/
public interface AHome extends jakarta.ejb.EJBHome {
-
+
public A findByPrimaryKey(APK pk) throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public A create(long i, java.lang.String name, double s) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/APK.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/APK.java
index 14253cd..0c28ff7 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/APK.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/APK.java
@@ -21,7 +21,7 @@
// public long id;
public APK() {}
-
+
public boolean equals(java.lang.Object obj) {
if( obj==null ||
!this.getClass().equals(obj.getClass()) ) return( false );
@@ -29,7 +29,7 @@
if( this.id!=o.id ) return( false );
return( true );
}
-
+
public int hashCode() {
int hashCode=0;
hashCode += id;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/B.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/B.java
index ca9ad80..2f0368d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/B.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/B.java
@@ -24,8 +24,8 @@
*/
public interface B extends jakarta.ejb.EJBObject {
-
+
public String getName() throws java.rmi.RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/BBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/BBean.java
index e142bc8..9d4519d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/BBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/BBean.java
@@ -25,65 +25,65 @@
public abstract class BBean 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: BBean 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 java.sql.Date getId();
public abstract void setId(java.sql.Date id);
@@ -97,8 +97,8 @@
return null;
}
-
+
public void ejbPostCreate(java.sql.Date id, java.lang.String name)
throws jakarta.ejb.CreateException { }
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/BHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/BHome.java
index fccd9d8..994e105 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/BHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/BHome.java
@@ -24,9 +24,9 @@
*/
public interface BHome extends jakarta.ejb.EJBHome {
-
+
public B findByPrimaryKey(java.sql.Date pk) throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public B create(java.sql.Date i, java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/C.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/C.java
index ca59c0f..f9529d6 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/C.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/C.java
@@ -24,7 +24,7 @@
*/
public interface C extends jakarta.ejb.EJBObject {
-
+
public String getName() throws java.rmi.RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CBean.java
index 0f8410b..1b3617d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CBean.java
@@ -25,65 +25,65 @@
public abstract class CBean 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: CBean 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 long getId();
public abstract void setId(long id);
@@ -97,8 +97,8 @@
return null;
}
-
+
public void ejbPostCreate(long id, java.lang.String name)
throws jakarta.ejb.CreateException { }
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CHome.java
index abc207e..4d7a590 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CHome.java
@@ -24,9 +24,9 @@
*/
public interface CHome extends jakarta.ejb.EJBHome {
-
+
public C findByPrimaryKey(CPK pk) throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public C create(long i, java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CPK.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CPK.java
index 7f5a8fb..2e3bab8 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CPK.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/CPK.java
@@ -19,5 +19,5 @@
public class CPK extends TestPKSuper implements java.io.Serializable {
public CPK() {}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/TestOidSuper.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/TestOidSuper.java
index af20aa5..7d1c164 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/TestOidSuper.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/TestOidSuper.java
@@ -34,5 +34,5 @@
/** Creates a new instance of TestOidSuper */
public TestOidSuper() {
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/TestPKSuper.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/TestPKSuper.java
index e11de37..482bd74 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/TestPKSuper.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/ejb/TestPKSuper.java
@@ -32,7 +32,7 @@
/** Creates a new instance of TestPKSuper */
public TestPKSuper() {
}
-
+
public boolean equals(java.lang.Object obj) {
if( obj==null ||
!this.getClass().equals(obj.getClass()) ) return( false );
@@ -40,7 +40,7 @@
TestPKSuper o=(TestPKSuper) obj;
return ( this.id == o.id );
}
-
+
public int hashCode() {
int hashCode=0;
hashCode += id;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_db2.sql
index 7554e16..26965f2 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_db2.sql
@@ -17,13 +17,13 @@
CREATE TABLE B
(
id DATE PRIMARY KEY NOT NULL,
- name VARCHAR(32)
+ name VARCHAR(32)
);
CREATE TABLE C
(
id INT PRIMARY KEY NOT NULL,
- name VARCHAR(32)
+ name VARCHAR(32)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_derby.sql
index 2e7e59c..2cfbd00 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_derby.sql
@@ -16,12 +16,12 @@
CREATE TABLE B
(
id DATE PRIMARY KEY NOT NULL,
- name VARCHAR(32)
+ name VARCHAR(32)
);
CREATE TABLE C
(
id INT PRIMARY KEY NOT NULL,
- name VARCHAR(32)
+ name VARCHAR(32)
);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_ifx.sql
index e586edd..7636662 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/inheritedpk/sql/inheritedpk_ifx.sql
@@ -11,19 +11,19 @@
firstName VARCHAR(32) ,
hireDate DATE ,
birthDate DATE ,
- salary FLOAT NOT NULL
+ salary FLOAT NOT NULL
);
CREATE TABLE B
(
id DATE PRIMARY KEY,
- name VARCHAR(32)
+ name VARCHAR(32)
);
CREATE TABLE C
(
id INT PRIMARY KEY,
- name VARCHAR(32)
+ name VARCHAR(32)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/build.properties
index 18192ea..24ff633 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/build.properties
@@ -15,35 +15,35 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="j2eeguide_product"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/application.xml"/>
<property name="ejb.jar" value="j2eeguide_productEjb.jar"/>
<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.xml"/>
<property name="web.xml"
value="descriptor/web.xml"/>
<property name="sun-web.xml"
value="descriptor/sun-web.xml"/>
<property name="j2eeguide_productEjb.xml"
- value="descriptor/j2eeguide_productEjb.xml"/>
+ value="descriptor/j2eeguide_productEjb.xml"/>
<property name="productWebStuff.xml"
- value="descriptor/productWebStuff.xml"/>
+ value="descriptor/productWebStuff.xml"/>
<property name="sun-j2eeguide_productEjb.xml"
- value="descriptor/sun-j2eeguide_productEjb.xml"/>
+ value="descriptor/sun-j2eeguide_productEjb.xml"/>
<property name="sun-productWebStuff.xml"
- value="descriptor/sun-productWebStuff.xml"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
+ value="descriptor/sun-productWebStuff.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
<property name="appclient.jar" value="${assemble.dir}/productClient.jar"/>
<property name="war.file" value="${assemble.dir}/productWebStuff.war"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/build.xml
index 7f75ebd..e30a347 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/build.xml
@@ -35,9 +35,9 @@
<antcall target="clean-common"/>
<delete dir="${basedir}/docroot" />
<delete dir="${basedir}/lib" />
-
+
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -45,11 +45,11 @@
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
- <antcall target="compile-common">
+ <antcall target="compile-common">
<param name="src" value="servlet"/>
- </antcall>
+ </antcall>
- </target>
+ </target>
<!-- ================================================================ -->
<!-- Target to create the ejb application jar file -->
@@ -57,43 +57,43 @@
<target name="package-ejb-jar" >
- <antcall target="package-ejbjar-common">
+ <antcall target="package-ejbjar-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/ProductEJB.class,**/Product.class, **/ProductHome.class,productSchema.dbschema,**/ProductEJB_JDOState.mapping" />
- <param name="ejb-jar.xml" value="${ejb-jar.xml}" />
- <param name="sun-ejb-jar.xml" value="${sun-ejb-jar.xml}" />
- <param name="ejbjar.files" value="${build.classes.dir}" />
+ <param name="ejb-jar.xml" value="${ejb-jar.xml}" />
+ <param name="sun-ejb-jar.xml" value="${sun-ejb-jar.xml}" />
+ <param name="ejbjar.files" value="${build.classes.dir}" />
<param name="ejb.jar" value="${assemble.dir}/j2eeguide_productEjb.jar"/>
- </antcall>
+ </antcall>
</target>
<target name="package-webclient-war" >
- <antcall target="webclient-war-common">
+ <antcall target="webclient-war-common">
<param name="hasWebclient" value="true"/>
<param name="war.classes"
- value="**/Servlet.class" />
+ value="**/Servlet.class" />
<param name="war.file" value="${assemble.dir}/productWebStuff.war"/>
- </antcall>
+ </antcall>
</target>
<target name="package-appclient" >
<mkdir dir="${assemble.dir}"/>
- <antcall target="package-appclientjar-common">
- <param name="appclientjar.classes"
+ <antcall target="package-appclientjar-common">
+ <param name="appclientjar.classes"
value="**/ProductClient.class, **/ProductHome.class,**/Product.class" />
- <param name="application-client.xml"
- value="${application-client.xml}" />
- <param name="sun-application-client.xml"
- value="${sun-application-client.xml}" />
+ <param name="application-client.xml"
+ value="${application-client.xml}" />
+ <param name="sun-application-client.xml"
+ value="${sun-application-client.xml}" />
<param name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
- <param name="appclientjar.files" value="${build.classes.dir}" />
+ <param name="appclientjar.files" value="${build.classes.dir}" />
- </antcall>
+ </antcall>
</target>
<target name="package-ear">
@@ -134,14 +134,14 @@
<copy file="${basedir}/descriptor/index.html" todir="${basedir}/docroot" />
<copy file="${basedir}/ejb/ProductEJB_JDOState.mapping" todir="${build.classes.dir}/j2eeguide/product" />
- <antcall target="package-ejb-jar" />
- <antcall target="package-webclient-war" />
- <antcall target="package-appclient" />
- <antcall target="package-ear" />
+ <antcall target="package-ejb-jar" />
+ <antcall target="package-webclient-war" />
+ <antcall target="package-appclient" />
+ <antcall target="package-ear" />
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/j2eeguide_product_derby.sql"/>
@@ -160,18 +160,18 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_j2eeguide_product_derby.sql"/>
</antcall>
- </target>
+ </target>
@@ -180,12 +180,12 @@
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/delete_tables.sql"/>
</antcall>
- </target>
+ </target>
-->
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/client/ProductClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/client/ProductClient.java
index a9e6679..5b69800 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/client/ProductClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/client/ProductClient.java
@@ -35,10 +35,10 @@
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/MyProduct");
- ProductHome home =
- (ProductHome)PortableRemoteObject.narrow(objref,
+ ProductHome home =
+ (ProductHome)PortableRemoteObject.narrow(objref,
ProductHome.class);
- System.out.println("START");
+ System.out.println("START");
stat.addDescription("j2eeguide_product");
Product duke = home.create("123", "Ceramic Dog", 10.00);
@@ -61,7 +61,7 @@
Product product = (Product)i.next();
String productId = (String)product.getPrimaryKey();
String description = product.getDescription();
- double price = product.getPrice();
+ double price = product.getPrice();
System.out.println(productId + ": " + description + " " + price);
}
@@ -71,7 +71,7 @@
while (i.hasNext()) {
Product product = (Product)i.next();
String productId = (String)product.getPrimaryKey();
- double price = product.getPrice();
+ double price = product.getPrice();
System.out.println(productId + ": " + price);
}
stat.addStatus("ejbclient j2eeguide_product", stat.PASS);
@@ -83,5 +83,5 @@
stat.addStatus("ejbclient j2eeguide_product", stat.FAIL);
}
stat.printSummary("j2eeguide_product");
- }
-}
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-ejb-jar.xml
index a4318bf..4ef42af 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-ejb-jar.xml
@@ -81,8 +81,8 @@
<pm-version>1.0</pm-version>
</pm-inuse>
</pm-descriptors>
- <cmp-resource>
- <jndi-name>jdo/pmf</jndi-name>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
<default-resource-principal>
<name>mv</name>
<password>mv</password>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-j2eeguide_productEjb.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-j2eeguide_productEjb.xml
index d6ed7c6..31505ce 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-j2eeguide_productEjb.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/descriptor/sun-j2eeguide_productEjb.xml
@@ -83,8 +83,8 @@
<pm-version>1.0</pm-version>
</pm-inuse>
</pm-descriptors>
- <cmp-resource>
- <jndi-name>jdo/pmf</jndi-name>
+ <cmp-resource>
+ <jndi-name>jdo/pmf</jndi-name>
<default-resource-principal>
<name>mv</name>
<password>mv</password>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/Product.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/Product.java
index 1a31d0e..5471bd4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/Product.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/Product.java
@@ -20,10 +20,10 @@
import java.rmi.RemoteException;
public interface Product extends EJBObject {
-
+
public void setPrice(double price) throws RemoteException;
- public double getPrice() throws RemoteException;
+ public double getPrice() throws RemoteException;
public String getDescription() throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductEJB.java
index 3958441..7822dd8 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductEJB.java
@@ -42,7 +42,7 @@
return description;
}
- public String ejbCreate(String productId, String description,
+ public String ejbCreate(String productId, String description,
double price) throws CreateException {
if (productId == null) {
@@ -61,7 +61,7 @@
this.context = context;
}
- public void ejbActivate() {
+ public void ejbActivate() {
productId = (String)context.getPrimaryKey();
}
@@ -76,7 +76,7 @@
public void ejbLoad() { }
public void ejbStore() { }
public void unsetEntityContext() { }
- public void ejbPostCreate(String productId, String description,
+ public void ejbPostCreate(String productId, String description,
double balance) { }
-} // ProductEJB
+} // ProductEJB
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductHome.java
index 2310489..f72b7dc 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/ejb/ProductHome.java
@@ -22,12 +22,12 @@
public interface ProductHome extends EJBHome {
- public Product create(String productId, String description,
+ public Product create(String productId, String description,
double balance) throws RemoteException, CreateException;
-
- public Product findByPrimaryKey(String productId)
+
+ public Product findByPrimaryKey(String productId)
throws FinderException, RemoteException;
-
+
public Collection findByDescription(String description)
throws FinderException, RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/servlet/ProductServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/servlet/ProductServlet.java
index c758435..fd5d1d3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/servlet/ProductServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/j2eeguide_product/servlet/ProductServlet.java
@@ -40,15 +40,15 @@
out.println("<body>");
try {
-
- InitialContext ic = new InitialContext();
- System.out.println("looking up java:comp/env/ejb/MyProduct");
+ InitialContext ic = new InitialContext();
+
+ System.out.println("looking up java:comp/env/ejb/MyProduct");
Object objref = ic.lookup("java:comp/env/ejb/MyProduct");
System.out.println("lookup ok");
- ProductHome home =
- (ProductHome)PortableRemoteObject.narrow(objref,
+ ProductHome home =
+ (ProductHome)PortableRemoteObject.narrow(objref,
ProductHome.class);
Product duke = home.create("123", "Ceramic Dog", 10.00);
@@ -71,7 +71,7 @@
Product product = (Product)i.next();
String productId = (String)product.getPrimaryKey();
String description = product.getDescription();
- double price = product.getPrice();
+ double price = product.getPrice();
out.println("<BR>" + productId + ": " + description + " " + price);
}
@@ -81,7 +81,7 @@
while (i.hasNext()) {
Product product = (Product)i.next();
String productId = (String)product.getPrimaryKey();
- double price = product.getPrice();
+ double price = product.getPrice();
out.println("<BR>" + productId + ": " + price);
}
@@ -94,4 +94,4 @@
out.println("</html>");
}
-}
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/build.properties
index 99dc805..ec85d66 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/build.properties
@@ -15,13 +15,13 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="OrderApp"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/application.xml"/>
<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
@@ -32,10 +32,10 @@
<property name="sun-ejb-jar-dataregistry.xml" value="descriptor/sun-ejb-jar-dataregistry.xml"/>
<property name="sun-cmp-mappings.xml" value="descriptor/sun-cmp-mappings.xml"/>
<property name="sun-cmp-mappings-dataregistry.xml" value="descriptor/sun-cmp-mappings-dataregistry.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/v2-tests/appserv-tests/devtests/cmp/orderapp/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/build.xml
index d9a3a6a..ceda0bb 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/build.xml
@@ -39,7 +39,7 @@
<delete file="${sun-cmp-mappings.xml}"/>
<antcall target="clean-common"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -59,11 +59,11 @@
<target name="package-request-jar">
<antcall target="package-ejbjar-common">
- <param name="ejb-jar.xml" value="${ejb-jar-request.xml}"/>
- <param name="sun-ejb-jar.xml" value="${sun-ejb-jar-request.xml}"/>
- <param name="ejbjar.files" value="${build.classes.dir}"/>
+ <param name="ejb-jar.xml" value="${ejb-jar-request.xml}"/>
+ <param name="sun-ejb-jar.xml" value="${sun-ejb-jar-request.xml}"/>
+ <param name="ejbjar.files" value="${build.classes.dir}"/>
<param name="ejbjar.classes" value="**/**/*Request*.class" />
- <param name="ejb.jar" value="${assemble.dir}/ejb-jar-ic.jar"/>
+ <param name="ejb.jar" value="${assemble.dir}/ejb-jar-ic.jar"/>
</antcall>
</target>
@@ -73,7 +73,7 @@
<param name="sun-ejb-jar.xml" value="${sun-ejb-jar-dataregistry.xml}"/>
<param name="sun-cmp-mappings.xml" value="${sun-cmp-mappings-dataregistry.xml}"/>
<param name="ejbjar.files" value="${build.classes.dir}"/>
- <param name="ejbjar.classes" value="**/dataregistry/*.class" />
+ <param name="ejbjar.classes" value="**/dataregistry/*.class" />
<param name="ejb.jar" value="${assemble.dir}/ejb-jar-ic1.jar"/>
</antcall>
</target>
@@ -81,17 +81,17 @@
<target name="package-appclient-jar" >
<mkdir dir="${assemble.dir}"/>
- <antcall target="package-appclientjar-common">
- <param name="appclientjar.classes"
- value="client/Client.class, request/RequestHome.class, request/Request.class, request/PartRequest.class, request/Order.class, request/OrderHome.class, request/*.class" />
- <param name="application-client.xml"
- value="${application-client.xml}" />
- <param name="sun-application-client.xml"
- value="${sun-application-client.xml}" />
- <param name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
- <param name="appclientjar.files" value="${build.classes.dir}" />
+ <antcall target="package-appclientjar-common">
+ <param name="appclientjar.classes"
+ value="client/Client.class, request/RequestHome.class, request/Request.class, request/PartRequest.class, request/Order.class, request/OrderHome.class, request/*.class" />
+ <param name="application-client.xml"
+ value="${application-client.xml}" />
+ <param name="sun-application-client.xml"
+ value="${sun-application-client.xml}" />
+ <param name="appclient.jar" value="${assemble.dir}/${appname}AppClient.jar"/>
+ <param name="appclientjar.files" value="${build.classes.dir}" />
- </antcall>
+ </antcall>
</target>
@@ -101,7 +101,7 @@
<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"/>
- <copy file="${application.xml}" tofile="${build.classes.dir}/META-INF/application.xml" failonerror="false"/>
+ <copy file="${application.xml}" tofile="${build.classes.dir}/META-INF/application.xml" failonerror="false"/>
<ear earfile="${assemble.dir}/${appname}.ear" appxml="${application.xml}">
<fileset dir="${assemble.dir}">
@@ -110,15 +110,15 @@
<fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
<fileset dir="${build.classes.dir}">
- <include name="META-INF/sun-application.xml"/>
- <include name="META-INF/application.xml"/>
+ <include name="META-INF/sun-application.xml"/>
+ <include name="META-INF/application.xml"/>
</fileset>
</ear>
</target>
-
- <target name="deploy"
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/orderapp_derby.sql"/>
@@ -126,7 +126,7 @@
<antcall target="deploy-common" >
<param name="deployed.app" value="${assemble.dir}/${appname}.ear"/>
</antcall>
-
+
</target>
<target name="create-resources" depends="init-common">
@@ -140,12 +140,12 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common">
<param name="deployedapp.name" value="OrderApp"/>
@@ -153,12 +153,12 @@
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_orderapp_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="build1" depends="compile">
- <copy file="${sun-ejb-jar-J2DB.xml}" tofile="${sun-ejb-jar.xml}" failonerror="false"/>
- <delete file="${sun-cmp-mappings.xml}" failonerror="false"/>
+ <copy file="${sun-ejb-jar-J2DB.xml}" tofile="${sun-ejb-jar.xml}" failonerror="false"/>
+ <delete file="${sun-cmp-mappings.xml}" failonerror="false"/>
<antcall target="build-ear-common">
<param name="ejbjar.classes"
value="**/*Blob*.class" />
@@ -171,16 +171,16 @@
<target name="deploy1"
depends="init-common">
<antcall target="deploy-common">
- <param name="extra-params"
+ <param name="extra-params"
value="--uniquetablenames=true --createtables=true"/>
- </antcall>
+ </antcall>
</target>
<target name="run1" depends="init-common">
<antcall target="runclient-common">
- <param name="appclient.application.args"
+ <param name="appclient.application.args"
value="Java2DBTest"/>
- </antcall>
+ </antcall>
</target>
<target name="undeploy1" depends="init-common">
@@ -189,7 +189,7 @@
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/client/Client.java
index ffc408e..e1ef247 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/client/Client.java
@@ -38,7 +38,7 @@
public static void main(String[] args) {
try {
- stat.addDescription("OrderApp");
+ stat.addDescription("OrderApp");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/Request");
@@ -49,12 +49,12 @@
createData(request);
printData(request);
- stat.addStatus("ejbclient OrderApp", stat.PASS);
+ stat.addStatus("ejbclient OrderApp", stat.PASS);
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient OrderApp", stat.FAIL);
+ stat.addStatus("ejbclient OrderApp", stat.FAIL);
}
stat.printSummary("OrderApp");
}
@@ -116,10 +116,10 @@
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient OrderApp", stat.FAIL);
+ stat.addStatus("ejbclient OrderApp", stat.FAIL);
}
}
-
+
private static MessageFormat mf = new MessageFormat(": {0, number, $#,##0.##}");
private static void printData(Request request) {
@@ -133,7 +133,7 @@
+ mf.format(new Object[] {new Double(price)}));
printCostOfOrders(request);
-
+
System.out.println("\nAdding 5% discount");
request.adjustOrderDiscount(5);
printCostOfOrders(request);
@@ -146,7 +146,7 @@
if (price0 == null) {
System.out.println("\nNo parts found");
} else {
- System.out.println("\nAverage price of all parts"
+ System.out.println("\nAverage price of all parts"
+ mf.format(new Object[] {price0}));
}
@@ -156,8 +156,8 @@
System.out.println("\nNo parts found for Vendor "
+ vendorRequest.vendorId);
} else {
- System.out.println("\nTotal price of parts for Vendor "
- + vendorRequest.vendorId + ""
+ System.out.println("\nTotal price of parts for Vendor "
+ + vendorRequest.vendorId + ""
+ mf.format(new Object[] {price0}));
}
@@ -187,19 +187,19 @@
}
}
- private static void printCostOfOrders(Request request)
+ private static void printCostOfOrders(Request request)
throws java.rmi.RemoteException {
Integer orderId = new Integer(1111);
double price = request.getOrderPrice(orderId);
- System.out.println("Cost of Order " + orderId
+ System.out.println("Cost of Order " + orderId
+ mf.format(new Object[] {new Double(price)}));
orderId = new Integer(4312);
price = request.getOrderPrice(orderId);
- System.out.println("Cost of Order " + orderId
+ System.out.println("Cost of Order " + orderId
+ mf.format(new Object[] {new Double(price)}));
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendorPartHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendorPartHome.java
index b3640da..ee6a243 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendorPartHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/dataregistry/LocalVendorPartHome.java
@@ -20,7 +20,7 @@
public interface LocalVendorPartHome extends EJBLocalHome {
-
+
public LocalVendorPart findByPrimaryKey(Object aKey)
throws FinderException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/Request.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/Request.java
index 0ba131c..0ec99d2 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/Request.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/Request.java
@@ -39,13 +39,13 @@
public double getBillOfMaterialPrice(BomRequest bomRequest) throws RemoteException;
public Double getAvgPrice() throws RemoteException;
-
+
public Double getTotalPricePerVendor(VendorRequest vendorRequest) throws RemoteException;
-
+
public double getOrderPrice(Integer orderId) throws RemoteException;
-
+
public void adjustOrderDiscount(int adjustment) throws RemoteException;
-
+
public Collection locateVendorsByPartialName(String name) throws RemoteException;
public String reportVendorsByOrder(Integer orderId) throws RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/RequestBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/RequestBean.java
index aebd6e6..c4095a7 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/RequestBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/ejb/request/RequestBean.java
@@ -29,50 +29,50 @@
public class RequestBean implements SessionBean {
private SessionContext context;
-
+
private LocalLineItemHome lineItemHome = null;
-
+
private LocalOrderHome orderHome = null;
-
+
private LocalPartHome partHome = null;
-
+
private LocalVendorHome vendorHome = null;
-
+
private LocalVendorPartHome vendorPartHome = null;
-
-
+
+
/**
* @see SessionBean#setSessionContext(SessionContext)
*/
public void setSessionContext(SessionContext aContext) {
context=aContext;
}
-
-
+
+
/**
* @see SessionBean#ejbActivate()
*/
public void ejbActivate() {
-
+
}
-
-
+
+
/**
* @see SessionBean#ejbPassivate()
*/
public void ejbPassivate() {
-
+
}
-
-
+
+
/**
* @see SessionBean#ejbRemove()
*/
public void ejbRemove() {
-
+
}
-
-
+
+
/**
* See section 7.10.3 of the EJB 2.0 specification
*/
@@ -87,56 +87,56 @@
throw new EJBException(e.getMessage());
}
}
-
+
public void createPart(PartRequest partRequest) {
try {
- LocalPart part = partHome.create(partRequest.partNumber,
+ LocalPart part = partHome.create(partRequest.partNumber,
partRequest.revision, partRequest.description,
- partRequest.revisionDate, partRequest.specification,
+ partRequest.revisionDate, partRequest.specification,
partRequest.drawing);
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
}
-
+
public void addPartToBillOfMaterial(BomRequest bomRequest) {
try {
PartKey bomkey = new PartKey();
bomkey.partNumber = bomRequest.bomPartNumber;
bomkey.revision = bomRequest.bomRevision;
-
+
LocalPart bom = partHome.findByPrimaryKey(bomkey);
-
+
PartKey pkey = new PartKey();
pkey.partNumber = bomRequest.partNumber;
pkey.revision = bomRequest.revision;
-
+
LocalPart part = partHome.findByPrimaryKey(pkey);
part.setBomPart(bom);
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
}
-
+
public void createVendor(VendorRequest vendorRequest) {
try {
- LocalVendor vendor = vendorHome.create(vendorRequest.vendorId,
- vendorRequest.name, vendorRequest.address,
+ LocalVendor vendor = vendorHome.create(vendorRequest.vendorId,
+ vendorRequest.name, vendorRequest.address,
vendorRequest.contact, vendorRequest.phone);
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
}
-
+
public void createVendorPart(VendorPartRequest vendorPartRequest) {
try {
PartKey pkey = new PartKey();
pkey.partNumber = vendorPartRequest.partNumber;
pkey.revision = vendorPartRequest.revision;
-
+
LocalPart part = partHome.findByPrimaryKey(pkey);
LocalVendorPart vendorPart = vendorPartHome.create(
- vendorPartRequest.description, vendorPartRequest.price,
+ vendorPartRequest.description, vendorPartRequest.price,
part);
VendorKey vkey = new VendorKey();
@@ -152,24 +152,24 @@
public void createOrder(OrderRequest orderRequest) {
try {
- LocalOrder order = orderHome.create(orderRequest.orderId,
- orderRequest.status, orderRequest.discount,
+ LocalOrder order = orderHome.create(orderRequest.orderId,
+ orderRequest.status, orderRequest.discount,
orderRequest.shipmentInfo);
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
}
- public void addLineItem(LineItemRequest lineItemRequest) {
+ public void addLineItem(LineItemRequest lineItemRequest) {
try {
LocalOrder order = orderHome.findByPrimaryKey(lineItemRequest.orderId);
-
+
PartKey pkey = new PartKey();
pkey.partNumber = lineItemRequest.partNumber;
pkey.revision = lineItemRequest.revision;
-
+
LocalPart part = partHome.findByPrimaryKey(pkey);
-
+
LocalLineItem lineItem = lineItemHome.create(order, lineItemRequest.quantity,
part.getVendorPart());
} catch (Exception e) {
@@ -183,7 +183,7 @@
PartKey bomkey = new PartKey();
bomkey.partNumber = bomRequest.bomPartNumber;
bomkey.revision = bomRequest.bomRevision;
-
+
LocalPart bom = partHome.findByPrimaryKey(bomkey);
Collection parts = bom.getParts();
for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
@@ -191,7 +191,7 @@
LocalVendorPart vendorPart = part.getVendorPart();
price += vendorPart.getPrice();
}
-
+
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
@@ -204,7 +204,7 @@
try {
LocalOrder order = orderHome.findByPrimaryKey(orderId);
price = order.calculateAmmount();
-
+
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
@@ -233,7 +233,7 @@
LocalVendor vendor = (LocalVendor)iterator.next();
names.add(vendor.getName());
}
-
+
} catch (FinderException e) {
}
@@ -269,7 +269,7 @@
.append(vendor.getName()).append(' ')
.append(vendor.getContact()).append('\n');
}
-
+
} catch (FinderException e) {
throw new EJBException(e.getMessage());
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_db2.sql
index 685a39c..bd2cc5f 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_db2.sql
@@ -8,73 +8,73 @@
commit;
create table PART (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- DESCRIPTION VARCHAR(255),
- REVISION_DATE TIMESTAMP NOT NULL,
- BOM_PART_NUMBER VARCHAR(15),
- BOM_REVISION NUMERIC(2),
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ DESCRIPTION VARCHAR(255),
+ REVISION_DATE TIMESTAMP NOT NULL,
+ BOM_PART_NUMBER VARCHAR(15),
+ BOM_REVISION NUMERIC(2),
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
alter table PART
- add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
+ add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
REFERENCES PART (PART_NUMBER, REVISION);
commit;
create table PART_DETAIL (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- SPECIFICATION CLOB(10K),
- DRAWING BLOB(10K),
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ SPECIFICATION CLOB(10K),
+ DRAWING BLOB(10K),
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
commit;
create table VENDOR (
- VENDOR_ID INTEGER NOT NULL PRIMARY KEY,
- NAME VARCHAR(30) NOT NULL,
- ADDRESS VARCHAR(255) NOT NULL,
- CONTACT VARCHAR(255) NOT NULL,
- PHONE VARCHAR(30) NOT NULL
+ VENDOR_ID INTEGER NOT NULL PRIMARY KEY,
+ NAME VARCHAR(30) NOT NULL,
+ ADDRESS VARCHAR(255) NOT NULL,
+ CONTACT VARCHAR(255) NOT NULL,
+ PHONE VARCHAR(30) NOT NULL
);
commit;
create table VENDOR_PART (
- VENDOR_PART_NUMBER BIGINT NOT NULL PRIMARY KEY,
- DESCRIPTION VARCHAR(255),
- PRICE DOUBLE PRECISION NOT NULL,
- VENDOR_ID INTEGER NOT NULL,
- PART_NUMBER VARCHAR(15) NOT NULL,
- PART_REVISION NUMERIC(2) NOT NULL,
- CONSTRAINT FK_2 FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
- CONSTRAINT FK_3 FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
- UNIQUE (PART_NUMBER, PART_REVISION)
+ VENDOR_PART_NUMBER BIGINT NOT NULL PRIMARY KEY,
+ DESCRIPTION VARCHAR(255),
+ PRICE DOUBLE PRECISION NOT NULL,
+ VENDOR_ID INTEGER NOT NULL,
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ PART_REVISION NUMERIC(2) NOT NULL,
+ CONSTRAINT FK_2 FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
+ CONSTRAINT FK_3 FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
+ UNIQUE (PART_NUMBER, PART_REVISION)
);
commit;
create table ORDERS (
- ORDER_ID INTEGER NOT NULL PRIMARY KEY,
- STATUS CHAR(1) NOT NULL,
- LAST_UPDATE TIMESTAMP NOT NULL,
- DISCOUNT NUMERIC(2) NOT NULL,
- SHIPMENT_INFO VARCHAR(255)
+ ORDER_ID INTEGER NOT NULL PRIMARY KEY,
+ STATUS CHAR(1) NOT NULL,
+ LAST_UPDATE TIMESTAMP NOT NULL,
+ DISCOUNT NUMERIC(2) NOT NULL,
+ SHIPMENT_INFO VARCHAR(255)
);
commit;
create table LINEITEM (
- ORDER_ID INTEGER NOT NULL,
- ITEM_ID NUMERIC(3) NOT NULL,
- QUANTITY NUMERIC(3) NOT NULL,
- VENDOR_PART_NUMBER BIGINT NOT NULL,
- CONSTRAINT FK_4 FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
- CONSTRAINT FK_5 FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
- PRIMARY KEY (ORDER_ID, ITEM_ID)
+ ORDER_ID INTEGER NOT NULL,
+ ITEM_ID NUMERIC(3) NOT NULL,
+ QUANTITY NUMERIC(3) NOT NULL,
+ VENDOR_PART_NUMBER BIGINT NOT NULL,
+ CONSTRAINT FK_4 FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
+ CONSTRAINT FK_5 FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
+ PRIMARY KEY (ORDER_ID, ITEM_ID)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_derby.sql
index 8cde7e8..59ecdfc 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_derby.sql
@@ -6,62 +6,62 @@
drop table PART;
create table PART (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- DESCRIPTION VARCHAR(255),
- REVISION_DATE TIMESTAMP NOT NULL,
- BOM_PART_NUMBER VARCHAR(15),
- BOM_REVISION NUMERIC(2),
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ DESCRIPTION VARCHAR(255),
+ REVISION_DATE TIMESTAMP NOT NULL,
+ BOM_PART_NUMBER VARCHAR(15),
+ BOM_REVISION NUMERIC(2),
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
alter table PART
- add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
+ add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
REFERENCES PART (PART_NUMBER, REVISION);
create table PART_DETAIL (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- SPECIFICATION CLOB(10K),
- DRAWING BLOB(10K),
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ SPECIFICATION CLOB(10K),
+ DRAWING BLOB(10K),
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
create table VENDOR (
- VENDOR_ID INTEGER NOT NULL PRIMARY KEY,
- NAME VARCHAR(30) NOT NULL,
- ADDRESS VARCHAR(255) NOT NULL,
- CONTACT VARCHAR(255) NOT NULL,
- PHONE VARCHAR(30) NOT NULL
+ VENDOR_ID INTEGER NOT NULL PRIMARY KEY,
+ NAME VARCHAR(30) NOT NULL,
+ ADDRESS VARCHAR(255) NOT NULL,
+ CONTACT VARCHAR(255) NOT NULL,
+ PHONE VARCHAR(30) NOT NULL
);
create table VENDOR_PART (
- VENDOR_PART_NUMBER BIGINT NOT NULL PRIMARY KEY,
- DESCRIPTION VARCHAR(255),
- PRICE DOUBLE PRECISION NOT NULL,
- VENDOR_ID INTEGER NOT NULL,
- PART_NUMBER VARCHAR(15) NOT NULL,
- PART_REVISION NUMERIC(2) NOT NULL,
- CONSTRAINT FK_2 FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
- CONSTRAINT FK_3 FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
- UNIQUE (PART_NUMBER, PART_REVISION)
+ VENDOR_PART_NUMBER BIGINT NOT NULL PRIMARY KEY,
+ DESCRIPTION VARCHAR(255),
+ PRICE DOUBLE PRECISION NOT NULL,
+ VENDOR_ID INTEGER NOT NULL,
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ PART_REVISION NUMERIC(2) NOT NULL,
+ CONSTRAINT FK_2 FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
+ CONSTRAINT FK_3 FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
+ UNIQUE (PART_NUMBER, PART_REVISION)
);
create table ORDERS (
- ORDER_ID INTEGER NOT NULL PRIMARY KEY,
- STATUS CHAR(1) NOT NULL,
- LAST_UPDATE TIMESTAMP NOT NULL,
- DISCOUNT NUMERIC(2) NOT NULL,
- SHIPMENT_INFO VARCHAR(255)
+ ORDER_ID INTEGER NOT NULL PRIMARY KEY,
+ STATUS CHAR(1) NOT NULL,
+ LAST_UPDATE TIMESTAMP NOT NULL,
+ DISCOUNT NUMERIC(2) NOT NULL,
+ SHIPMENT_INFO VARCHAR(255)
);
create table LINEITEM (
- ORDER_ID INTEGER NOT NULL,
- ITEM_ID NUMERIC(3) NOT NULL,
- QUANTITY NUMERIC(3) NOT NULL,
- VENDOR_PART_NUMBER BIGINT NOT NULL,
- CONSTRAINT FK_4 FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
- CONSTRAINT FK_5 FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
- PRIMARY KEY (ORDER_ID, ITEM_ID)
+ ORDER_ID INTEGER NOT NULL,
+ ITEM_ID NUMERIC(3) NOT NULL,
+ QUANTITY NUMERIC(3) NOT NULL,
+ VENDOR_PART_NUMBER BIGINT NOT NULL,
+ CONSTRAINT FK_4 FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
+ CONSTRAINT FK_5 FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
+ PRIMARY KEY (ORDER_ID, ITEM_ID)
);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_ifx.sql
index 8e60c87..c064f39 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_ifx.sql
@@ -6,71 +6,71 @@
drop table PART;
/* Self-ref to identify Bill of Material (BOM)
- * Compound PK
+ * Compound PK
*/
create table PART (
- PART_NUMBER VARCHAR(15) NOT NULL ,
- REVISION NUMERIC(2) NOT NULL ,
- DESCRIPTION VARCHAR(127) ,
- REVISION_DATE DATE NOT NULL ,
- BOM_PART_NUMBER VARCHAR(15) ,
- BOM_REVISION NUMERIC(2) ,
- PRIMARY KEY (PART_NUMBER, REVISION),
- FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION) REFERENCES PART (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL ,
+ REVISION NUMERIC(2) NOT NULL ,
+ DESCRIPTION VARCHAR(127) ,
+ REVISION_DATE DATE NOT NULL ,
+ BOM_PART_NUMBER VARCHAR(15) ,
+ BOM_REVISION NUMERIC(2) ,
+ PRIMARY KEY (PART_NUMBER, REVISION),
+ FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION) REFERENCES PART (PART_NUMBER, REVISION)
);
/* Bean will be mapped to 2 tables (PART and PART_DETAIL)
* BLOB column type
* CLOB column type */
create table PART_DETAIL (
- PART_NUMBER VARCHAR(15) NOT NULL ,
- REVISION NUMERIC(2) NOT NULL ,
- SPECIFICATION CLOB ,
- DRAWING BLOB ,
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL ,
+ REVISION NUMERIC(2) NOT NULL ,
+ SPECIFICATION CLOB ,
+ DRAWING BLOB ,
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
/* PK can be mapped to a primitive PK field type */
create table VENDOR (
- VENDOR_ID INTEGER PRIMARY KEY,
- NAME VARCHAR(30) NOT NULL ,
- ADDRESS VARCHAR(127) NOT NULL ,
- CONTACT VARCHAR(127) NOT NULL ,
- PHONE VARCHAR(30) NOT NULL
+ VENDOR_ID INTEGER PRIMARY KEY,
+ NAME VARCHAR(30) NOT NULL ,
+ ADDRESS VARCHAR(127) NOT NULL ,
+ CONTACT VARCHAR(127) NOT NULL ,
+ PHONE VARCHAR(30) NOT NULL
);
-/* Can be used for unknown PK
+/* Can be used for unknown PK
* 1-1 to PART
* Compound FK
*/
create table VENDOR_PART (
- VENDOR_PART_NUMBER NUMERIC(19) PRIMARY KEY,
- DESCRIPTION VARCHAR(127) ,
- PRICE DOUBLE PRECISION NOT NULL ,
- VENDOR_ID INTEGER NOT NULL ,
- PART_NUMBER VARCHAR(15) NOT NULL ,
- PART_REVISION NUMERIC(2) NOT NULL ,
- FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
- FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
- UNIQUE (PART_NUMBER, PART_REVISION)
+ VENDOR_PART_NUMBER NUMERIC(19) PRIMARY KEY,
+ DESCRIPTION VARCHAR(127) ,
+ PRICE DOUBLE PRECISION NOT NULL ,
+ VENDOR_ID INTEGER NOT NULL ,
+ PART_NUMBER VARCHAR(15) NOT NULL ,
+ PART_REVISION NUMERIC(2) NOT NULL ,
+ FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
+ FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
+ UNIQUE (PART_NUMBER, PART_REVISION)
);
create table ORDERS (
- ORDER_ID INTEGER PRIMARY KEY,
- STATUS CHAR(1) NOT NULL ,
- LAST_UPDATE DATE NOT NULL ,
- DISCOUNT NUMERIC(2) NOT NULL ,
- SHIPMENT_INFO VARCHAR(127)
+ ORDER_ID INTEGER PRIMARY KEY,
+ STATUS CHAR(1) NOT NULL ,
+ LAST_UPDATE DATE NOT NULL ,
+ DISCOUNT NUMERIC(2) NOT NULL ,
+ SHIPMENT_INFO VARCHAR(127)
);
-/* Overlapping PK-FK
+/* Overlapping PK-FK
* Uni-directional to VENDOR_PART */
create table LINEITEM (
- ORDER_ID INTEGER NOT NULL ,
- ITEM_ID NUMERIC(3) NOT NULL ,
- QUANTITY NUMERIC(3) NOT NULL ,
- VENDOR_PART_NUMBER NUMERIC(19) NOT NULL ,
- FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
- FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
- PRIMARY KEY (ORDER_ID, ITEM_ID)
+ ORDER_ID INTEGER NOT NULL ,
+ ITEM_ID NUMERIC(3) NOT NULL ,
+ QUANTITY NUMERIC(3) NOT NULL ,
+ VENDOR_PART_NUMBER NUMERIC(19) NOT NULL ,
+ FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
+ FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
+ PRIMARY KEY (ORDER_ID, ITEM_ID)
);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_mssql.sql
index ca3d7b7..abca0f0 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_mssql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_mssql.sql
@@ -23,7 +23,7 @@
go
alter table PART
- add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
+ add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
REFERENCES PART (PART_NUMBER, REVISION)
go
@@ -43,7 +43,7 @@
/* PK can be mapped to a primitive PK field type */
create table VENDOR (
- VENDOR_ID INTEGER NOT NULL,
+ VENDOR_ID INTEGER NOT NULL,
NAME VARCHAR(30) NOT NULL,
ADDRESS VARCHAR(255) NOT NULL,
CONTACT VARCHAR(255) NOT NULL,
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_mysql.sql
index c03a3f4..73f4307 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_mysql.sql
@@ -7,16 +7,16 @@
DROP TABLE PART;
/* Self-ref to identify Bill of Material (BOM)
- * Compound PK
+ * Compound PK
*/
CREATE TABLE PART (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- DESCRIPTION VARCHAR(255) NULL,
- REVISION_DATE DATE NOT NULL,
- BOM_PART_NUMBER VARCHAR(15) NULL,
- BOM_REVISION NUMERIC(2) NULL,
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ DESCRIPTION VARCHAR(255) NULL,
+ REVISION_DATE DATE NOT NULL,
+ BOM_PART_NUMBER VARCHAR(15) NULL,
+ BOM_REVISION NUMERIC(2) NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
) ENGINE=INNODB;
@@ -24,52 +24,52 @@
* BLOB column type
* CLOB column type */
CREATE TABLE PART_DETAIL (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- SPECIFICATION TEXT NULL,
- DRAWING BLOB NULL,
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ SPECIFICATION TEXT NULL,
+ DRAWING BLOB NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
) ENGINE=INNODB;
/* PK can be mapped to a primitive PK field type */
CREATE TABLE VENDOR (
- VENDOR_ID INTEGER PRIMARY KEY,
- NAME VARCHAR(30) NOT NULL,
- ADDRESS VARCHAR(255) NOT NULL,
- CONTACT VARCHAR(255) NOT NULL,
- PHONE VARCHAR(30) NOT NULL
+ VENDOR_ID INTEGER PRIMARY KEY,
+ NAME VARCHAR(30) NOT NULL,
+ ADDRESS VARCHAR(255) NOT NULL,
+ CONTACT VARCHAR(255) NOT NULL,
+ PHONE VARCHAR(30) NOT NULL
) ENGINE=INNODB;
-/* Can be used for unknown PK
+/* Can be used for unknown PK
* 1-1 to PART
* Compound FK
*/
CREATE TABLE VENDOR_PART (
- VENDOR_PART_NUMBER NUMERIC(19) PRIMARY KEY,
- DESCRIPTION VARCHAR(255) NULL,
- PRICE DOUBLE PRECISION NOT NULL,
- VENDOR_ID INTEGER NOT NULL,
- PART_NUMBER VARCHAR(15) NOT NULL,
- PART_REVISION NUMERIC(2) NOT NULL,
- UNIQUE (PART_NUMBER, PART_REVISION)
+ VENDOR_PART_NUMBER NUMERIC(19) PRIMARY KEY,
+ DESCRIPTION VARCHAR(255) NULL,
+ PRICE DOUBLE PRECISION NOT NULL,
+ VENDOR_ID INTEGER NOT NULL,
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ PART_REVISION NUMERIC(2) NOT NULL,
+ UNIQUE (PART_NUMBER, PART_REVISION)
) ENGINE=INNODB;
CREATE TABLE ORDERS (
- ORDER_ID INTEGER PRIMARY KEY,
- STATUS CHAR(1) NOT NULL,
- LAST_UPDATE DATE NOT NULL,
- DISCOUNT NUMERIC(2) NOT NULL,
- SHIPMENT_INFO VARCHAR(255) NULL
+ ORDER_ID INTEGER PRIMARY KEY,
+ STATUS CHAR(1) NOT NULL,
+ LAST_UPDATE DATE NOT NULL,
+ DISCOUNT NUMERIC(2) NOT NULL,
+ SHIPMENT_INFO VARCHAR(255) NULL
) ENGINE=INNODB;
-/* Overlapping PK-FK
+/* Overlapping PK-FK
* Uni-directional to VENDOR_PART */
CREATE TABLE LINEITEM (
- ORDER_ID INTEGER NOT NULL,
- ITEM_ID NUMERIC(3) NOT NULL,
- QUANTITY NUMERIC(3) NOT NULL,
- VENDOR_PART_NUMBER NUMERIC(19) NOT NULL,
- PRIMARY KEY (ORDER_ID, ITEM_ID)
+ ORDER_ID INTEGER NOT NULL,
+ ITEM_ID NUMERIC(3) NOT NULL,
+ QUANTITY NUMERIC(3) NOT NULL,
+ VENDOR_PART_NUMBER NUMERIC(19) NOT NULL,
+ PRIMARY KEY (ORDER_ID, ITEM_ID)
) ENGINE=INNODB;
quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_ora.sql
index a678e64..2a96d71 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_ora.sql
@@ -6,71 +6,71 @@
drop table PART;
/* Self-ref to identify Bill of Material (BOM)
- * Compound PK
+ * Compound PK
*/
create table PART (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- DESCRIPTION VARCHAR(255) NULL,
- REVISION_DATE DATE NOT NULL,
- BOM_PART_NUMBER VARCHAR(15) NULL,
- BOM_REVISION NUMERIC(2) NULL,
- PRIMARY KEY (PART_NUMBER, REVISION),
- FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION) REFERENCES PART (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ DESCRIPTION VARCHAR(255) NULL,
+ REVISION_DATE DATE NOT NULL,
+ BOM_PART_NUMBER VARCHAR(15) NULL,
+ BOM_REVISION NUMERIC(2) NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION),
+ FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION) REFERENCES PART (PART_NUMBER, REVISION)
);
/* Bean will be mapped to 2 tables (PART and PART_DETAIL)
* BLOB column type
* CLOB column type */
create table PART_DETAIL (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- SPECIFICATION CLOB NULL,
- DRAWING BLOB NULL,
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ SPECIFICATION CLOB NULL,
+ DRAWING BLOB NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
/* PK can be mapped to a primitive PK field type */
create table VENDOR (
- VENDOR_ID INTEGER PRIMARY KEY,
- NAME VARCHAR(30) NOT NULL,
- ADDRESS VARCHAR(255) NOT NULL,
- CONTACT VARCHAR(255) NOT NULL,
- PHONE VARCHAR(30) NOT NULL
+ VENDOR_ID INTEGER PRIMARY KEY,
+ NAME VARCHAR(30) NOT NULL,
+ ADDRESS VARCHAR(255) NOT NULL,
+ CONTACT VARCHAR(255) NOT NULL,
+ PHONE VARCHAR(30) NOT NULL
);
-/* Can be used for unknown PK
+/* Can be used for unknown PK
* 1-1 to PART
* Compound FK
*/
create table VENDOR_PART (
- VENDOR_PART_NUMBER NUMERIC(19) PRIMARY KEY,
- DESCRIPTION VARCHAR(255) NULL,
- PRICE DOUBLE PRECISION NOT NULL,
- VENDOR_ID INTEGER NOT NULL,
- PART_NUMBER VARCHAR(15) NOT NULL,
- PART_REVISION NUMERIC(2) NOT NULL,
- FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
- FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
- UNIQUE (PART_NUMBER, PART_REVISION)
+ VENDOR_PART_NUMBER NUMERIC(19) PRIMARY KEY,
+ DESCRIPTION VARCHAR(255) NULL,
+ PRICE DOUBLE PRECISION NOT NULL,
+ VENDOR_ID INTEGER NOT NULL,
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ PART_REVISION NUMERIC(2) NOT NULL,
+ FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
+ FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
+ UNIQUE (PART_NUMBER, PART_REVISION)
);
create table ORDERS (
- ORDER_ID INTEGER PRIMARY KEY,
- STATUS CHAR(1) NOT NULL,
- LAST_UPDATE DATE NOT NULL,
- DISCOUNT NUMERIC(2) NOT NULL,
- SHIPMENT_INFO VARCHAR(255) NULL
+ ORDER_ID INTEGER PRIMARY KEY,
+ STATUS CHAR(1) NOT NULL,
+ LAST_UPDATE DATE NOT NULL,
+ DISCOUNT NUMERIC(2) NOT NULL,
+ SHIPMENT_INFO VARCHAR(255) NULL
);
-/* Overlapping PK-FK
+/* Overlapping PK-FK
* Uni-directional to VENDOR_PART */
create table LINEITEM (
- ORDER_ID INTEGER NOT NULL,
- ITEM_ID NUMERIC(3) NOT NULL,
- QUANTITY NUMERIC(3) NOT NULL,
- VENDOR_PART_NUMBER NUMERIC(19) NOT NULL,
- FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
- FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
- PRIMARY KEY (ORDER_ID, ITEM_ID)
+ ORDER_ID INTEGER NOT NULL,
+ ITEM_ID NUMERIC(3) NOT NULL,
+ QUANTITY NUMERIC(3) NOT NULL,
+ VENDOR_PART_NUMBER NUMERIC(19) NOT NULL,
+ FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
+ FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
+ PRIMARY KEY (ORDER_ID, ITEM_ID)
);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_pbs.sql
index cf75e8d..9d28d15 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_pbs.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_pbs.sql
@@ -8,20 +8,20 @@
commit;
/* Self-ref to identify Bill of Material (BOM)
- * Compound PK
+ * Compound PK
*/
create table PART (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- DESCRIPTION VARCHAR(255) NULL,
- REVISION_DATE TIMESTAMP NOT NULL,
- BOM_PART_NUMBER VARCHAR(15) NULL,
- BOM_REVISION NUMERIC(2) NULL,
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ DESCRIPTION VARCHAR(255) NULL,
+ REVISION_DATE TIMESTAMP NOT NULL,
+ BOM_PART_NUMBER VARCHAR(15) NULL,
+ BOM_REVISION NUMERIC(2) NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
alter table PART
- add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
+ add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
REFERENCES PART (PART_NUMBER, REVISION);
commit;
@@ -31,65 +31,65 @@
* CLOB column type
*/
create table PART_DETAIL (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- SPECIFICATION CLOB(10K) NULL,
- DRAWING BLOB(10K) NULL,
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ SPECIFICATION CLOB(10K) NULL,
+ DRAWING BLOB(10K) NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
commit;
/* PK can be mapped to a primitive PK field type */
create table VENDOR (
- VENDOR_ID INTEGER PRIMARY KEY,
- NAME VARCHAR(30) NOT NULL,
- ADDRESS VARCHAR(255) NOT NULL,
- CONTACT VARCHAR(255) NOT NULL,
- PHONE VARCHAR(30) NOT NULL
+ VENDOR_ID INTEGER PRIMARY KEY,
+ NAME VARCHAR(30) NOT NULL,
+ ADDRESS VARCHAR(255) NOT NULL,
+ CONTACT VARCHAR(255) NOT NULL,
+ PHONE VARCHAR(30) NOT NULL
);
commit;
-/* Can be used for unknown PK
+/* Can be used for unknown PK
* 1-1 to PART
* Compound FK
*/
create table VENDOR_PART (
- VENDOR_PART_NUMBER BIGINT PRIMARY KEY,
- DESCRIPTION VARCHAR(255) NULL,
- PRICE DOUBLE PRECISION NOT NULL,
- VENDOR_ID INTEGER NOT NULL,
- PART_NUMBER VARCHAR(15) NOT NULL,
- PART_REVISION NUMERIC(2) NOT NULL,
- CONSTRAINT FK_2 FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
- CONSTRAINT FK_3 FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
- UNIQUE (PART_NUMBER, PART_REVISION)
+ VENDOR_PART_NUMBER BIGINT PRIMARY KEY,
+ DESCRIPTION VARCHAR(255) NULL,
+ PRICE DOUBLE PRECISION NOT NULL,
+ VENDOR_ID INTEGER NOT NULL,
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ PART_REVISION NUMERIC(2) NOT NULL,
+ CONSTRAINT FK_2 FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
+ CONSTRAINT FK_3 FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
+ UNIQUE (PART_NUMBER, PART_REVISION)
);
commit;
create table ORDERS (
- ORDER_ID INTEGER PRIMARY KEY,
- STATUS CHAR(1) NOT NULL,
- LAST_UPDATE TIMESTAMP NOT NULL,
- DISCOUNT NUMERIC(2) NOT NULL,
- SHIPMENT_INFO VARCHAR(255) NULL
+ ORDER_ID INTEGER PRIMARY KEY,
+ STATUS CHAR(1) NOT NULL,
+ LAST_UPDATE TIMESTAMP NOT NULL,
+ DISCOUNT NUMERIC(2) NOT NULL,
+ SHIPMENT_INFO VARCHAR(255) NULL
);
commit;
-/* Overlapping PK-FK
+/* Overlapping PK-FK
* Uni-directional to VENDOR_PART
*/
create table LINEITEM (
- ORDER_ID INTEGER NOT NULL,
- ITEM_ID NUMERIC(3) NOT NULL,
- QUANTITY NUMERIC(3) NOT NULL,
- VENDOR_PART_NUMBER BIGINT NOT NULL,
- CONSTRAINT FK_4 FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
- CONSTRAINT FK_5 FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
- PRIMARY KEY (ORDER_ID, ITEM_ID)
+ ORDER_ID INTEGER NOT NULL,
+ ITEM_ID NUMERIC(3) NOT NULL,
+ QUANTITY NUMERIC(3) NOT NULL,
+ VENDOR_PART_NUMBER BIGINT NOT NULL,
+ CONSTRAINT FK_4 FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
+ CONSTRAINT FK_5 FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
+ PRIMARY KEY (ORDER_ID, ITEM_ID)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_psql.sql
index 9d2470b..c10624b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_psql.sql
@@ -7,17 +7,17 @@
DROP TABLE PART cascade;
/* Self-ref to identify Bill of Material (BOM)
- * Compound PK
+ * Compound PK
*/
CREATE TABLE PART (
- PART_NUMBER VARCHAR(15) NOT NULL,
- DESCRIPTION VARCHAR(255) NULL,
- REVISION NUMERIC(2) NOT NULL,
- REVISION_DATE TIMESTAMP NOT NULL,
- BOM_PART_NUMBER VARCHAR(15) NULL,
- BOM_REVISION NUMERIC(2) NULL,
- PRIMARY KEY (PART_NUMBER, REVISION),
- FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION) REFERENCES PART (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ DESCRIPTION VARCHAR(255) NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ REVISION_DATE TIMESTAMP NOT NULL,
+ BOM_PART_NUMBER VARCHAR(15) NULL,
+ BOM_REVISION NUMERIC(2) NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION),
+ FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION) REFERENCES PART (PART_NUMBER, REVISION)
);
@@ -25,56 +25,56 @@
* BYTEA column type
* CLOB column type */
CREATE TABLE PART_DETAIL (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- SPECIFICATION TEXT NULL,
- DRAWING BYTEA NULL,
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ SPECIFICATION TEXT NULL,
+ DRAWING BYTEA NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
/* PK can be mapped to a primitive PK field type */
CREATE TABLE VENDOR (
- VENDOR_ID INTEGER PRIMARY KEY,
- NAME VARCHAR(30) NOT NULL,
- ADDRESS VARCHAR(255) NOT NULL,
- CONTACT VARCHAR(255) NOT NULL,
- PHONE VARCHAR(30) NOT NULL
+ VENDOR_ID INTEGER PRIMARY KEY,
+ NAME VARCHAR(30) NOT NULL,
+ ADDRESS VARCHAR(255) NOT NULL,
+ CONTACT VARCHAR(255) NOT NULL,
+ PHONE VARCHAR(30) NOT NULL
);
-/* Can be used for unknown PK
+/* Can be used for unknown PK
* 1-1 to PART
* Compound FK
*/
CREATE TABLE VENDOR_PART (
- VENDOR_PART_NUMBER NUMERIC(19) PRIMARY KEY,
- DESCRIPTION VARCHAR(255) NULL,
- PRICE DOUBLE PRECISION NOT NULL,
- VENDOR_ID INTEGER NOT NULL,
- PART_NUMBER VARCHAR(15) NOT NULL,
- PART_REVISION NUMERIC(2) NOT NULL,
- FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
- FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
- UNIQUE (PART_NUMBER, PART_REVISION)
+ VENDOR_PART_NUMBER NUMERIC(19) PRIMARY KEY,
+ DESCRIPTION VARCHAR(255) NULL,
+ PRICE DOUBLE PRECISION NOT NULL,
+ VENDOR_ID INTEGER NOT NULL,
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ PART_REVISION NUMERIC(2) NOT NULL,
+ FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
+ FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
+ UNIQUE (PART_NUMBER, PART_REVISION)
);
CREATE TABLE ORDERS (
- ORDER_ID INTEGER PRIMARY KEY,
- STATUS CHAR(1) NOT NULL,
- LAST_UPDATE TIMESTAMP NOT NULL,
- DISCOUNT NUMERIC(2) NOT NULL,
- SHIPMENT_INFO VARCHAR(255) NULL
+ ORDER_ID INTEGER PRIMARY KEY,
+ STATUS CHAR(1) NOT NULL,
+ LAST_UPDATE TIMESTAMP NOT NULL,
+ DISCOUNT NUMERIC(2) NOT NULL,
+ SHIPMENT_INFO VARCHAR(255) NULL
);
-/* Overlapping PK-FK
+/* Overlapping PK-FK
* Uni-directional to VENDOR_PART */
CREATE TABLE LINEITEM (
- ORDER_ID INTEGER NOT NULL,
- ITEM_ID NUMERIC(3) NOT NULL,
- QUANTITY NUMERIC(3) NOT NULL,
- VENDOR_PART_NUMBER NUMERIC(19) NOT NULL,
- FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
- FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
- PRIMARY KEY (ORDER_ID, ITEM_ID)
+ ORDER_ID INTEGER NOT NULL,
+ ITEM_ID NUMERIC(3) NOT NULL,
+ QUANTITY NUMERIC(3) NOT NULL,
+ VENDOR_PART_NUMBER NUMERIC(19) NOT NULL,
+ FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
+ FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
+ PRIMARY KEY (ORDER_ID, ITEM_ID)
);
quit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_syb.sql
index 6c4f60c..7ff3060 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_syb.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/orderapp/sql/orderapp_syb.sql
@@ -23,7 +23,7 @@
go
alter table PART
- add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
+ add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
REFERENCES PART (PART_NUMBER, REVISION)
go
@@ -43,7 +43,7 @@
/* PK can be mapped to a primitive PK field type */
create table VENDOR (
- VENDOR_ID INTEGER NOT NULL,
+ VENDOR_ID INTEGER NOT NULL,
NAME VARCHAR(30) NOT NULL,
ADDRESS VARCHAR(255) NOT NULL,
CONTACT VARCHAR(255) NOT NULL,
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/build.properties
index f0e45eb..29ab553 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/build.properties
@@ -15,30 +15,30 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="PartSupplier"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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="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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.xml"/>
<property name="web.xml"
value="descriptor/web.xml"/>
<property name="sun-web.xml"
value="descriptor/sun-web.xml"/>
<property name="partsupplier.xml"
- value="descriptor/partsupplier.xml"/>
+ value="descriptor/partsupplier.xml"/>
<property name="ps.xml"
- value="descriptor/ps.xml"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
+ value="descriptor/ps.xml"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
<property name="war.file" value="${assemble.dir}/${appname}.war"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/build.xml
index 62c839f..ddbb503 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/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"/>
@@ -42,20 +42,20 @@
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
- <antcall target="compile-common">
+ <antcall target="compile-common">
<param name="src" value="servlet"/>
- </antcall>
+ </antcall>
- </target>
+ </target>
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="war.classes"
- value="**/Servlet.class" />
- <param name="ejbjar.classes"
+ <param name="war.classes"
+ value="**/Servlet.class" />
+ <param name="ejbjar.classes"
value="**/**.class,SP.dbschema" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/LocalPartsHome.class,**/LocalParts.class,**/LocalSuppliersHome.class,**/LocalSuppliers.class,**/SPSessionHome.class,**/SPSession.class,**/SuppliersKey.class,**/*Client*.class" />
</antcall>
@@ -63,16 +63,16 @@
<echo message="Preparing ear file with proper xml files" />
<unjar src="${assemble.dir}/${appname}App.ear" dest="${TEMPDIR}" overwrite="true" />
- <echo message="Copying xml file to the ear" />
- <copy file="${partsupplier.xml}" todir="${TEMPDIR}" failonerror="false"/>
- <copy file="${ps.xml}" todir="${TEMPDIR}" failonerror="false"/>
+ <echo message="Copying xml file to the ear" />
+ <copy file="${partsupplier.xml}" todir="${TEMPDIR}" failonerror="false"/>
+ <copy file="${ps.xml}" todir="${TEMPDIR}" failonerror="false"/>
<jar jarfile="${assemble.dir}/${appname}App.ear">
<fileset dir="${TEMPDIR}" />
</jar>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/partSupplier_derby.sql"/>
@@ -91,22 +91,22 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_partSupplier_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/client/Client.java
index 8875f23..62875e0 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/client/Client.java
@@ -33,12 +33,12 @@
* @version
*/
public class Client {
-
+
private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
-
+
try {
System.out.println("START");
stat.addDescription("partSupplier");
@@ -76,5 +76,5 @@
stat.printSummary("partSupplier");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-ejb-jar.xml
index 0b30de9..d258d3b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/descriptor/sun-ejb-jar.xml
@@ -24,14 +24,14 @@
<ejb>
<ejb-name>Parts</ejb-name>
<jndi-name>SimpleParts</jndi-name>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <bean-cache>
- <max-cache-size>60</max-cache-size>
- <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
- <victim-selection-policy>FIFO</victim-selection-policy>
- </bean-cache>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <bean-cache>
+ <max-cache-size>60</max-cache-size>
+ <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
+ <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
+ <victim-selection-policy>FIFO</victim-selection-policy>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>Suppliers</ejb-name>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalParts.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalParts.java
index 346b6ee..76dbc9c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalParts.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalParts.java
@@ -25,14 +25,14 @@
*/
public interface LocalParts extends jakarta.ejb.EJBLocalObject {
-
+
public void addSupplier(Data.LocalSuppliers supplier);
-
+
public void dropSupplier(Data.LocalSuppliers supplier);
-
+
public java.lang.String getName();
-
+
public void testInCascadeDelete();
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalPartsHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalPartsHome.java
index f434191..0c3537a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalPartsHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalPartsHome.java
@@ -25,14 +25,14 @@
*/
public interface LocalPartsHome extends jakarta.ejb.EJBLocalHome {
-
+
public Data.LocalParts findByPrimaryKey(java.lang.Integer aKey)
throws jakarta.ejb.FinderException;
-
+
public LocalParts create(java.lang.Integer partid, java.lang.String name, java.lang.String color, java.math.BigDecimal weight, java.lang.Double price) throws jakarta.ejb.CreateException;
-
+
public java.util.Collection findAll() throws jakarta.ejb.FinderException;
-
+
public java.util.Collection findByPartsName(java.lang.String name) throws jakarta.ejb.FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalSuppliers.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalSuppliers.java
index 25feb85..1f78602 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalSuppliers.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalSuppliers.java
@@ -25,6 +25,6 @@
*/
public interface LocalSuppliers extends jakarta.ejb.EJBLocalObject {
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalSuppliersHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalSuppliersHome.java
index 9f23669..827a8ac 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalSuppliersHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/LocalSuppliersHome.java
@@ -25,12 +25,12 @@
*/
public interface LocalSuppliersHome extends jakarta.ejb.EJBLocalHome {
-
+
public Data.LocalSuppliers findByPrimaryKey(Data.SuppliersKey aKey)
throws jakarta.ejb.FinderException;
-
+
public LocalSuppliers create(java.lang.Integer partid, java.lang.Integer supplierid, java.lang.String name, int status, java.lang.String city) throws jakarta.ejb.CreateException;
-
+
public java.util.Collection findAll() throws jakarta.ejb.FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/PartsBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/PartsBean.java
index 7ccdbfc..34bc502 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/PartsBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/PartsBean.java
@@ -17,7 +17,7 @@
package Data;
import jakarta.ejb.*;
-import java.util.*;
+import java.util.*;
/**
* Created Dec 16, 2002 1:22:14 PM
@@ -27,84 +27,84 @@
public abstract class PartsBean 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() {
-
+
}
-
-
+
+
/**
* @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 java.lang.Integer getPartid();
public abstract void setPartid(java.lang.Integer partid);
-
+
public abstract java.lang.String getName();
public abstract void setName(java.lang.String name);
-
+
public abstract java.lang.String getColor();
public abstract void setColor(java.lang.String color);
-
+
public abstract java.math.BigDecimal getWeight();
public abstract void setWeight(java.math.BigDecimal weight);
-
+
public abstract java.lang.Double getPrice();
public abstract void setPrice(java.lang.Double price);
-
+
public abstract java.util.Collection getSuppliers();
-
+
public abstract void setSuppliers(java.util.Collection suppliers);
-
+
public java.lang.Integer ejbCreate(java.lang.Integer partid, java.lang.String name, java.lang.String color, java.math.BigDecimal weight, java.lang.Double price) throws jakarta.ejb.CreateException {
if (partid == null) {
throw new jakarta.ejb.CreateException("The partid is required.");
@@ -117,11 +117,11 @@
return null;
}
-
+
public void ejbPostCreate(java.lang.Integer partid, java.lang.String name, java.lang.String color, java.math.BigDecimal weight, java.lang.Double price) throws jakarta.ejb.CreateException {
-
+
}
-
+
public void addSupplier(Data.LocalSuppliers supplier) {
System.out.println("Debug : PartsBean addSupplier");
if (supplier != null)
@@ -134,7 +134,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public void dropSupplier(Data.LocalSuppliers supplier) {
System.out.println("Debug : PartsBean dropSupplier");
try {
@@ -144,9 +144,9 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public void testInCascadeDelete() {
throw new RuntimeException("Called testInCascadeDelete!!!");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSession.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSession.java
index cd907cc..98a1f76 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSession.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSession.java
@@ -25,16 +25,16 @@
*/
public interface SPSession extends jakarta.ejb.EJBObject {
-
+
public int checkAllParts() throws java.rmi.RemoteException;
-
+
public int checkAllSuppliers() throws java.rmi.RemoteException;
-
+
public void createPartsAndSuppliers() throws java.rmi.RemoteException;
-
+
public void removePart(java.lang.Integer partid) throws java.rmi.RemoteException;
-
+
public void removeSupplier(java.lang.Integer partid, java.lang.Integer supplierid) throws java.rmi.RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSessionBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSessionBean.java
index 2a891da..ac85512 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSessionBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSessionBean.java
@@ -17,7 +17,7 @@
package Data;
import jakarta.ejb.*;
-import javax.naming.*;
+import javax.naming.*;
/**
@@ -31,40 +31,40 @@
private jakarta.ejb.SessionContext context;
private LocalSuppliersHome suppliersHome = null;
private LocalPartsHome partsHome = null;
-
-
+
+
/**
* @see jakarta.ejb.SessionBean#setSessionContext(jakarta.ejb.SessionContext)
*/
public void setSessionContext(jakarta.ejb.SessionContext aContext) {
context=aContext;
}
-
-
+
+
/**
* @see jakarta.ejb.SessionBean#ejbActivate()
*/
public void ejbActivate() {
-
+
}
-
-
+
+
/**
* @see jakarta.ejb.SessionBean#ejbPassivate()
*/
public void ejbPassivate() {
-
+
}
-
-
+
+
/**
* @see jakarta.ejb.SessionBean#ejbRemove()
*/
public void ejbRemove() {
-
+
}
-
-
+
+
/**
* See section 7.10.3 of the EJB 2.0 specification
*/
@@ -77,21 +77,21 @@
throw new CreateException(ex.getMessage());
}
}
-
+
private LocalSuppliersHome lookupSuppliers() throws NamingException {
System.out.println("Debug: SPSession lookupSuppliers");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleSuppliers");
return (LocalSuppliersHome) objref;
}
-
+
private LocalPartsHome lookupParts() throws NamingException {
System.out.println("Debug: SPSession lookupParts");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleParts");
return (LocalPartsHome) objref;
}
-
+
public int checkAllParts() {
System.out.println("Debug: SPSessionBean getAllParts");
java.util.Collection parts = null;
@@ -103,7 +103,7 @@
}
return parts.size();
}
-
+
public int checkAllSuppliers() {
System.out.println("Debug: SPSessionBean getAllSuppliers");
java.util.Collection suppliers = null;
@@ -115,7 +115,7 @@
}
return suppliers.size();
}
-
+
public void createPartsAndSuppliers() {
try {
System.out.println("InsertData");
@@ -125,7 +125,7 @@
java.lang.Integer supplierid1= new java.lang.Integer(103);
java.lang.Integer supplierid2= new java.lang.Integer(145);
java.lang.Integer supplierid3= new java.lang.Integer(122);
-
+
partsHome.create(partid1,"partname1","red", new java.math.BigDecimal(45), new java.lang.Double(99));
partsHome.create(partid2,"partname2","blue", new java.math.BigDecimal(37), new java.lang.Double(50));
partsHome.create(partid3,"partname3","green", new java.math.BigDecimal(222), new java.lang.Double(65));
@@ -140,7 +140,7 @@
ex.printStackTrace();
}
}
-
+
public void removePart(java.lang.Integer partid) {
System.out.println("Debug: SPSession removePart");
try {
@@ -152,7 +152,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public void removeSupplier(java.lang.Integer partid, java.lang.Integer supplierid) {
System.out.println("Debug: SPSession removeSupplier");
try {
@@ -167,5 +167,5 @@
throw new EJBException(ex.getMessage());
}
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSessionHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSessionHome.java
index a480d81..b96dfbc 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSessionHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SPSessionHome.java
@@ -25,8 +25,8 @@
*/
public interface SPSessionHome extends jakarta.ejb.EJBHome {
-
+
public Data.SPSession create()
throws jakarta.ejb.CreateException, java.rmi.RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SuppliersBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SuppliersBean.java
index feae3b3..0aa155b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SuppliersBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SuppliersBean.java
@@ -26,35 +26,35 @@
public abstract class SuppliersBean implements jakarta.ejb.EntityBean {
-
+
private jakarta.ejb.EntityContext context;
private LocalParts part0;
-
-
+
+
/**
* @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()
*/
@@ -68,50 +68,50 @@
}
//part0.testInCascadeDelete();
}
-
-
+
+
/**
* @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 java.lang.Integer getPartid();
public abstract void setPartid(java.lang.Integer partid);
-
+
public abstract java.lang.Integer getSupplierid();
public abstract void setSupplierid(java.lang.Integer supplierid);
-
+
public abstract java.lang.String getName();
public abstract void setName(java.lang.String name);
-
+
public abstract int getStatus();
public abstract void setStatus(int status);
-
+
public abstract java.lang.String getCity();
public abstract void setCity(java.lang.String city);
-
+
public abstract Data.LocalParts getParts();
-
+
public abstract void setParts(Data.LocalParts parts);
-
+
public Data.SuppliersKey ejbCreate(java.lang.Integer partid, java.lang.Integer supplierid, java.lang.String name, int status, java.lang.String city) throws jakarta.ejb.CreateException {
if ((supplierid == null) ||(partid == null)){
throw new jakarta.ejb.CreateException("The partid and supplierid are required.");
@@ -120,12 +120,12 @@
setSupplierid(supplierid);
setName(name);
setStatus(status);
- setCity(city);
+ setCity(city);
return null;
}
-
+
public void ejbPostCreate(java.lang.Integer partid, java.lang.Integer supplierid, java.lang.String name, int status, java.lang.String city) throws jakarta.ejb.CreateException {
part0 = getParts();
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SuppliersKey.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SuppliersKey.java
index 7afe0eb..4b47394 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SuppliersKey.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/ejb/SuppliersKey.java
@@ -23,15 +23,15 @@
*/
public final class SuppliersKey implements java.io.Serializable {
-
+
public java.lang.Integer partid;
public java.lang.Integer supplierid;
-
+
/**
* @see java.lang.Object#equals(java.lang.Object)
*/
public boolean equals(java.lang.Object otherOb) {
-
+
if (this == otherOb) {
return true;
}
@@ -40,25 +40,25 @@
}
Data.SuppliersKey other = (Data.SuppliersKey) otherOb;
return (
-
+
(partid==null?other.partid==null:partid.equals(other.partid))
&&
(supplierid==null?other.supplierid==null:supplierid.equals(other.supplierid))
-
+
);
}
-
+
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
return (
-
+
(partid==null?0:partid.hashCode())
^
(supplierid==null?0:supplierid.hashCode())
-
+
);
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/servlet/Servlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/servlet/Servlet.java
index 6d5c7ca..985bf86 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/servlet/Servlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/servlet/Servlet.java
@@ -35,20 +35,20 @@
* @version
*/
public class Servlet extends HttpServlet {
-
+
/** Initializes the servlet.
*/
public void init(ServletConfig config) throws ServletException {
super.init(config);
-
+
}
-
+
/** Destroys the servlet.
*/
public void destroy() {
-
+
}
-
+
/** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
* @param request servlet request
* @param response servlet response
@@ -57,48 +57,48 @@
throws ServletException, java.io.IOException {
response.setContentType("text/html");
java.io.PrintWriter out = response.getWriter();
-
+
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet</title>");
out.println("</head>");
out.println("<body>");
-
+
out.println("</body>");
out.println("</html>");
-
+
try {
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SPSession");
SPSessionHome home =
(SPSessionHome)PortableRemoteObject.narrow(objref,
SPSessionHome.class);
-
+
SPSession myspsession = home.create();
out.println("<pre>");
-
+
myspsession.createPartsAndSuppliers();
out.println("Created " + myspsession.checkAllParts() + " Parts.");
out.println("Created " + myspsession.checkAllSuppliers() + " Suppliers.");
-
+
out.println("Removing Part 200...");
myspsession.removePart(new java.lang.Integer(200));
-
+
out.println("Removing Supplier 145/145...");
myspsession.removeSupplier(new java.lang.Integer(145), new java.lang.Integer(145));
-
+
out.println("Left " + myspsession.checkAllParts() + " Parts.");
out.println("Left " + myspsession.checkAllSuppliers() + " Suppliers.");
-
+
out.println("</pre>");
-
+
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
}
out.close();
}
-
+
/** Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
@@ -107,7 +107,7 @@
throws ServletException, java.io.IOException {
processRequest(request, response);
}
-
+
/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
@@ -116,11 +116,11 @@
throws ServletException, java.io.IOException {
processRequest(request, response);
}
-
+
/** Returns a short description of the servlet.
*/
public String getServletInfo() {
return "Short description";
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_db2.sql
index acf76a6..d76538a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_db2.sql
@@ -12,7 +12,7 @@
create table suppliers (
PARTID INT NOT NULL references parts(PARTID),
SUPPLIERID INT NOT NULL,
- NAME VARCHAR(15),
+ NAME VARCHAR(15),
STATUS INT,
CITY VARCHAR(50),
constraint pk_suppliers primary key (SUPPLIERID, PARTID)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_derby.sql
index 4f15445..031a4fb 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_derby.sql
@@ -12,7 +12,7 @@
create table suppliers (
PARTID INT NOT NULL references parts(PARTID),
SUPPLIERID INT NOT NULL,
- NAME VARCHAR(15),
+ NAME VARCHAR(15),
STATUS INT,
CITY VARCHAR(50),
constraint pk_suppliers primary key (SUPPLIERID, PARTID)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_ifx.sql
index f03dc23..89493c6 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_ifx.sql
@@ -12,7 +12,7 @@
create table SUPPLIERS (
PARTID INT NOT NULL references PARTS(PARTID),
SUPPLIERID INT NOT NULL,
- NAME VARCHAR(15),
+ NAME VARCHAR(15),
STATUS INT,
CITY VARCHAR(50),
primary key(SUPPLIERID, PARTID)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_mssql.sql
index 24cf9c7..35b698c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_mssql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_mssql.sql
@@ -13,7 +13,7 @@
create table suppliers (
PARTID INT not null references parts(PARTID),
SUPPLIERID INT,
- NAME VARCHAR(15),
+ NAME VARCHAR(15),
STATUS INT,
CITY VARCHAR(50),
constraint pk_suppliers primary key(SUPPLIERID, PARTID)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_mysql.sql
index 0b3a938..c648cf6 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_mysql.sql
@@ -12,7 +12,7 @@
CREATE TABLE SUPPLIERS (
PARTID INT NOT NULL REFERENCES PARTS(PARTID),
SUPPLIERID INT,
- NAME VARCHAR(15),
+ NAME VARCHAR(15),
STATUS INT,
CITY VARCHAR(50),
CONSTRAINT PK_SUPPLIERS primary key(SUPPLIERID, PARTID)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_ora.sql
index 121f772..baf7423 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_ora.sql
@@ -12,7 +12,7 @@
create table suppliers (
PARTID INT not null references parts(PARTID),
SUPPLIERID INT,
- NAME VARCHAR2(15),
+ NAME VARCHAR2(15),
STATUS INT,
CITY VARCHAR2(50),
constraint pk_suppliers primary key(SUPPLIERID, PARTID)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_pbs.sql
index 19cd2e0..8811b0f 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_pbs.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_pbs.sql
@@ -5,7 +5,7 @@
PARTID NUMERIC(12),
NAME VARCHAR(15),
COLOR VARCHAR(20),
- WEIGHT NUMERIC(4),
+ WEIGHT NUMERIC(4),
PRICE FLOAT(23),
PRIMARY KEY(PARTID)
);
@@ -13,7 +13,7 @@
create table suppliers (
PARTID NUMERIC(12) not null references parts(PARTID),
SUPPLIERID NUMERIC(12),
- NAME VARCHAR(15),
+ NAME VARCHAR(15),
STATUS NUMERIC(2),
CITY VARCHAR(50),
constraint pk_suppliers primary key(SUPPLIERID, PARTID)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_psql.sql
index f14b97f..27d86c4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_psql.sql
@@ -12,7 +12,7 @@
CREATE TABLE SUPPLIERS (
PARTID INT NOT NULL REFERENCES PARTS(PARTID),
SUPPLIERID INT,
- NAME VARCHAR(15),
+ NAME VARCHAR(15),
STATUS INT,
CITY VARCHAR(50),
CONSTRAINT PK_SUPPLIERS primary key(SUPPLIERID, PARTID)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_syb.sql
index 9fa7291..acaf383 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_syb.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/partSupplier/sql/partSupplier_syb.sql
@@ -13,7 +13,7 @@
create table SUPPLIERS (
PARTID INT NOT NULL references PARTS(PARTID),
SUPPLIERID INT NOT NULL,
- NAME VARCHAR(15),
+ NAME VARCHAR(15),
STATUS INT,
CITY VARCHAR(50),
constraint PK_SUPPLIERS primary key(SUPPLIERID, PARTID)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/report.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/report.xml
index b228941..c2ef9bd 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/report.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/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/v2-tests/appserv-tests/devtests/cmp/robeans/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/build.properties
index 1e7428f..762fe53 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/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="Robeans"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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="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"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/build.xml
index 83a3fd7..2f0e1c3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/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,14 +46,14 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/A*.class,**/Test*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/A1Home.class,**/A1.class,**/A2Home.class,**/A2.class,**/TestHome.class,**/Test.class,**/*Client*.class" />
</antcall>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -69,19 +69,19 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/client/Client.java
index 7863f99..bc19026 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/client/Client.java
@@ -35,15 +35,15 @@
/**
* This class is used to test Read-Only CMP beans by accessing
* field 'shortName' before and after jdbc update of the same table.
- * It also tests that a non-DFG field 'description' is loaded
- * correctly for Read-Only beans when bean is accessed after both
+ * It also tests that a non-DFG field 'description' is loaded
+ * correctly for Read-Only beans when bean is accessed after both
* findByPrimaryKey and custom finders.
* The test is executed for CMP1.1 bean (A1RO) and CMP2.x bean (A2RO).
*
* @author mvatkina
*/
public class Client {
-
+
private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
@@ -53,10 +53,10 @@
private static Test tbean = null;
public static void main(String[] args) {
-
+
try {
System.out.println("START");
- stat.addDescription("robeans");
+ stat.addDescription("robeans");
lookupBeans();
tbean = thome.create();
@@ -64,18 +64,18 @@
testA1();
testA2();
- stat.addStatus("ejbclient robeans", stat.PASS);
+ stat.addStatus("ejbclient robeans", stat.PASS);
System.out.println("FINISH");
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient robeans", stat.FAIL);
+ stat.addStatus("ejbclient robeans", stat.FAIL);
}
- stat.printSummary("robeans");
+ stat.printSummary("robeans");
}
- /** Run CMP1.1 test.
+ /** Run CMP1.1 test.
* getShortName() must return the same value.
* getDescription() must return non-null value.
*/
@@ -92,15 +92,15 @@
// Find another bean.
Collection c = a1home.findByShortName("A1RO1");
if (c.size() != 1) {
- System.out.println("ERROR: 1.1 findByShortName returned wrong number of records: "
+ System.out.println("ERROR: 1.1 findByShortName returned wrong number of records: "
+ c.size());
}
a1bean = (A1)c.iterator().next();
verifyDescription(a1bean.getDescription(), "A1RO", false);
}
-
- /** Run CMP2.x test.
+
+ /** Run CMP2.x test.
* getShortName() must return the same value.
* getDescription() must return non-null value.
*/
@@ -117,14 +117,14 @@
// Find another bean.
Collection c = a2home.findByShortName("A2RO1");
if (c.size() != 1) {
- System.out.println("ERROR: 2.x findByShortName returned wrong number of records: "
+ System.out.println("ERROR: 2.x findByShortName returned wrong number of records: "
+ c.size());
}
a2bean = (A2)c.iterator().next();
verifyDescription(a2bean.getDescription(), "A2RO", false);
}
-
+
private static void lookupBeans() throws NamingException {
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/A1RO");
@@ -157,15 +157,15 @@
* @param isFindByPK true if verification is done after findByPrimaryKey
* call.
*/
- private static void verifyDescription(String description, String beanName,
+ private static void verifyDescription(String description, String beanName,
boolean isFindByPK) {
if (description != null) {
- System.out.println(beanName + " non-DFG field OK"
- + ((isFindByPK)? "" : " after custom finder") + ": "
+ System.out.println(beanName + " non-DFG field OK"
+ + ((isFindByPK)? "" : " after custom finder") + ": "
+ description);
} else {
- System.out.println(beanName + " FAILED: non-DFG field is NULL"
+ System.out.println(beanName + " FAILED: non-DFG field is NULL"
+ ((isFindByPK)? "" : " after custom finder"));
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1.java
index 4d863be..6389aca 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1.java
@@ -25,9 +25,9 @@
public interface A1 extends jakarta.ejb.EJBObject {
- public String getShortName() throws RemoteException;
+ public String getShortName() throws RemoteException;
- public String getDescription() throws RemoteException;
+ public String getDescription() throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1Bean.java
index ee18fa2..b1af8b3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1Bean.java
@@ -25,55 +25,55 @@
public class A1Bean implements EntityBean {
-
+
public String id;
public String shortName;
public String description;
private EntityContext context;
-
+
/**
* @see EntityBean#setEntityContext(EntityContext)
*/
public void setEntityContext(EntityContext aContext) {
context=aContext;
}
-
+
/**
* @see EntityBean#ejbActivate()
*/
public void ejbActivate() {
-
+
}
-
+
/**
* @see EntityBean#ejbPassivate()
*/
public void ejbPassivate() {
-
+
}
-
+
/**
* @see EntityBean#ejbRemove()
*/
public void ejbRemove() {
}
-
+
/**
* @see EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
+
/**
* @see EntityBean#ejbLoad()
*/
public void ejbLoad() {
-
+
}
-
+
/**
* @see EntityBean#ejbStore()
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1Home.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1Home.java
index fec3c00..a774138 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1Home.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A1Home.java
@@ -25,10 +25,10 @@
public interface A1Home extends jakarta.ejb.EJBHome {
- public A1 findByPrimaryKey(java.lang.String pk)
+ public A1 findByPrimaryKey(java.lang.String pk)
throws FinderException, RemoteException;
-
- public java.util.Collection findByShortName(java.lang.String shortName)
+
+ public java.util.Collection findByShortName(java.lang.String shortName)
throws FinderException, RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2.java
index ecd6558..969da09 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2.java
@@ -26,7 +26,7 @@
public interface A2 extends jakarta.ejb.EJBObject {
public String getShortName() throws RemoteException;
-
+
public String getDescription() throws RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2Bean.java
index 058a98e..443d92b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2Bean.java
@@ -25,9 +25,9 @@
public abstract class A2Bean implements EntityBean {
-
+
private EntityContext context;
-
+
public abstract String getId();
public abstract void setId(String s);
@@ -43,42 +43,42 @@
public void setEntityContext(EntityContext aContext) {
context=aContext;
}
-
+
/**
* @see EntityBean#ejbActivate()
*/
public void ejbActivate() {
-
+
}
-
+
/**
* @see EntityBean#ejbPassivate()
*/
public void ejbPassivate() {
-
+
}
-
+
/**
* @see EntityBean#ejbRemove()
*/
public void ejbRemove() {
}
-
+
/**
* @see EntityBean#unsetEntityContext()
*/
public void unsetEntityContext() {
context=null;
}
-
+
/**
* @see EntityBean#ejbLoad()
*/
public void ejbLoad() {
-
+
}
-
+
/**
* @see EntityBean#ejbStore()
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2Home.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2Home.java
index 7d08314..8aa7a6e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2Home.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/A2Home.java
@@ -25,10 +25,10 @@
public interface A2Home extends jakarta.ejb.EJBHome {
- public A2 findByPrimaryKey(java.lang.String pk)
+ public A2 findByPrimaryKey(java.lang.String pk)
throws FinderException, RemoteException;
-
- public java.util.Collection findByShortName(java.lang.String shortName)
+
+ public java.util.Collection findByShortName(java.lang.String shortName)
throws FinderException, RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/Test.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/Test.java
index 6f58d3a..f1cd79c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/Test.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/Test.java
@@ -20,11 +20,11 @@
import java.rmi.*;
public interface Test extends EJBObject {
-
+
/** Insert values via jdbc call */
public void insertValues(String table_name) throws RemoteException;
-
+
/** Update values via jdbc call */
public void updateValues(String table_name) throws RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/TestBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/TestBean.java
index dde264c..a82b109 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/TestBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/TestBean.java
@@ -29,26 +29,26 @@
* initial data into the table and updating column 'NAME' when requested.
* This allows to use java2db for the actual beans.
* This bean does not access CMP beans.
- */
+ */
public class TestBean implements SessionBean {
private DataSource ds = null;
// SessionBean methods
-
+
public void ejbCreate() throws CreateException {
System.out.println("TestBean ejbCreate");
try {
ds = lookupDataSource();
-
+
} catch (NamingException ex) {
throw new EJBException(ex.getMessage());
}
- }
-
+ }
+
public void ejbActivate() {
System.out.println("TestBean ejbActivate");
- }
+ }
public void ejbPassivate() {
ds = null;
@@ -57,7 +57,7 @@
public void ejbRemove() {
}
-
+
public void setSessionContext(SessionContext sc) {
}
@@ -77,19 +77,19 @@
System.out.println("DATASOURCE NAME: " + cfname);
objref = initial.lookup(cfname);
- }
+ }
return (DataSource) objref;
- }
+ }
/** Insert values via jdbc call */
public void insertValues (String table_name) {
- String st = "INSERT INTO " + table_name + " VALUES ('" +
+ String st = "INSERT INTO " + table_name + " VALUES ('" +
table_name + "', '" + table_name + "', '" + table_name + "')";
System.out.println("INSERT STATEMENT: " + st);
executeStatement(st);
// Insert another row
- st = "INSERT INTO " + table_name + " VALUES ('" +
+ st = "INSERT INTO " + table_name + " VALUES ('" +
table_name + "1', '" + table_name + "1', '" + table_name + "1')";
System.out.println("INSERT STATEMENT: " + st);
executeStatement(st);
@@ -124,4 +124,4 @@
}
}
-}
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/TestHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/TestHome.java
index 4995503..7d3e3b6 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/TestHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/robeans/ejb/TestHome.java
@@ -20,6 +20,6 @@
import java.rmi.*;
public interface TestHome extends EJBHome {
-
+
Test create() throws RemoteException, CreateException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/build.properties
index 21fa096..1cf6f51 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/build.properties
@@ -15,13 +15,13 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="roster2Teams"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
-<property name="test.client"
- value="RosterClient"/>
+<property name="test.client"\u0020
+ value="RosterClient"/>
<property name="application.xml" value="descriptor/application.xml"/>
<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
@@ -35,10 +35,10 @@
<property name="ejb-jar-roster.xml" value="descriptor/ejb-jar-roster.xml"/>
<property name="sun-ejb-jar-roster.xml" value="descriptor/sun-ejb-jar-roster.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="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}"/>
@@ -48,7 +48,7 @@
<property name="hasWebclient" value="true"/>
<property name="web.xml"
- value="descriptor/web.xml"/>
+ value="descriptor/web.xml"/>
<property name="sun-web.xml"
- value="descriptor/sun-web.xml"/>
+ value="descriptor/sun-web.xml"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/build.xml
index fef8e99..3b3f3f1 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/build.xml
@@ -38,7 +38,7 @@
<delete file="${sun-cmp-mappings.xml}"/>
<antcall target="clean-common"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -46,54 +46,54 @@
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
- <antcall target="compile-common">
+ <antcall target="compile-common">
<param name="src" value="servlet"/>
</antcall>
</target>
<target name="package-team-jar" >
- <antcall target="package-ejbjar-common">
-
- <param name="ejbjar.classes"
+ <antcall target="package-ejbjar-common">
+
+ <param name="ejbjar.classes"
value="team/Local*.class, team/League*.class, team/Player*.class, team/Team*.class, util/*.class" />
<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="ejb.jar" value="${assemble.dir}/team-ejb.jar" />
-
+
</antcall>
</target>
<target name="package-team2-jar" >
- <antcall target="package-ejbjar-common">
+ <antcall target="package-ejbjar-common">
- <param name="ejbjar.classes"
- value="team/Local*.class, team/League*.class, team/Player*.class, team/Team*.class, util/*.class" />
+ <param name="ejbjar.classes"
+ value="team/Local*.class, team/League*.class, team/Player*.class, team/Team*.class, util/*.class" />
- <param name="ejb-jar.xml" value="${ejb-jar-team2.xml}" />
- <param name="sun-ejb-jar.xml" value="${sun-ejb-jar-team2.xml}" />
- <param name="ejbjar.files" value="${build.classes.dir}" />
- <param name="ejb.jar" value="${assemble.dir}/team2-ejb.jar" />
+ <param name="ejb-jar.xml" value="${ejb-jar-team2.xml}" />
+ <param name="sun-ejb-jar.xml" value="${sun-ejb-jar-team2.xml}" />
+ <param name="ejbjar.files" value="${build.classes.dir}" />
+ <param name="ejb.jar" value="${assemble.dir}/team2-ejb.jar" />
- </antcall>
+ </antcall>
</target>
-
+
<target name="package-roster-jar" >
- <antcall target="package-ejbjar-common">
-
- <param name="ejbjar.classes"
+ <antcall target="package-ejbjar-common">
+
+ <param name="ejbjar.classes"
value="team/Local*.class, team/League.class, team/LeagueHome.class, team/Player.class, team/PlayerHome.class, team/Team.class, team/TeamHome.class,,util/*.class,roster/*.class" />
<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="ejb.jar" value="${assemble.dir}/roster-ejb.jar" />
-
+
</antcall>
</target>
@@ -101,17 +101,17 @@
<antcall target="webclient-war-common">
<param name="hasWebclient" value="true"/>
- <param name="war.classes"
+ <param name="war.classes"
value="**/RosterServlet.class" />
- </antcall>
-
+ </antcall>
+
</target>
<target name="package-appclient" >
<mkdir dir="${assemble.dir}"/>
<antcall target="package-appclientjar-common">
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/RosterClient.class, **/Roster.class, **/RosterHome.class, util/*.class" />
<param name="application-client.xml"
value="${application-client.xml}" />
@@ -132,23 +132,23 @@
<property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
- <mkdir dir="${TEMPDIR}/src" />
+ <mkdir dir="${TEMPDIR}/src" />
<copy todir="${TEMPDIR}/src" >
<fileset dir="${basedir}/ejb" />
</copy>
- <mkdir dir="${TEMPDIR}/src/client" />
+ <mkdir dir="${TEMPDIR}/src/client" />
<copy todir="${TEMPDIR}/src/client" file="${basedir}/client/RosterClient.java" />
<copy todir="${TEMPDIR}/src/client" file="${basedir}/servlet/RosterServlet.java" />
- <copy file="${basedir}/descriptor/INDEX.LIST" todir="${TEMPDIR}/META-INF" failonerror="false"/>
+ <copy file="${basedir}/descriptor/INDEX.LIST" todir="${TEMPDIR}/META-INF" failonerror="false"/>
<ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}">
- <fileset dir="${assemble.dir}">
- <include name="*.jar"/>
- <include name="*.war"/>
- </fileset>
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ <include name="*.war"/>
+ </fileset>
- <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
</ear>
</target>
@@ -165,16 +165,16 @@
<antcall target="package-ear" />
- </target>
+ </target>
-
- <target name="deploy"
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common">
- <param name="extra-params"
- value="--uniquetablenames=true --dropandcreatetables=true"/>
- </antcall>
+ <param name="extra-params"
+ value="--uniquetablenames=true --dropandcreatetables=true"/>
+ </antcall>
</target>
<target name="create-resources" depends="init-common">
@@ -188,19 +188,19 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/client/RosterClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/client/RosterClient.java
index 166bdf2..948ff3d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/client/RosterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/client/RosterClient.java
@@ -43,32 +43,32 @@
public static void main(String[] args) {
try {
- System.out.println("START");
+ System.out.println("START");
stat.addDescription("rosterJava2DB");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleRosterExt");
- RosterHome home =
- (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
RosterHome.class);
Roster myRoster = home.create();
-
+
insertInfo(myRoster);
getSomeInfo(myRoster);
getMoreInfo(myRoster);
- stat.addStatus("ejbclient rosterJava2DB ", stat.PASS);
+ stat.addStatus("ejbclient rosterJava2DB ", stat.PASS);
stat.printSummary("rosterJava2DB");
System.exit(0);
} catch (Exception ex) {
System.err.println("Caught an exception:");
- ex.printStackTrace();
- stat.addStatus("ejbclient rosterJava2DB ", stat.FAIL);
+ ex.printStackTrace();
+ stat.addStatus("ejbclient rosterJava2DB ", stat.FAIL);
stat.printSummary("rosterJava2DB");
}
stat.printSummary("rosterJava2DB");
@@ -137,16 +137,16 @@
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");
playerList = myRoster.getPlayersByLeagueId("L1");
playerList = myRoster.getPlayersByHigherSalary("Ian Carlyle");
-
+
printDetailsList(playerList);
-
+
playerList = myRoster.getPlayersBySalaryRange(500.00, 800.00);
playerList = myRoster.getPlayersOfTeamCopy("T5");
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-team.xml
index 848b1ac..751099e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-team.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-team.xml
@@ -224,7 +224,7 @@
<method-name>findNotOnTeam</method-name>
<method-params/>
</query-method>
- <ejb-ql>select object(p) from Player p
+ <ejb-ql>select object(p) from Player p
where p.teams is empty</ejb-ql>
</query>
<query>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-team2.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-team2.xml
index e48ecd4..4ef1697 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-team2.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/descriptor/ejb-jar-team2.xml
@@ -224,7 +224,7 @@
<method-name>findNotOnTeam</method-name>
<method-params/>
</query-method>
- <ejb-ql>select object(p) from Player p
+ <ejb-ql>select object(p) from Player p
where p.teams is empty</ejb-ql>
</query>
<query>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/Roster.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/Roster.java
index 692a185..279aab7 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/Roster.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/Roster.java
@@ -27,55 +27,55 @@
import java.util.Set;
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)
@@ -83,84 +83,84 @@
public ArrayList getSportsOfPlayer(String playerId)
throws RemoteException;
-
+
public double getSalaryOfPlayerFromTeam(String teamID, String playerName)
throws RemoteException;
public ArrayList getPlayersOfLeague(String leagueId)
- throws RemoteException;
-
+ throws RemoteException;
+
public ArrayList getPlayersWithPositionsGoalkeeperOrDefender()
- throws RemoteException;
+ throws RemoteException;
- public ArrayList getPlayersWithNameEndingWithON()
+ public ArrayList getPlayersWithNameEndingWithON()
throws RemoteException;
public ArrayList getPlayersWithNullName()
- throws RemoteException;
+ throws RemoteException;
public ArrayList getPlayersWithTeam(String teamId)
throws RemoteException;
-
- public ArrayList getPlayersWithSalaryUsingABS(double salary)
- throws RemoteException;
- public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ public ArrayList getPlayersWithSalaryUsingABS(double salary)
throws RemoteException;
-
-
+
+ public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ throws RemoteException;
+
+
// 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;
public ArrayList getTeamsByPlayerAndLeague(String playerKey,
String leagueKey)
- throws RemoteException;
-
+ throws RemoteException;
+
public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
String leagueKey)
- throws RemoteException;
+ throws RemoteException;
-
+
public Set getCitiesOfLeague(String leagueKey) throws RemoteException;
public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
+ throws RemoteException;
public String getTeamsNameOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
+ throws RemoteException;
public String getTeamNameVariations(String teamId) throws RemoteException;
public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
-
-
+ 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;
public LeagueDetails getLeagueByName(String name)
throws RemoteException;
-
+
// Test
public ArrayList getRemoteTeamsOfLeague(String leagueKey) throws RemoteException;
@@ -169,7 +169,7 @@
public ArrayList testFinder(String parm1, String parm2, String parm3)
throws RemoteException;
-
+
public void cleanUp() throws FinderException, RemoveException, RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/RosterBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/RosterBean.java
index 386979b..36b95b3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/RosterBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/RosterBean.java
@@ -52,19 +52,19 @@
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);
@@ -75,7 +75,7 @@
}
}
- public void removePlayer(String playerId) {
+ public void removePlayer(String playerId) {
Debug.print("RosterBean removePlayer");
try {
@@ -85,7 +85,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public void dropPlayer(String playerId, String teamId) {
Debug.print("RosterBean dropPlayer");
@@ -113,7 +113,7 @@
} // getPlayer
- public ArrayList getPlayersOfTeam(String teamId) {
+ public ArrayList getPlayersOfTeam(String teamId) {
Debug.print("RosterBean getPlayersOfTeam");
Collection players = null;
@@ -128,7 +128,7 @@
} // getPlayersOfTeam
- public ArrayList getPlayersOfTeamCopy(String teamId) {
+ public ArrayList getPlayersOfTeamCopy(String teamId) {
Debug.print("RosterBean getPlayersOfTeamCopy");
ArrayList playersList = null;
@@ -145,7 +145,7 @@
} // getPlayersOfTeamCopy
- public ArrayList getTeamsOfLeague(String leagueId) {
+ public ArrayList getTeamsOfLeague(String leagueId) {
Debug.print("RosterBean getTeamsOfLeague");
@@ -186,7 +186,7 @@
} // getPlayersByPosition
- public ArrayList getPlayersByHigherSalary(String name) {
+ public ArrayList getPlayersByHigherSalary(String name) {
Debug.print("RosterBean getPlayersByByHigherSalary");
Collection players = null;
@@ -200,7 +200,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;
@@ -214,7 +214,7 @@
return copyPlayersToDetails(players);
} // getPlayersBySalaryRange
- public ArrayList getPlayersByLeagueId(String leagueId) {
+ public ArrayList getPlayersByLeagueId(String leagueId) {
Debug.print("RosterBean getPlayersByLeagueId");
Collection players = null;
@@ -229,7 +229,7 @@
return copyPlayersToDetails(players);
} // getPlayersByLeagueId
- public ArrayList getPlayersBySport(String sport) {
+ public ArrayList getPlayersBySport(String sport) {
Debug.print("RosterBean getPlayersBySport");
Collection players = null;
@@ -243,7 +243,7 @@
return copyPlayersToDetails(players);
} // getPlayersBySport
- public ArrayList getPlayersByCity(String city) {
+ public ArrayList getPlayersByCity(String city) {
Debug.print("RosterBean getPlayersByCity");
Collection players = null;
@@ -257,7 +257,7 @@
return copyPlayersToDetails(players);
} // getPlayersByCity
- public ArrayList getAllPlayers() {
+ public ArrayList getAllPlayers() {
Debug.print("RosterBean getAllPlayers");
Collection players = null;
@@ -271,7 +271,7 @@
return copyPlayersToDetails(players);
} // getAllPlayers
- public ArrayList getPlayersNotOnTeam() {
+ public ArrayList getPlayersNotOnTeam() {
Debug.print("RosterBean getPlayersNotOnTeam");
Collection players = null;
@@ -285,8 +285,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;
@@ -300,7 +300,7 @@
return copyPlayersToDetails(players);
} // getPlayersByPositionAndName
- public ArrayList getLeaguesOfPlayer(String playerId) {
+ public ArrayList getLeaguesOfPlayer(String playerId) {
Debug.print("RosterBean getLeaguesOfPlayer");
ArrayList detailsList = new ArrayList();
@@ -312,7 +312,7 @@
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
Iterator i = leagues.iterator();
while (i.hasNext()) {
LocalLeague league = (LocalLeague) i.next();
@@ -323,7 +323,7 @@
return detailsList;
} // getLeaguesOfPlayer
- public ArrayList getSportsOfPlayer(String playerId) {
+ public ArrayList getSportsOfPlayer(String playerId) {
Debug.print("RosterBean getSportsOfPlayer");
ArrayList sportsList = new ArrayList();
@@ -335,7 +335,7 @@
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
Iterator i = sports.iterator();
while (i.hasNext()) {
String sport = (String) i.next();
@@ -346,8 +346,8 @@
// 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);
@@ -358,8 +358,8 @@
throw new EJBException(ex.getMessage());
}
}
-
- public void removeTeam(String teamId) {
+
+ public void removeTeam(String teamId) {
Debug.print("RosterBean removeTeam");
try {
@@ -369,7 +369,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public TeamDetails getTeam(String teamId) {
Debug.print("RosterBean getTeam");
@@ -387,18 +387,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 {
@@ -408,7 +408,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public LeagueDetails getLeague(String leagueId) {
Debug.print("RosterBean getLeague");
@@ -422,7 +422,7 @@
}
return leagueDetails;
}
-
+
// SessionBean methods
public void ejbCreate() throws CreateException {
@@ -470,51 +470,51 @@
public RosterBean() {}
public void ejbRemove() {}
public void setSessionContext(SessionContext sc) {}
-
+
// Private methods
private LocalPlayerHome lookupPlayer() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimplePlayerExt");
return (LocalPlayerHome) objref;
}
private LocalTeamHome lookupTeam() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleTeamExt");
return (LocalTeamHome) objref;
}
private LocalLeagueHome lookupLeague() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleLeagueExt");
return (LocalLeagueHome) objref;
}
private PlayerHome lookupRemotePlayer() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemotePlayerExt");
return (PlayerHome) objref;
}
private TeamHome lookupRemoteTeam() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteTeamExt");
return (TeamHome) objref;
}
private LeagueHome lookupRemoteLeague() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteLeagueExt");
return (LeagueHome) objref;
}
-
+
private ArrayList copyPlayersToDetails(Collection players) {
ArrayList detailsList = new ArrayList();
@@ -544,15 +544,15 @@
return detailsList;
} // copyPlayersToDetails
-
+
/**
- * dirty cleanUp method only EJBs with hardcoded PK will be removed
+ * dirty cleanUp method only EJBs with hardcoded PK will be removed
*/
public void cleanUp() {
- Debug.print("Cleaning up the database");
+ Debug.print("Cleaning up the database");
Collection toClean = null;
Iterator it = null;
-
+
try {
//removing the player EJBs
toClean = playerHome.findAll();
@@ -560,33 +560,33 @@
while (it.hasNext()) {
((LocalPlayer)it.next()).remove();
}
-
+
// removing the team EJBs
toClean = teamHome.findAll();
it = toClean.iterator();
while (it.hasNext()) {
((LocalTeam)it.next()).remove();
}
-
+
// removing the league EJBs
toClean = leagueHome.findAll();
it = toClean.iterator();
while (it.hasNext()) {
((LocalLeague)it.next()).remove();
- }
- Debug.print("Cleaning up the database ... done!");
+ }
+ Debug.print("Cleaning up the database ... done!");
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
}
-
+
/**
- *
+ *
* @param name
* @return
*/
public LeagueDetails getLeagueByName(String name) {
-
+
Debug.print("RosterBean getLeagueByName (SingleObjectFinder)");
LeagueDetails leagueDetails = null;
try {
@@ -598,12 +598,12 @@
}
return leagueDetails;
- }
+ }
// getLeagueByName()
-
+
/**
- *
+ *
* @param playerKey
* @param leagueKey
* @return
@@ -612,13 +612,13 @@
String leagueKey) {
Debug.print("RosterBean getTeamsByPlayerAndLeague");
- ArrayList detailsList = new ArrayList();
+ ArrayList detailsList = new ArrayList();
Collection teamsColl = null;
try {
LocalPlayer player = playerHome.findByPrimaryKey(playerKey);
- LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
- teamsColl = teamHome.findByPlayerAndLeague(player, league);
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
+ teamsColl = teamHome.findByPlayerAndLeague(player, league);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
@@ -632,11 +632,11 @@
detailsList.add(details);
}
- return detailsList;
- }
+ return detailsList;
+ }
/**
- *
+ *
* @param playerKey
* @param leagueKey
* @return
@@ -645,17 +645,17 @@
String leagueKey) {
Debug.print("RosterBean getTeamsByPlayerAndLeagueViaRemote");
- ArrayList detailsList = new ArrayList();
+ ArrayList detailsList = new ArrayList();
Collection teamsColl = null;
try {
Debug.print(" ----- finding ....");
Player player = remPlayerHome.findByPrimaryKey(playerKey);
Debug.print(" ----- Player found");
- League league = remLeagueHome.findByPrimaryKey(leagueKey);
+ League league = remLeagueHome.findByPrimaryKey(leagueKey);
Debug.print(" ----- League found");
teamsColl = remTeamHome.findByPlayerAndLeagueViaRemote(player, league);
- Debug.print(" ----- Team found");
+ Debug.print(" ----- Team found");
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
@@ -674,45 +674,45 @@
}
- return detailsList;
- }
-
+ return detailsList;
+ }
+
/**
- *
+ *
* @param city
* @return
*/
public Set getCitiesOfLeague(String leagueKey) {
-
+
Debug.print("RosterBean getCitiesOfLeague(leagueKey)");
- LocalLeague league;
+ LocalLeague league;
Set cities;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
- cities = league.getCitiesOfThisLeague();
+ cities = league.getCitiesOfThisLeague();
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
-
+
return cities;
}// getCitiesOfLeague()
public ArrayList getRemoteTeamsOfLeague(String leagueKey) {
-
+
Debug.print("RosterBean getRemoteTeamsOfLeague(leagueKey)");
- ArrayList detailsList = new ArrayList();
- League league;
+ ArrayList detailsList = new ArrayList();
+ League league;
Set teams;
-
+
try {
league = remLeagueHome.findByPrimaryKey(leagueKey);
- teams = league.getRemoteTeamsOfThisLeague();
+ teams = league.getRemoteTeamsOfThisLeague();
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
try {
@@ -727,12 +727,12 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return detailsList;
}
-
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -741,7 +741,7 @@
Debug.print("RosterBean getTeamOfLeagueByCity(leagueKey, city)");
LocalLeague league;
LocalTeam team;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
team = league.getTeamByCity(city);
@@ -749,13 +749,13 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
}// getTeamOfLeagueByCity()
-
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -764,7 +764,7 @@
Debug.print("RosterBean getTeamsNameOfLeagueByCity(leagueKey, city)");
LocalLeague league;
String teamName;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
teamName = league.getTeamsNameByCity(city);
@@ -772,14 +772,14 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return teamName;
}// getTeamsNameOfLeagueByCity()
-
-
+
+
/**
- *
+ *
* @param teamID
* @param playerName
* @return
@@ -788,21 +788,21 @@
Debug.print("RosterBean getSalaryOfPlayerFromTeam(teamKey, playerKey)");
LocalTeam team;
double salary;
-
+
try {
- team = teamHome.findByPrimaryKey(teamID);
- salary = team.getSalaryOfPlayer(playerName);
+ team = teamHome.findByPrimaryKey(teamID);
+ salary = team.getSalaryOfPlayer(playerName);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return salary;
+
+ return salary;
}// getSalaryOfPlayerFromTeam()
-
-
+
+
/**
- *
+ *
* @param leagueId
* @return
*/
@@ -810,7 +810,7 @@
Debug.print("RosterBean getPlayersOfLeague(leagueId)");
LocalLeague league;
Set players;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueId);
players = league.getPlayersFromLeague();
@@ -818,12 +818,12 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return copyPlayersToDetails(players);
+
+ return copyPlayersToDetails(players);
}// getPlayersOfLeague()
-
+
/**
- *
+ *
* @param leagueId
* @return
*/
@@ -840,68 +840,68 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return result;
+
+ return result;
}// getPlayersOfLeague()
-
+
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithPositionsGoalkeeperOrDefender() {
Debug.print("RosterBean getPlayersWithPositionsGoalkeeperOrDefender()");
Collection players = null;
-
+
try {
players = playerHome.findByPositionsGoalkeeperOrDefender();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithPositionsGoalkeeperOrDefender()
-
+
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithNameEndingWithON() {
Debug.print("RosterBean getPlayersWithNameEndingWithON()");
Collection players = null;
-
+
try {
players = playerHome.findByNameEndingWithON();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithNameEndingWithON()
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithNullName() {
Debug.print("RosterBean getPlayersWithNullName()");
Collection players = null;
-
+
try {
players = playerHome.findByNullName();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithNullName()
/**
- *
+ *
* @param teamId
* @return
*/
@@ -909,7 +909,7 @@
Debug.print("RosterBean getPlayersWithTeam(teamId)");
LocalTeam team;
Collection players = null;
-
+
try {
team = teamHome.findByPrimaryKey(teamId);
players = playerHome.findByTeam(team);
@@ -917,13 +917,13 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithTeam()
-
-
+
+
/**
- *
+ *
* @param teamId
* @return
*/
@@ -931,7 +931,7 @@
Debug.print("RosterBean getTeamNameVariations(teamId)");
LocalTeam team;
StringBuffer out = new StringBuffer();
-
+
try {
team = teamHome.findByPrimaryKey(teamId);
Debug.print("--- CONCAT");
@@ -939,59 +939,59 @@
Debug.print("--- SUBSTRING");
out.append(team.getTeamNameWithStringfunctionTests2());
Debug.print("--- LOCATE AND LENGTH");
- out.append(team.getTeamNameWithStringfunctionTests3());
+ out.append(team.getTeamNameWithStringfunctionTests3());
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
-
+
return out.toString();
}// getTeamNameVariations()
-
-
+
+
/**
- *
+ *
* @param salary
* @return
*/
public ArrayList getPlayersWithSalaryUsingABS(double salary) {
Debug.print("RosterBean getPlayersWithSalaryUsingABS(salary)");
Collection players = null;
-
+
try {
players = playerHome.findBySalarayWithArithmeticFunctionABS(salary);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithSalaryUsingABS()
/**
- *
+ *
* @param salary
* @return
*/
public ArrayList getPlayersWithSalaryUsingSQRT(double salary) {
Debug.print("RosterBean getPlayersWithSalaryUsingSQRT(salary)");
Collection players = null;
-
+
try {
players = playerHome.findBySalarayWithArithmeticFunctionSQRT(salary);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithSalaryUsingSQRT()
-
-
-
+
+
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -1001,20 +1001,20 @@
League league;
Team team;
TeamDetails teamDetails;
-
+
try {
league = remLeagueHome.findByPrimaryKey(leagueKey);
team = league.getRemoteTeamByCity(city);
- teamDetails = new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
+ teamDetails = new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return teamDetails;
}// getRemoteTeamOfLeagueByCity()
-
- public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) {
+
+ public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) {
Debug.print("RosterBean getPlayersByLeagueId");
Collection players = null;
@@ -1029,5 +1029,5 @@
return copyPlayersToDetails(players);
} // getPlayersByLeagueId
-
-} // RosterBean
+
+} // RosterBean
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/RosterHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/RosterHome.java
index cecd462..b874ad4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/RosterHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/roster/RosterHome.java
@@ -22,6 +22,6 @@
import jakarta.ejb.EJBHome;
public interface RosterHome extends EJBHome {
-
+
Roster create() throws RemoteException, CreateException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/League.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/League.java
index b0b8e1b..96e3703 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/League.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/League.java
@@ -29,15 +29,15 @@
public String getSport() throws RemoteException;
public Collection getTeams() throws RemoteException;
- public Team getRemoteTeamByCity(String city) throws FinderException,
+ public Team getRemoteTeamByCity(String city) throws FinderException,
RemoteException;
-
- public Set getRemoteTeamsOfThisLeague() throws FinderException,
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException,
RemoteException;
- public Collection getRemotePlayersFromLeague() throws FinderException,
+ public Collection getRemotePlayersFromLeague() throws FinderException,
RemoteException;
-
+
// public void addTeam(Team team) throws RemoteException;
// public void dropTeam(Team team) throws RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LeagueBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LeagueBean.java
index 38d3806..fce92de 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LeagueBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/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);
@@ -50,7 +50,7 @@
public abstract Set ejbSelectRemoteTeams(League league)
throws FinderException;
-
+
public abstract LocalTeam ejbSelectTeamByCity(String city)
throws FinderException;
@@ -60,63 +60,63 @@
public abstract String ejbSelectTeamsNameByCity(String city)
throws FinderException;
-
+
public abstract Set ejbSelectPlayersByLeague(LocalLeague league)
throws FinderException;
public abstract Collection ejbSelectRemotePlayersByLeague(League league)
throws FinderException;
-
+
// Business methods
public Set getCitiesOfThisLeague() throws FinderException {
-
- LocalLeague league =
+
+ LocalLeague league =
(team.LocalLeague)context.getEJBLocalObject();
-
- return ejbSelectTeamsCity(league);
+
+ return ejbSelectTeamsCity(league);
}
public Set getRemoteTeamsOfThisLeague() throws FinderException {
-
+
League league = (team.League)context.getEJBObject();
-
- return ejbSelectRemoteTeams(league);
+
+ return ejbSelectRemoteTeams(league);
}
-
+
public LocalTeam getTeamByCity(String city) throws FinderException {
-
+
return ejbSelectTeamByCity(city);
}
public Team getRemoteTeamByCity(String city) throws FinderException {
-
+
return ejbSelectRemoteTeamByCity(city);
}
-
+
public String getTeamsNameByCity(String city) throws FinderException {
-
+
return ejbSelectTeamsNameByCity(city);
}
-
+
public Set getPlayersFromLeague() throws FinderException{
-
+
LocalLeague league = (team.LocalLeague)context.getEJBLocalObject();
-
+
return ejbSelectPlayersByLeague(league);
- }
-
+ }
+
public Collection getRemotePlayersFromLeague() throws FinderException{
-
+
League league = (team.League)context.getEJBObject();
-
+
return ejbSelectRemotePlayersByLeague(league);
- }
-
-
+ }
+
+
public void addTeam(LocalTeam team) {
Debug.print("TeamBean addTeam");
@@ -150,32 +150,32 @@
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() { }
} // LeagueBean class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LeagueHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LeagueHome.java
index 22a734a..8bc0782 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LeagueHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LeagueHome.java
@@ -25,14 +25,14 @@
public League create (String id, String name, String sport)
throws CreateException, RemoteException;
-
+
public League findByPrimaryKey (String id)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
public League findByName(String name)
- throws FinderException, RemoteException;
-
+ throws FinderException, RemoteException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalLeague.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalLeague.java
index f2eb046..a144617 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalLeague.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalLeague.java
@@ -33,5 +33,5 @@
public LocalTeam getTeamByCity(String city) throws FinderException;
public String getTeamsNameByCity(String city) throws FinderException;
public Set getPlayersFromLeague() throws FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalLeagueHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalLeagueHome.java
index ec176da..c19af77 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalLeagueHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalLeagueHome.java
@@ -20,17 +20,17 @@
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;
- public Collection findAll()
+ public Collection findAll()
throws FinderException;
public LocalLeague findByName(String name)
- throws FinderException;
-
+ throws FinderException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalPlayerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalPlayerHome.java
index 90458e3..5777072 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalPlayerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalPlayerHome.java
@@ -20,60 +20,60 @@
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)
throws FinderException;
public Collection findByPositionsGoalkeeperOrDefender()
- throws FinderException;
-
+ throws FinderException;
+
public Collection findByNameEndingWithON()
- throws FinderException;
+ throws FinderException;
public Collection findByNullName()
- throws FinderException;
+ throws FinderException;
public Collection findByTeam(LocalTeam team)
- throws FinderException;
-
+ throws FinderException;
+
public Collection findBySalarayWithArithmeticFunctionABS(double salaray)
- throws FinderException;
+ throws FinderException;
public Collection findBySalarayWithArithmeticFunctionSQRT(double salaray)
- throws FinderException;
-
+ throws FinderException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalTeam.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalTeam.java
index 914a4cb..f87f5ee 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalTeam.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalTeam.java
@@ -31,8 +31,8 @@
public void addPlayer(LocalPlayer player);
public void dropPlayer(LocalPlayer player);
public double getSalaryOfPlayer(String playerName);
- public String getTeamNameWithStringfunctionTests1();
- public String getTeamNameWithStringfunctionTests2();
- public String getTeamNameWithStringfunctionTests3();
-
+ public String getTeamNameWithStringfunctionTests1();
+ public String getTeamNameWithStringfunctionTests2();
+ public String getTeamNameWithStringfunctionTests3();
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalTeamHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalTeamHome.java
index 884657e..c9e2a1e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalTeamHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/LocalTeamHome.java
@@ -22,17 +22,17 @@
import jakarta.ejb.FinderException;
public interface LocalTeamHome extends EJBLocalHome {
-
+
public LocalTeam create (String id, String name, String city)
throws CreateException;
-
+
public LocalTeam findByPrimaryKey (String id)
throws FinderException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException;
-
- public Collection findByPlayerAndLeague(LocalPlayer player,
+
+ public Collection findByPlayerAndLeague(LocalPlayer player,
LocalLeague league)
throws FinderException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/PlayerBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/PlayerBean.java
index 44b0a8e..7cd2890 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/PlayerBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/PlayerBean.java
@@ -29,7 +29,7 @@
public abstract String getPlayerId();
public abstract void setPlayerId(String id);
-
+
public abstract String getName();
public abstract void setName(String name);
@@ -52,20 +52,20 @@
public abstract Collection ejbSelectSports(LocalPlayer player)
throws FinderException;
-
-
+
+
// Business methods
public Collection getLeagues() throws FinderException {
- LocalPlayer player =
+ LocalPlayer player =
(team.LocalPlayer)context.getEJBLocalObject();
return ejbSelectLeagues(player);
}
public Collection getSports() throws FinderException {
- LocalPlayer player =
+ LocalPlayer player =
(team.LocalPlayer)context.getEJBLocalObject();
return ejbSelectSports(player);
}
@@ -82,32 +82,32 @@
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() { }
} // PlayerBean class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/PlayerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/PlayerHome.java
index ded9724..8459852 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/PlayerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/PlayerHome.java
@@ -26,35 +26,35 @@
public Player create (String id, String name, String position,
double salary)
throws CreateException, RemoteException;
-
+
public Player findByPrimaryKey (String id)
throws FinderException, RemoteException;
-
- public Collection findByPosition(String position)
+
+ public Collection findByPosition(String position)
throws FinderException, RemoteException;
- public Collection findByHigherSalary(String name)
+ public Collection findByHigherSalary(String name)
throws FinderException, RemoteException;
- public Collection findBySalaryRange(double low, double high)
+ public Collection findBySalaryRange(double low, double high)
throws FinderException, RemoteException;
-// public Collection findByLeague(League league)
+// public Collection findByLeague(League league)
// throws FinderException, RemoteException;
- public Collection findBySport(String sport)
+ public Collection findBySport(String sport)
throws FinderException, RemoteException;
- public Collection findByCity(String city)
+ public Collection findByCity(String city)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
- public Collection findNotOnTeam()
+ public Collection findNotOnTeam()
throws FinderException, RemoteException;
- public Collection findByPositionAndName(String position,
+ public Collection findByPositionAndName(String position,
String name) throws FinderException, RemoteException;
public Collection findByTest (String parm1, String parm2, String parm3)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/TeamBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/TeamBean.java
index 74fa4d7..b852ec3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/TeamBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/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);
@@ -39,7 +39,7 @@
// Access methods for relationship fields
-
+
public abstract Collection getPlayers();
public abstract void setPlayers(Collection players);
@@ -52,55 +52,55 @@
throws FinderException;
public abstract String ejbSelectByNameWithCONCAT(String part1, String part2)
- throws FinderException;
-
+ throws FinderException;
+
public abstract String ejbSelectByNameSubstring(String substring)
- throws FinderException;
+ throws FinderException;
public abstract String ejbSelectNameLocate(String substring)
- throws FinderException;
+ throws FinderException;
-
+
// Business methods
public double getSalaryOfPlayer(String playerName) throws FinderException {
LocalTeam team = (team.LocalTeam)context.getEJBLocalObject();
-
+
return ejbSelectSalaryOfPlayerInTeam(team, playerName);
}
-
-
+
+
public String getTeamNameWithStringfunctionTests1() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
// LocalTeam team = (team.LocalTeam) context.getEJBLocalObject();
// out.append("<BR>Name of Team : " + team.getName());
- out.append("<BR>");
+ out.append("<BR>");
out.append(ejbSelectByNameWithCONCAT("Cr", "ows"));
out.append("<BR>");
-
+
return out.toString();
}
-
+
public String getTeamNameWithStringfunctionTests2() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
out.append(ejbSelectByNameSubstring("aaaaCrowsaaaaa"));
out.append("<BR>");
return out.toString();
}
-
+
public String getTeamNameWithStringfunctionTests3() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
out.append(ejbSelectNameLocate("row"));
out.append("<BR>");
-
+
return out.toString();
}
-
+
public ArrayList getCopyOfPlayers() {
Debug.print("TeamBean getCopyOfPlayers");
@@ -151,30 +151,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/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/TeamHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/TeamHome.java
index fe13044..bcfe439 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/TeamHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/team/TeamHome.java
@@ -25,14 +25,14 @@
public Team create (String id, String name, String city)
throws CreateException, RemoteException;
-
+
public Team findByPrimaryKey (String id)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
-
- public Collection findByPlayerAndLeagueViaRemote(Player player,
+
+ public Collection findByPlayerAndLeagueViaRemote(Player player,
League league)
throws FinderException, RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/PlayerDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/PlayerDetails.java
index 81041c2..4765bce 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/PlayerDetails.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/ejb/util/PlayerDetails.java
@@ -23,7 +23,7 @@
private String position;
private double salary;
- public PlayerDetails (String id, String name, String position,
+ public PlayerDetails (String id, String name, String position,
double salary) {
this.id = id;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/servlet/RosterServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/servlet/RosterServlet.java
index 81ade04..6a3c99a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/servlet/RosterServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/roster2Teams/servlet/RosterServlet.java
@@ -84,7 +84,7 @@
RosterHome.class);
Roster myRoster = home.create();
-
+
// deleting all exisiting DB-entries
myRoster.cleanUp();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/build.properties
index 788a537..ce6a0d3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/build.properties
@@ -15,13 +15,13 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="rosterGenDBSchema"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
-<property name="test.client"
- value="RosterClient"/>
+<property name="test.client"\u0020
+ value="RosterClient"/>
<property name="application.xml" value="descriptor/application.xml"/>
<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
@@ -34,10 +34,10 @@
<property name="sun-cmp-mappings-team.xml" value="descriptor/sun-cmp-mappings-team.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="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}"/>
@@ -47,7 +47,7 @@
<property name="hasWebclient" value="true"/>
<property name="web.xml"
- value="descriptor/web.xml"/>
+ value="descriptor/web.xml"/>
<property name="sun-web.xml"
- value="descriptor/sun-web.xml"/>
+ value="descriptor/sun-web.xml"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/build.xml
index 0fd7888..4996d43 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/build.xml
@@ -38,7 +38,7 @@
<delete file="${sun-cmp-mappings.xml}"/>
<antcall target="clean-common"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -46,16 +46,16 @@
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
- <antcall target="compile-common">
+ <antcall target="compile-common">
<param name="src" value="servlet"/>
</antcall>
</target>
<target name="package-team-jar" >
- <antcall target="package-ejbjar-common">
-
- <param name="ejbjar.classes"
+ <antcall target="package-ejbjar-common">
+
+ <param name="ejbjar.classes"
value="team/Local*.class, team/League*.class, team/Player*.class, team/Team*.class, util/*.class" />
<param name="ejb-jar.xml" value="${ejb-jar-team.xml}" />
@@ -63,22 +63,22 @@
<param name="sun-cmp-mappings.xml" value="${sun-cmp-mappings-team.xml}" />
<param name="ejbjar.files" value="${build.classes.dir}" />
<param name="ejb.jar" value="${assemble.dir}/team-ejb.jar" />
-
+
</antcall>
</target>
<target name="package-roster-jar" >
- <antcall target="package-ejbjar-common">
-
- <param name="ejbjar.classes"
+ <antcall target="package-ejbjar-common">
+
+ <param name="ejbjar.classes"
value="team/Local*.class, team/League.class, team/LeagueHome.class, team/Player.class, team/PlayerHome.class, team/Team.class, team/TeamHome.class,,util/*.class,roster/*.class" />
<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="ejb.jar" value="${assemble.dir}/roster-ejb.jar" />
-
+
</antcall>
</target>
@@ -86,17 +86,17 @@
<antcall target="webclient-war-common">
<param name="hasWebclient" value="true"/>
- <param name="war.classes"
+ <param name="war.classes"
value="**/RosterServlet.class" />
- </antcall>
-
+ </antcall>
+
</target>
<target name="package-appclient" >
<mkdir dir="${assemble.dir}"/>
<antcall target="package-appclientjar-common">
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/RosterClient.class, **/Roster.class, **/RosterHome.class, util/*.class" />
<param name="application-client.xml"
value="${application-client.xml}" />
@@ -117,15 +117,15 @@
<property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
- <copy file="${basedir}/descriptor/INDEX.LIST" todir="${TEMPDIR}/META-INF" failonerror="false"/>
+ <copy file="${basedir}/descriptor/INDEX.LIST" todir="${TEMPDIR}/META-INF" failonerror="false"/>
<ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}">
- <fileset dir="${assemble.dir}">
- <include name="*.jar"/>
- <include name="*.war"/>
- </fileset>
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ <include name="*.war"/>
+ </fileset>
- <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
</ear>
</target>
@@ -141,11 +141,11 @@
<antcall target="package-ear" />
- </target>
+ </target>
-
- <target name="deploy"
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="${basedir}/sql/RosterApp_derby.sql"/>
@@ -164,22 +164,22 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="${basedir}/sql/drop_RosterApp_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/client/RosterClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/client/RosterClient.java
index c3a1097..adec627 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/client/RosterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/client/RosterClient.java
@@ -28,18 +28,18 @@
public class RosterClient {
private static SimpleReporterAdapter stat =
- new SimpleReporterAdapter("appserv-tests");
+ new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
try {
- System.out.println("START");
+ System.out.println("START");
stat.addDescription("RosterGenDBSchema");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleRosterExt");
- RosterHome home =
- (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
RosterHome.class);
Roster myRoster = home.create();
@@ -49,8 +49,8 @@
// getMoreInfo(myRoster);
- stat.addStatus("ejbclient RosterGenDBSchema", stat.PASS);
- stat.printSummary("RosterGenDBSchema");
+ stat.addStatus("ejbclient RosterGenDBSchema", stat.PASS);
+ stat.printSummary("RosterGenDBSchema");
System.exit(0);
} catch (Exception ex) {
@@ -86,7 +86,7 @@
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient RosterGenDBSchema", stat.FAIL);
+ stat.addStatus("ejbclient RosterGenDBSchema", stat.FAIL);
}
} // getSomeInfo
@@ -124,7 +124,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");
@@ -142,7 +142,7 @@
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient RosterGenDBSchema", stat.FAIL);
+ stat.addStatus("ejbclient RosterGenDBSchema", stat.FAIL);
}
} // getMoreInfo
@@ -176,7 +176,7 @@
myRoster.createTeamInLeague(new TeamDetails(
"T2", "Gophers", "Manteca"), "L1");
-
+
myRoster.createTeamInLeague(new TeamDetails(
"T3", "Deer", "Bodie"), "L2");
@@ -300,7 +300,7 @@
myRoster.createPlayer(new PlayerDetails(
"P26", "Hobie Jackson", "pitcher", 582.00));
-
+
myRoster.createPlayer(new PlayerDetails(
"P27", "Melinda Kendall", "catcher", 677.00));
@@ -314,7 +314,7 @@
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient RosterGenDBSchema", stat.FAIL);
+ stat.addStatus("ejbclient RosterGenDBSchema", stat.FAIL);
}
} // insertInfo
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/ejb-jar-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/ejb-jar-team.xml
index 704c802..856bbb8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/ejb-jar-team.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/ejb-jar-team.xml
@@ -25,7 +25,7 @@
<display-name>LeagueEJB</display-name>
<ejb-name>LeagueEJB</ejb-name>
<home>team.LeagueHome</home>
- <remote>team.League</remote>
+ <remote>team.League</remote>
<local-home>team.LocalLeagueHome</local-home>
<local>team.LocalLeague</local>
<ejb-class>team.LeagueBean</ejb-class>
@@ -143,7 +143,7 @@
</query-method>
<result-type-mapping>Remote</result-type-mapping>
<ejb-ql>select Object(p) from League l, in(l.teams) as t, in(t.players) p where l = ?1</ejb-ql>
- </query>
+ </query>
</entity>
<entity>
<display-name>TeamEJB</display-name>
@@ -246,7 +246,7 @@
</method-params>
</query-method>
<ejb-ql>select distinct t.name from Team t where LOCATE(?1, t.name) > 0 AND LOCATE(?1, t.name) < LENGTH(t.name)</ejb-ql>
- </query>
+ </query>
</entity>
<entity>
<display-name>PlayerEJB</display-name>
@@ -288,7 +288,7 @@
<method-name>findNotOnTeam</method-name>
<method-params />
</query-method>
- <ejb-ql>select object(p) from Player p
+ <ejb-ql>select object(p) from Player p
where p.teams is empty</ejb-ql>
</query>
<query>
@@ -474,7 +474,7 @@
</method-params>
</query-method>
<ejb-ql>select object(p) from Player p where p.salary = SQRT(?1)</ejb-ql>
- </query>
+ </query>
</entity>
</enterprise-beans>
<relationships>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-cmp-mappings-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-cmp-mappings-team.xml
index 6a5a110..e985f17 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-cmp-mappings-team.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/descriptor/sun-cmp-mappings-team.xml
@@ -21,10 +21,10 @@
<sun-cmp-mappings>
<sun-cmp-mapping>
<!-- Test that we can generate dbschema at deployment. -->
- <!-- It could be missing (though that would fail a DTD validation). -->
+ <!-- It could be missing (though that would fail a DTD validation). -->
<!-- schema>RosterSchema</schema-->
- <!-- Or, it could be an empty element (passing validation). -->
- <schema/>
+ <!-- Or, it could be an empty element (passing validation). -->
+ <schema/>
<entity-mapping>
<ejb-name>LeagueEJB</ejb-name>
<table-name>LEAGUE</table-name>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/Roster.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/Roster.java
index 692a185..279aab7 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/Roster.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/Roster.java
@@ -27,55 +27,55 @@
import java.util.Set;
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)
@@ -83,84 +83,84 @@
public ArrayList getSportsOfPlayer(String playerId)
throws RemoteException;
-
+
public double getSalaryOfPlayerFromTeam(String teamID, String playerName)
throws RemoteException;
public ArrayList getPlayersOfLeague(String leagueId)
- throws RemoteException;
-
+ throws RemoteException;
+
public ArrayList getPlayersWithPositionsGoalkeeperOrDefender()
- throws RemoteException;
+ throws RemoteException;
- public ArrayList getPlayersWithNameEndingWithON()
+ public ArrayList getPlayersWithNameEndingWithON()
throws RemoteException;
public ArrayList getPlayersWithNullName()
- throws RemoteException;
+ throws RemoteException;
public ArrayList getPlayersWithTeam(String teamId)
throws RemoteException;
-
- public ArrayList getPlayersWithSalaryUsingABS(double salary)
- throws RemoteException;
- public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ public ArrayList getPlayersWithSalaryUsingABS(double salary)
throws RemoteException;
-
-
+
+ public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ throws RemoteException;
+
+
// 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;
public ArrayList getTeamsByPlayerAndLeague(String playerKey,
String leagueKey)
- throws RemoteException;
-
+ throws RemoteException;
+
public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
String leagueKey)
- throws RemoteException;
+ throws RemoteException;
-
+
public Set getCitiesOfLeague(String leagueKey) throws RemoteException;
public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
+ throws RemoteException;
public String getTeamsNameOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
+ throws RemoteException;
public String getTeamNameVariations(String teamId) throws RemoteException;
public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
-
-
+ 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;
public LeagueDetails getLeagueByName(String name)
throws RemoteException;
-
+
// Test
public ArrayList getRemoteTeamsOfLeague(String leagueKey) throws RemoteException;
@@ -169,7 +169,7 @@
public ArrayList testFinder(String parm1, String parm2, String parm3)
throws RemoteException;
-
+
public void cleanUp() throws FinderException, RemoveException, RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/RosterBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/RosterBean.java
index 386979b..36b95b3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/RosterBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/RosterBean.java
@@ -52,19 +52,19 @@
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);
@@ -75,7 +75,7 @@
}
}
- public void removePlayer(String playerId) {
+ public void removePlayer(String playerId) {
Debug.print("RosterBean removePlayer");
try {
@@ -85,7 +85,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public void dropPlayer(String playerId, String teamId) {
Debug.print("RosterBean dropPlayer");
@@ -113,7 +113,7 @@
} // getPlayer
- public ArrayList getPlayersOfTeam(String teamId) {
+ public ArrayList getPlayersOfTeam(String teamId) {
Debug.print("RosterBean getPlayersOfTeam");
Collection players = null;
@@ -128,7 +128,7 @@
} // getPlayersOfTeam
- public ArrayList getPlayersOfTeamCopy(String teamId) {
+ public ArrayList getPlayersOfTeamCopy(String teamId) {
Debug.print("RosterBean getPlayersOfTeamCopy");
ArrayList playersList = null;
@@ -145,7 +145,7 @@
} // getPlayersOfTeamCopy
- public ArrayList getTeamsOfLeague(String leagueId) {
+ public ArrayList getTeamsOfLeague(String leagueId) {
Debug.print("RosterBean getTeamsOfLeague");
@@ -186,7 +186,7 @@
} // getPlayersByPosition
- public ArrayList getPlayersByHigherSalary(String name) {
+ public ArrayList getPlayersByHigherSalary(String name) {
Debug.print("RosterBean getPlayersByByHigherSalary");
Collection players = null;
@@ -200,7 +200,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;
@@ -214,7 +214,7 @@
return copyPlayersToDetails(players);
} // getPlayersBySalaryRange
- public ArrayList getPlayersByLeagueId(String leagueId) {
+ public ArrayList getPlayersByLeagueId(String leagueId) {
Debug.print("RosterBean getPlayersByLeagueId");
Collection players = null;
@@ -229,7 +229,7 @@
return copyPlayersToDetails(players);
} // getPlayersByLeagueId
- public ArrayList getPlayersBySport(String sport) {
+ public ArrayList getPlayersBySport(String sport) {
Debug.print("RosterBean getPlayersBySport");
Collection players = null;
@@ -243,7 +243,7 @@
return copyPlayersToDetails(players);
} // getPlayersBySport
- public ArrayList getPlayersByCity(String city) {
+ public ArrayList getPlayersByCity(String city) {
Debug.print("RosterBean getPlayersByCity");
Collection players = null;
@@ -257,7 +257,7 @@
return copyPlayersToDetails(players);
} // getPlayersByCity
- public ArrayList getAllPlayers() {
+ public ArrayList getAllPlayers() {
Debug.print("RosterBean getAllPlayers");
Collection players = null;
@@ -271,7 +271,7 @@
return copyPlayersToDetails(players);
} // getAllPlayers
- public ArrayList getPlayersNotOnTeam() {
+ public ArrayList getPlayersNotOnTeam() {
Debug.print("RosterBean getPlayersNotOnTeam");
Collection players = null;
@@ -285,8 +285,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;
@@ -300,7 +300,7 @@
return copyPlayersToDetails(players);
} // getPlayersByPositionAndName
- public ArrayList getLeaguesOfPlayer(String playerId) {
+ public ArrayList getLeaguesOfPlayer(String playerId) {
Debug.print("RosterBean getLeaguesOfPlayer");
ArrayList detailsList = new ArrayList();
@@ -312,7 +312,7 @@
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
Iterator i = leagues.iterator();
while (i.hasNext()) {
LocalLeague league = (LocalLeague) i.next();
@@ -323,7 +323,7 @@
return detailsList;
} // getLeaguesOfPlayer
- public ArrayList getSportsOfPlayer(String playerId) {
+ public ArrayList getSportsOfPlayer(String playerId) {
Debug.print("RosterBean getSportsOfPlayer");
ArrayList sportsList = new ArrayList();
@@ -335,7 +335,7 @@
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
Iterator i = sports.iterator();
while (i.hasNext()) {
String sport = (String) i.next();
@@ -346,8 +346,8 @@
// 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);
@@ -358,8 +358,8 @@
throw new EJBException(ex.getMessage());
}
}
-
- public void removeTeam(String teamId) {
+
+ public void removeTeam(String teamId) {
Debug.print("RosterBean removeTeam");
try {
@@ -369,7 +369,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public TeamDetails getTeam(String teamId) {
Debug.print("RosterBean getTeam");
@@ -387,18 +387,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 {
@@ -408,7 +408,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public LeagueDetails getLeague(String leagueId) {
Debug.print("RosterBean getLeague");
@@ -422,7 +422,7 @@
}
return leagueDetails;
}
-
+
// SessionBean methods
public void ejbCreate() throws CreateException {
@@ -470,51 +470,51 @@
public RosterBean() {}
public void ejbRemove() {}
public void setSessionContext(SessionContext sc) {}
-
+
// Private methods
private LocalPlayerHome lookupPlayer() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimplePlayerExt");
return (LocalPlayerHome) objref;
}
private LocalTeamHome lookupTeam() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleTeamExt");
return (LocalTeamHome) objref;
}
private LocalLeagueHome lookupLeague() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleLeagueExt");
return (LocalLeagueHome) objref;
}
private PlayerHome lookupRemotePlayer() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemotePlayerExt");
return (PlayerHome) objref;
}
private TeamHome lookupRemoteTeam() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteTeamExt");
return (TeamHome) objref;
}
private LeagueHome lookupRemoteLeague() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteLeagueExt");
return (LeagueHome) objref;
}
-
+
private ArrayList copyPlayersToDetails(Collection players) {
ArrayList detailsList = new ArrayList();
@@ -544,15 +544,15 @@
return detailsList;
} // copyPlayersToDetails
-
+
/**
- * dirty cleanUp method only EJBs with hardcoded PK will be removed
+ * dirty cleanUp method only EJBs with hardcoded PK will be removed
*/
public void cleanUp() {
- Debug.print("Cleaning up the database");
+ Debug.print("Cleaning up the database");
Collection toClean = null;
Iterator it = null;
-
+
try {
//removing the player EJBs
toClean = playerHome.findAll();
@@ -560,33 +560,33 @@
while (it.hasNext()) {
((LocalPlayer)it.next()).remove();
}
-
+
// removing the team EJBs
toClean = teamHome.findAll();
it = toClean.iterator();
while (it.hasNext()) {
((LocalTeam)it.next()).remove();
}
-
+
// removing the league EJBs
toClean = leagueHome.findAll();
it = toClean.iterator();
while (it.hasNext()) {
((LocalLeague)it.next()).remove();
- }
- Debug.print("Cleaning up the database ... done!");
+ }
+ Debug.print("Cleaning up the database ... done!");
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
}
-
+
/**
- *
+ *
* @param name
* @return
*/
public LeagueDetails getLeagueByName(String name) {
-
+
Debug.print("RosterBean getLeagueByName (SingleObjectFinder)");
LeagueDetails leagueDetails = null;
try {
@@ -598,12 +598,12 @@
}
return leagueDetails;
- }
+ }
// getLeagueByName()
-
+
/**
- *
+ *
* @param playerKey
* @param leagueKey
* @return
@@ -612,13 +612,13 @@
String leagueKey) {
Debug.print("RosterBean getTeamsByPlayerAndLeague");
- ArrayList detailsList = new ArrayList();
+ ArrayList detailsList = new ArrayList();
Collection teamsColl = null;
try {
LocalPlayer player = playerHome.findByPrimaryKey(playerKey);
- LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
- teamsColl = teamHome.findByPlayerAndLeague(player, league);
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
+ teamsColl = teamHome.findByPlayerAndLeague(player, league);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
@@ -632,11 +632,11 @@
detailsList.add(details);
}
- return detailsList;
- }
+ return detailsList;
+ }
/**
- *
+ *
* @param playerKey
* @param leagueKey
* @return
@@ -645,17 +645,17 @@
String leagueKey) {
Debug.print("RosterBean getTeamsByPlayerAndLeagueViaRemote");
- ArrayList detailsList = new ArrayList();
+ ArrayList detailsList = new ArrayList();
Collection teamsColl = null;
try {
Debug.print(" ----- finding ....");
Player player = remPlayerHome.findByPrimaryKey(playerKey);
Debug.print(" ----- Player found");
- League league = remLeagueHome.findByPrimaryKey(leagueKey);
+ League league = remLeagueHome.findByPrimaryKey(leagueKey);
Debug.print(" ----- League found");
teamsColl = remTeamHome.findByPlayerAndLeagueViaRemote(player, league);
- Debug.print(" ----- Team found");
+ Debug.print(" ----- Team found");
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
@@ -674,45 +674,45 @@
}
- return detailsList;
- }
-
+ return detailsList;
+ }
+
/**
- *
+ *
* @param city
* @return
*/
public Set getCitiesOfLeague(String leagueKey) {
-
+
Debug.print("RosterBean getCitiesOfLeague(leagueKey)");
- LocalLeague league;
+ LocalLeague league;
Set cities;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
- cities = league.getCitiesOfThisLeague();
+ cities = league.getCitiesOfThisLeague();
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
-
+
return cities;
}// getCitiesOfLeague()
public ArrayList getRemoteTeamsOfLeague(String leagueKey) {
-
+
Debug.print("RosterBean getRemoteTeamsOfLeague(leagueKey)");
- ArrayList detailsList = new ArrayList();
- League league;
+ ArrayList detailsList = new ArrayList();
+ League league;
Set teams;
-
+
try {
league = remLeagueHome.findByPrimaryKey(leagueKey);
- teams = league.getRemoteTeamsOfThisLeague();
+ teams = league.getRemoteTeamsOfThisLeague();
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
try {
@@ -727,12 +727,12 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return detailsList;
}
-
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -741,7 +741,7 @@
Debug.print("RosterBean getTeamOfLeagueByCity(leagueKey, city)");
LocalLeague league;
LocalTeam team;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
team = league.getTeamByCity(city);
@@ -749,13 +749,13 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
}// getTeamOfLeagueByCity()
-
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -764,7 +764,7 @@
Debug.print("RosterBean getTeamsNameOfLeagueByCity(leagueKey, city)");
LocalLeague league;
String teamName;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
teamName = league.getTeamsNameByCity(city);
@@ -772,14 +772,14 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return teamName;
}// getTeamsNameOfLeagueByCity()
-
-
+
+
/**
- *
+ *
* @param teamID
* @param playerName
* @return
@@ -788,21 +788,21 @@
Debug.print("RosterBean getSalaryOfPlayerFromTeam(teamKey, playerKey)");
LocalTeam team;
double salary;
-
+
try {
- team = teamHome.findByPrimaryKey(teamID);
- salary = team.getSalaryOfPlayer(playerName);
+ team = teamHome.findByPrimaryKey(teamID);
+ salary = team.getSalaryOfPlayer(playerName);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return salary;
+
+ return salary;
}// getSalaryOfPlayerFromTeam()
-
-
+
+
/**
- *
+ *
* @param leagueId
* @return
*/
@@ -810,7 +810,7 @@
Debug.print("RosterBean getPlayersOfLeague(leagueId)");
LocalLeague league;
Set players;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueId);
players = league.getPlayersFromLeague();
@@ -818,12 +818,12 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return copyPlayersToDetails(players);
+
+ return copyPlayersToDetails(players);
}// getPlayersOfLeague()
-
+
/**
- *
+ *
* @param leagueId
* @return
*/
@@ -840,68 +840,68 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return result;
+
+ return result;
}// getPlayersOfLeague()
-
+
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithPositionsGoalkeeperOrDefender() {
Debug.print("RosterBean getPlayersWithPositionsGoalkeeperOrDefender()");
Collection players = null;
-
+
try {
players = playerHome.findByPositionsGoalkeeperOrDefender();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithPositionsGoalkeeperOrDefender()
-
+
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithNameEndingWithON() {
Debug.print("RosterBean getPlayersWithNameEndingWithON()");
Collection players = null;
-
+
try {
players = playerHome.findByNameEndingWithON();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithNameEndingWithON()
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithNullName() {
Debug.print("RosterBean getPlayersWithNullName()");
Collection players = null;
-
+
try {
players = playerHome.findByNullName();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithNullName()
/**
- *
+ *
* @param teamId
* @return
*/
@@ -909,7 +909,7 @@
Debug.print("RosterBean getPlayersWithTeam(teamId)");
LocalTeam team;
Collection players = null;
-
+
try {
team = teamHome.findByPrimaryKey(teamId);
players = playerHome.findByTeam(team);
@@ -917,13 +917,13 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithTeam()
-
-
+
+
/**
- *
+ *
* @param teamId
* @return
*/
@@ -931,7 +931,7 @@
Debug.print("RosterBean getTeamNameVariations(teamId)");
LocalTeam team;
StringBuffer out = new StringBuffer();
-
+
try {
team = teamHome.findByPrimaryKey(teamId);
Debug.print("--- CONCAT");
@@ -939,59 +939,59 @@
Debug.print("--- SUBSTRING");
out.append(team.getTeamNameWithStringfunctionTests2());
Debug.print("--- LOCATE AND LENGTH");
- out.append(team.getTeamNameWithStringfunctionTests3());
+ out.append(team.getTeamNameWithStringfunctionTests3());
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
-
+
return out.toString();
}// getTeamNameVariations()
-
-
+
+
/**
- *
+ *
* @param salary
* @return
*/
public ArrayList getPlayersWithSalaryUsingABS(double salary) {
Debug.print("RosterBean getPlayersWithSalaryUsingABS(salary)");
Collection players = null;
-
+
try {
players = playerHome.findBySalarayWithArithmeticFunctionABS(salary);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithSalaryUsingABS()
/**
- *
+ *
* @param salary
* @return
*/
public ArrayList getPlayersWithSalaryUsingSQRT(double salary) {
Debug.print("RosterBean getPlayersWithSalaryUsingSQRT(salary)");
Collection players = null;
-
+
try {
players = playerHome.findBySalarayWithArithmeticFunctionSQRT(salary);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithSalaryUsingSQRT()
-
-
-
+
+
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -1001,20 +1001,20 @@
League league;
Team team;
TeamDetails teamDetails;
-
+
try {
league = remLeagueHome.findByPrimaryKey(leagueKey);
team = league.getRemoteTeamByCity(city);
- teamDetails = new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
+ teamDetails = new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return teamDetails;
}// getRemoteTeamOfLeagueByCity()
-
- public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) {
+
+ public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) {
Debug.print("RosterBean getPlayersByLeagueId");
Collection players = null;
@@ -1029,5 +1029,5 @@
return copyPlayersToDetails(players);
} // getPlayersByLeagueId
-
-} // RosterBean
+
+} // RosterBean
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/RosterHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/RosterHome.java
index cecd462..b874ad4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/RosterHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/roster/RosterHome.java
@@ -22,6 +22,6 @@
import jakarta.ejb.EJBHome;
public interface RosterHome extends EJBHome {
-
+
Roster create() throws RemoteException, CreateException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/League.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/League.java
index b0b8e1b..96e3703 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/League.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/League.java
@@ -29,15 +29,15 @@
public String getSport() throws RemoteException;
public Collection getTeams() throws RemoteException;
- public Team getRemoteTeamByCity(String city) throws FinderException,
+ public Team getRemoteTeamByCity(String city) throws FinderException,
RemoteException;
-
- public Set getRemoteTeamsOfThisLeague() throws FinderException,
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException,
RemoteException;
- public Collection getRemotePlayersFromLeague() throws FinderException,
+ public Collection getRemotePlayersFromLeague() throws FinderException,
RemoteException;
-
+
// public void addTeam(Team team) throws RemoteException;
// public void dropTeam(Team team) throws RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LeagueBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LeagueBean.java
index 38d3806..fce92de 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LeagueBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/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);
@@ -50,7 +50,7 @@
public abstract Set ejbSelectRemoteTeams(League league)
throws FinderException;
-
+
public abstract LocalTeam ejbSelectTeamByCity(String city)
throws FinderException;
@@ -60,63 +60,63 @@
public abstract String ejbSelectTeamsNameByCity(String city)
throws FinderException;
-
+
public abstract Set ejbSelectPlayersByLeague(LocalLeague league)
throws FinderException;
public abstract Collection ejbSelectRemotePlayersByLeague(League league)
throws FinderException;
-
+
// Business methods
public Set getCitiesOfThisLeague() throws FinderException {
-
- LocalLeague league =
+
+ LocalLeague league =
(team.LocalLeague)context.getEJBLocalObject();
-
- return ejbSelectTeamsCity(league);
+
+ return ejbSelectTeamsCity(league);
}
public Set getRemoteTeamsOfThisLeague() throws FinderException {
-
+
League league = (team.League)context.getEJBObject();
-
- return ejbSelectRemoteTeams(league);
+
+ return ejbSelectRemoteTeams(league);
}
-
+
public LocalTeam getTeamByCity(String city) throws FinderException {
-
+
return ejbSelectTeamByCity(city);
}
public Team getRemoteTeamByCity(String city) throws FinderException {
-
+
return ejbSelectRemoteTeamByCity(city);
}
-
+
public String getTeamsNameByCity(String city) throws FinderException {
-
+
return ejbSelectTeamsNameByCity(city);
}
-
+
public Set getPlayersFromLeague() throws FinderException{
-
+
LocalLeague league = (team.LocalLeague)context.getEJBLocalObject();
-
+
return ejbSelectPlayersByLeague(league);
- }
-
+ }
+
public Collection getRemotePlayersFromLeague() throws FinderException{
-
+
League league = (team.League)context.getEJBObject();
-
+
return ejbSelectRemotePlayersByLeague(league);
- }
-
-
+ }
+
+
public void addTeam(LocalTeam team) {
Debug.print("TeamBean addTeam");
@@ -150,32 +150,32 @@
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() { }
} // LeagueBean class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LeagueHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LeagueHome.java
index 22a734a..8bc0782 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LeagueHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LeagueHome.java
@@ -25,14 +25,14 @@
public League create (String id, String name, String sport)
throws CreateException, RemoteException;
-
+
public League findByPrimaryKey (String id)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
public League findByName(String name)
- throws FinderException, RemoteException;
-
+ throws FinderException, RemoteException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalLeague.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalLeague.java
index f2eb046..a144617 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalLeague.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalLeague.java
@@ -33,5 +33,5 @@
public LocalTeam getTeamByCity(String city) throws FinderException;
public String getTeamsNameByCity(String city) throws FinderException;
public Set getPlayersFromLeague() throws FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalLeagueHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalLeagueHome.java
index ec176da..c19af77 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalLeagueHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalLeagueHome.java
@@ -20,17 +20,17 @@
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;
- public Collection findAll()
+ public Collection findAll()
throws FinderException;
public LocalLeague findByName(String name)
- throws FinderException;
-
+ throws FinderException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalPlayerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalPlayerHome.java
index 90458e3..5777072 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalPlayerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalPlayerHome.java
@@ -20,60 +20,60 @@
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)
throws FinderException;
public Collection findByPositionsGoalkeeperOrDefender()
- throws FinderException;
-
+ throws FinderException;
+
public Collection findByNameEndingWithON()
- throws FinderException;
+ throws FinderException;
public Collection findByNullName()
- throws FinderException;
+ throws FinderException;
public Collection findByTeam(LocalTeam team)
- throws FinderException;
-
+ throws FinderException;
+
public Collection findBySalarayWithArithmeticFunctionABS(double salaray)
- throws FinderException;
+ throws FinderException;
public Collection findBySalarayWithArithmeticFunctionSQRT(double salaray)
- throws FinderException;
-
+ throws FinderException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalTeam.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalTeam.java
index 914a4cb..f87f5ee 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalTeam.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalTeam.java
@@ -31,8 +31,8 @@
public void addPlayer(LocalPlayer player);
public void dropPlayer(LocalPlayer player);
public double getSalaryOfPlayer(String playerName);
- public String getTeamNameWithStringfunctionTests1();
- public String getTeamNameWithStringfunctionTests2();
- public String getTeamNameWithStringfunctionTests3();
-
+ public String getTeamNameWithStringfunctionTests1();
+ public String getTeamNameWithStringfunctionTests2();
+ public String getTeamNameWithStringfunctionTests3();
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalTeamHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalTeamHome.java
index 884657e..c9e2a1e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalTeamHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/LocalTeamHome.java
@@ -22,17 +22,17 @@
import jakarta.ejb.FinderException;
public interface LocalTeamHome extends EJBLocalHome {
-
+
public LocalTeam create (String id, String name, String city)
throws CreateException;
-
+
public LocalTeam findByPrimaryKey (String id)
throws FinderException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException;
-
- public Collection findByPlayerAndLeague(LocalPlayer player,
+
+ public Collection findByPlayerAndLeague(LocalPlayer player,
LocalLeague league)
throws FinderException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/PlayerBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/PlayerBean.java
index 44b0a8e..7cd2890 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/PlayerBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/PlayerBean.java
@@ -29,7 +29,7 @@
public abstract String getPlayerId();
public abstract void setPlayerId(String id);
-
+
public abstract String getName();
public abstract void setName(String name);
@@ -52,20 +52,20 @@
public abstract Collection ejbSelectSports(LocalPlayer player)
throws FinderException;
-
-
+
+
// Business methods
public Collection getLeagues() throws FinderException {
- LocalPlayer player =
+ LocalPlayer player =
(team.LocalPlayer)context.getEJBLocalObject();
return ejbSelectLeagues(player);
}
public Collection getSports() throws FinderException {
- LocalPlayer player =
+ LocalPlayer player =
(team.LocalPlayer)context.getEJBLocalObject();
return ejbSelectSports(player);
}
@@ -82,32 +82,32 @@
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() { }
} // PlayerBean class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/PlayerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/PlayerHome.java
index ded9724..8459852 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/PlayerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/PlayerHome.java
@@ -26,35 +26,35 @@
public Player create (String id, String name, String position,
double salary)
throws CreateException, RemoteException;
-
+
public Player findByPrimaryKey (String id)
throws FinderException, RemoteException;
-
- public Collection findByPosition(String position)
+
+ public Collection findByPosition(String position)
throws FinderException, RemoteException;
- public Collection findByHigherSalary(String name)
+ public Collection findByHigherSalary(String name)
throws FinderException, RemoteException;
- public Collection findBySalaryRange(double low, double high)
+ public Collection findBySalaryRange(double low, double high)
throws FinderException, RemoteException;
-// public Collection findByLeague(League league)
+// public Collection findByLeague(League league)
// throws FinderException, RemoteException;
- public Collection findBySport(String sport)
+ public Collection findBySport(String sport)
throws FinderException, RemoteException;
- public Collection findByCity(String city)
+ public Collection findByCity(String city)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
- public Collection findNotOnTeam()
+ public Collection findNotOnTeam()
throws FinderException, RemoteException;
- public Collection findByPositionAndName(String position,
+ public Collection findByPositionAndName(String position,
String name) throws FinderException, RemoteException;
public Collection findByTest (String parm1, String parm2, String parm3)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/TeamBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/TeamBean.java
index 74fa4d7..b852ec3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/TeamBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/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);
@@ -39,7 +39,7 @@
// Access methods for relationship fields
-
+
public abstract Collection getPlayers();
public abstract void setPlayers(Collection players);
@@ -52,55 +52,55 @@
throws FinderException;
public abstract String ejbSelectByNameWithCONCAT(String part1, String part2)
- throws FinderException;
-
+ throws FinderException;
+
public abstract String ejbSelectByNameSubstring(String substring)
- throws FinderException;
+ throws FinderException;
public abstract String ejbSelectNameLocate(String substring)
- throws FinderException;
+ throws FinderException;
-
+
// Business methods
public double getSalaryOfPlayer(String playerName) throws FinderException {
LocalTeam team = (team.LocalTeam)context.getEJBLocalObject();
-
+
return ejbSelectSalaryOfPlayerInTeam(team, playerName);
}
-
-
+
+
public String getTeamNameWithStringfunctionTests1() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
// LocalTeam team = (team.LocalTeam) context.getEJBLocalObject();
// out.append("<BR>Name of Team : " + team.getName());
- out.append("<BR>");
+ out.append("<BR>");
out.append(ejbSelectByNameWithCONCAT("Cr", "ows"));
out.append("<BR>");
-
+
return out.toString();
}
-
+
public String getTeamNameWithStringfunctionTests2() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
out.append(ejbSelectByNameSubstring("aaaaCrowsaaaaa"));
out.append("<BR>");
return out.toString();
}
-
+
public String getTeamNameWithStringfunctionTests3() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
out.append(ejbSelectNameLocate("row"));
out.append("<BR>");
-
+
return out.toString();
}
-
+
public ArrayList getCopyOfPlayers() {
Debug.print("TeamBean getCopyOfPlayers");
@@ -151,30 +151,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/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/TeamHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/TeamHome.java
index fe13044..bcfe439 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/TeamHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/team/TeamHome.java
@@ -25,14 +25,14 @@
public Team create (String id, String name, String city)
throws CreateException, RemoteException;
-
+
public Team findByPrimaryKey (String id)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
-
- public Collection findByPlayerAndLeagueViaRemote(Player player,
+
+ public Collection findByPlayerAndLeagueViaRemote(Player player,
League league)
throws FinderException, RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/PlayerDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/PlayerDetails.java
index 81041c2..4765bce 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/PlayerDetails.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/ejb/util/PlayerDetails.java
@@ -23,7 +23,7 @@
private String position;
private double salary;
- public PlayerDetails (String id, String name, String position,
+ public PlayerDetails (String id, String name, String position,
double salary) {
this.id = id;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/servlet/RosterServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/servlet/RosterServlet.java
index 81ade04..6a3c99a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/servlet/RosterServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/servlet/RosterServlet.java
@@ -84,7 +84,7 @@
RosterHome.class);
Roster myRoster = home.create();
-
+
// deleting all exisiting DB-entries
myRoster.cleanUp();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_db2.sql
index be0c918..60756b2 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_db2.sql
@@ -3,37 +3,37 @@
DROP TABLE Team ;
DROP TABLE League ;
-CREATE TABLE Player
+CREATE TABLE Player
(
- player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- name VARCHAR(255),
- position VARCHAR(255),
- salary DOUBLE PRECISION NOT NULL
+ player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
);
-CREATE TABLE League
+CREATE TABLE League
(
- league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- name VARCHAR(255),
- sport VARCHAR(255)
+ league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ sport VARCHAR(255)
);
-CREATE TABLE Team
+CREATE TABLE Team
(
- team_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- city VARCHAR(255),
- name VARCHAR(255),
- league_Id VARCHAR(255),
- FOREIGN KEY (league_Id) REFERENCES League (league_Id)
+ team_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ 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) NOT NULL,
- team_Id VARCHAR(255) NOT NULL,
+ player_Id VARCHAR(255) NOT NULL,
+ team_Id VARCHAR(255) NOT NULL,
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)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_derby.sql
index 5ece60e..c9dcc3e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_derby.sql
@@ -3,35 +3,35 @@
DROP TABLE TEAM ;
DROP TABLE LEAGUE ;
-CREATE TABLE PLAYER
+CREATE TABLE PLAYER
(
- player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- name VARCHAR(255),
- position VARCHAR(255),
- salary DOUBLE PRECISION NOT NULL
+ player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
);
-CREATE TABLE LEAGUE
+CREATE TABLE LEAGUE
(
- league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- name VARCHAR(255),
- sport VARCHAR(255)
+ league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ sport VARCHAR(255)
);
-CREATE TABLE TEAM
+CREATE TABLE TEAM
(
- team_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- city VARCHAR(255),
- name VARCHAR(255),
- league_Id VARCHAR(255),
- FOREIGN KEY (league_Id) REFERENCES League (league_Id)
+ team_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ 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) NOT NULL,
- team_Id VARCHAR(255) NOT NULL,
+ player_Id VARCHAR(255) NOT NULL,
+ team_Id VARCHAR(255) NOT NULL,
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/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_ifx.sql
index bb4d86c..94f88d2 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_ifx.sql
@@ -3,37 +3,37 @@
DROP TABLE Team ;
DROP TABLE League ;
-CREATE TABLE Player
+CREATE TABLE Player
(
- player_Id VARCHAR(127) PRIMARY KEY,
- name VARCHAR(127),
- position VARCHAR(127),
- salary DOUBLE PRECISION NOT NULL
+ player_Id VARCHAR(127) PRIMARY KEY,
+ name VARCHAR(127),
+ position VARCHAR(127),
+ salary DOUBLE PRECISION NOT NULL
);
-CREATE TABLE League
+CREATE TABLE League
(
- league_Id VARCHAR(127) PRIMARY KEY,
- name VARCHAR(127),
- sport VARCHAR(127)
+ league_Id VARCHAR(127) PRIMARY KEY,
+ name VARCHAR(127),
+ sport VARCHAR(127)
);
-CREATE TABLE Team
+CREATE TABLE Team
(
- team_Id VARCHAR(127) PRIMARY KEY,
- city VARCHAR(127),
- name VARCHAR(127),
- league_Id VARCHAR(127),
- FOREIGN KEY (league_Id) REFERENCES League (league_Id)
+ team_Id VARCHAR(127) PRIMARY KEY,
+ city VARCHAR(127),
+ name VARCHAR(127),
+ league_Id VARCHAR(127),
+ FOREIGN KEY (league_Id) REFERENCES League (league_Id)
);
-CREATE TABLE TeamPlayer
+CREATE TABLE TeamPlayer
(
- player_Id VARCHAR(127),
- team_Id VARCHAR(127),
+ player_Id VARCHAR(127),
+ team_Id VARCHAR(127),
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)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_mssql.sql
index 787488f..bad9d5a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_mssql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_mssql.sql
@@ -1,40 +1,40 @@
drop table TEAMPLAYER
-drop table PLAYER
+drop table PLAYER
drop table TEAM
drop TABLE LEAGUE
go
-create table PLAYER
+create table PLAYER
(
- PLAYER_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- POSITION VARCHAR(255),
- SALARY double precision not null
+ PLAYER_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY double precision not null
)
-create table LEAGUE
+create table LEAGUE
(
- LEAGUE_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- SPORT VARCHAR(255)
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
)
-create table TEAM
+create table TEAM
(
- TEAM_ID VARCHAR(255) primary key not null,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- foreign key (LEAGUE_ID) references LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) primary key not null,
+ 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) not null,
+ PLAYER_ID VARCHAR(255) not null,
TEAM_ID VARCHAR(255) not null,
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)
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_mysql.sql
index d763757..43f42ce 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_mysql.sql
@@ -3,33 +3,33 @@
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
) ENGINE=INNODB;
-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)
) ENGINE=INNODB;
-CREATE TABLE TEAM
+CREATE TABLE TEAM
(
- TEAM_ID VARCHAR(255) PRIMARY KEY,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255)
+ TEAM_ID VARCHAR(255) PRIMARY KEY,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255)
) ENGINE=INNODB;
-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)
) ENGINE=INNODB;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_ora.sql
index 4b4a547..17fabbb 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_ora.sql
@@ -3,37 +3,37 @@
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)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_pbs.sql
index 3f6f5d2..6b190ce 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_pbs.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_pbs.sql
@@ -5,42 +5,42 @@
commit;
-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
);
commit;
-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)
);
commit;
-CREATE TABLE Team
+CREATE TABLE Team
(
- team_Id VARCHAR(255) PRIMARY KEY,
- city VARCHAR(255),
- name VARCHAR(255),
- league_Id VARCHAR(255),
+ team_Id VARCHAR(255) PRIMARY KEY,
+ city VARCHAR(255),
+ name VARCHAR(255),
+ league_Id VARCHAR(255),
CONSTRAINT FK_1 FOREIGN KEY (league_Id) REFERENCES League (league_Id)
);
commit;
-CREATE TABLE TeamPlayer
+CREATE TABLE TeamPlayer
(
- player_Id VARCHAR(255),
- team_Id VARCHAR(255),
- CONSTRAINT FK_2 FOREIGN KEY (team_Id) REFERENCES Team (team_Id),
- CONSTRAINT FK_3 FOREIGN KEY (player_Id) REFERENCES Player (player_Id)
+ player_Id VARCHAR(255),
+ team_Id VARCHAR(255),
+ CONSTRAINT FK_2 FOREIGN KEY (team_Id) REFERENCES Team (team_Id),
+ CONSTRAINT FK_3 FOREIGN KEY (player_Id) REFERENCES Player (player_Id)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_psql.sql
index a6baf3e..7fddb4b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_psql.sql
@@ -3,40 +3,40 @@
DROP TABLE TEAM cascade;
DROP TABLE LEAGUE cascade;
-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/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_syb.sql
index 0c73ef3..40040c5 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_syb.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterGenDBSchema/sql/RosterApp_syb.sql
@@ -1,40 +1,40 @@
drop table TEAMPLAYER
-drop table PLAYER
+drop table PLAYER
drop table TEAM
drop TABLE LEAGUE
go
-create table PLAYER
+create table PLAYER
(
- PLAYER_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- POSITION VARCHAR(255),
- SALARY double precision not null
+ PLAYER_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY double precision not null
)
-create table LEAGUE
+create table LEAGUE
(
- LEAGUE_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- SPORT VARCHAR(255)
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
)
-create table TEAM
+create table TEAM
(
- TEAM_ID VARCHAR(255) primary key not null,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- foreign key (LEAGUE_ID) references LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) primary key not null,
+ 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) not null,
+ PLAYER_ID VARCHAR(255) not null,
TEAM_ID VARCHAR(255) not null,
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)
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/build.properties
index 7f7f23c..f95c4f9 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/build.properties
@@ -15,13 +15,13 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="rosterJava2DB"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
-<property name="test.client"
- value="RosterClient"/>
+<property name="test.client"\u0020
+ value="RosterClient"/>
<property name="application.xml" value="descriptor/application.xml"/>
<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
@@ -34,10 +34,10 @@
<property name="sun-cmp-mappings-team.xml" value="descriptor/sun-cmp-mappings-team.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="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}"/>
@@ -47,7 +47,7 @@
<property name="hasWebclient" value="true"/>
<property name="web.xml"
- value="descriptor/web.xml"/>
+ value="descriptor/web.xml"/>
<property name="sun-web.xml"
- value="descriptor/sun-web.xml"/>
+ value="descriptor/sun-web.xml"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/build.xml
index 443c8a0..cfdd1b6 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/build.xml
@@ -38,7 +38,7 @@
<delete file="${sun-cmp-mappings.xml}"/>
<antcall target="clean-common"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -46,39 +46,39 @@
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
- <antcall target="compile-common">
+ <antcall target="compile-common">
<param name="src" value="servlet"/>
</antcall>
</target>
<target name="package-team-jar" >
- <antcall target="package-ejbjar-common">
-
+ <antcall target="package-ejbjar-common">
+
<param name="dbschema" value="${basedir}/ejb/team/RosterSchema.dbschema" />
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="team/Local*.class, team/League*.class, team/Player*.class, team/Team*.class, util/*.class, RosterSchema.dbschema" />
<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="ejb.jar" value="${assemble.dir}/team-ejb.jar" />
-
+
</antcall>
</target>
<target name="package-roster-jar" >
- <antcall target="package-ejbjar-common">
-
- <param name="ejbjar.classes"
+ <antcall target="package-ejbjar-common">
+
+ <param name="ejbjar.classes"
value="team/Local*.class, team/League.class, team/LeagueHome.class, team/Player.class, team/PlayerHome.class, team/Team.class, team/TeamHome.class,,util/*.class,roster/*.class" />
<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="ejb.jar" value="${assemble.dir}/roster-ejb.jar" />
-
+
</antcall>
</target>
@@ -86,17 +86,17 @@
<antcall target="webclient-war-common">
<param name="hasWebclient" value="true"/>
- <param name="war.classes"
+ <param name="war.classes"
value="**/RosterServlet.class" />
- </antcall>
-
+ </antcall>
+
</target>
<target name="package-appclient" >
<mkdir dir="${assemble.dir}"/>
<antcall target="package-appclientjar-common">
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/RosterClient.class, **/Roster.class, **/RosterHome.class, util/*.class" />
<param name="application-client.xml"
value="${application-client.xml}" />
@@ -117,15 +117,15 @@
<property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
- <copy file="${basedir}/descriptor/INDEX.LIST" todir="${TEMPDIR}/META-INF" failonerror="false"/>
+ <copy file="${basedir}/descriptor/INDEX.LIST" todir="${TEMPDIR}/META-INF" failonerror="false"/>
<ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}">
- <fileset dir="${assemble.dir}">
- <include name="*.jar"/>
- <include name="*.war"/>
- </fileset>
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ <include name="*.war"/>
+ </fileset>
- <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
</ear>
</target>
@@ -141,16 +141,16 @@
<antcall target="package-ear" />
- </target>
+ </target>
-
- <target name="deploy"
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common">
- <param name="extra-params"
- value="--uniquetablenames=true --dropandcreatetables=true"/>
- </antcall>
+ <param name="extra-params"
+ value="--uniquetablenames=true --dropandcreatetables=true"/>
+ </antcall>
</target>
<target name="create-resources" depends="init-common">
@@ -164,19 +164,19 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/client/RosterClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/client/RosterClient.java
index 166bdf2..948ff3d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/client/RosterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/client/RosterClient.java
@@ -43,32 +43,32 @@
public static void main(String[] args) {
try {
- System.out.println("START");
+ System.out.println("START");
stat.addDescription("rosterJava2DB");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleRosterExt");
- RosterHome home =
- (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
RosterHome.class);
Roster myRoster = home.create();
-
+
insertInfo(myRoster);
getSomeInfo(myRoster);
getMoreInfo(myRoster);
- stat.addStatus("ejbclient rosterJava2DB ", stat.PASS);
+ stat.addStatus("ejbclient rosterJava2DB ", stat.PASS);
stat.printSummary("rosterJava2DB");
System.exit(0);
} catch (Exception ex) {
System.err.println("Caught an exception:");
- ex.printStackTrace();
- stat.addStatus("ejbclient rosterJava2DB ", stat.FAIL);
+ ex.printStackTrace();
+ stat.addStatus("ejbclient rosterJava2DB ", stat.FAIL);
stat.printSummary("rosterJava2DB");
}
stat.printSummary("rosterJava2DB");
@@ -137,16 +137,16 @@
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");
playerList = myRoster.getPlayersByLeagueId("L1");
playerList = myRoster.getPlayersByHigherSalary("Ian Carlyle");
-
+
printDetailsList(playerList);
-
+
playerList = myRoster.getPlayersBySalaryRange(500.00, 800.00);
playerList = myRoster.getPlayersOfTeamCopy("T5");
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/ejb-jar-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/ejb-jar-team.xml
index 704c802..856bbb8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/ejb-jar-team.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/descriptor/ejb-jar-team.xml
@@ -25,7 +25,7 @@
<display-name>LeagueEJB</display-name>
<ejb-name>LeagueEJB</ejb-name>
<home>team.LeagueHome</home>
- <remote>team.League</remote>
+ <remote>team.League</remote>
<local-home>team.LocalLeagueHome</local-home>
<local>team.LocalLeague</local>
<ejb-class>team.LeagueBean</ejb-class>
@@ -143,7 +143,7 @@
</query-method>
<result-type-mapping>Remote</result-type-mapping>
<ejb-ql>select Object(p) from League l, in(l.teams) as t, in(t.players) p where l = ?1</ejb-ql>
- </query>
+ </query>
</entity>
<entity>
<display-name>TeamEJB</display-name>
@@ -246,7 +246,7 @@
</method-params>
</query-method>
<ejb-ql>select distinct t.name from Team t where LOCATE(?1, t.name) > 0 AND LOCATE(?1, t.name) < LENGTH(t.name)</ejb-ql>
- </query>
+ </query>
</entity>
<entity>
<display-name>PlayerEJB</display-name>
@@ -288,7 +288,7 @@
<method-name>findNotOnTeam</method-name>
<method-params />
</query-method>
- <ejb-ql>select object(p) from Player p
+ <ejb-ql>select object(p) from Player p
where p.teams is empty</ejb-ql>
</query>
<query>
@@ -474,7 +474,7 @@
</method-params>
</query-method>
<ejb-ql>select object(p) from Player p where p.salary = SQRT(?1)</ejb-ql>
- </query>
+ </query>
</entity>
</enterprise-beans>
<relationships>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/Roster.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/Roster.java
index 692a185..279aab7 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/Roster.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/Roster.java
@@ -27,55 +27,55 @@
import java.util.Set;
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)
@@ -83,84 +83,84 @@
public ArrayList getSportsOfPlayer(String playerId)
throws RemoteException;
-
+
public double getSalaryOfPlayerFromTeam(String teamID, String playerName)
throws RemoteException;
public ArrayList getPlayersOfLeague(String leagueId)
- throws RemoteException;
-
+ throws RemoteException;
+
public ArrayList getPlayersWithPositionsGoalkeeperOrDefender()
- throws RemoteException;
+ throws RemoteException;
- public ArrayList getPlayersWithNameEndingWithON()
+ public ArrayList getPlayersWithNameEndingWithON()
throws RemoteException;
public ArrayList getPlayersWithNullName()
- throws RemoteException;
+ throws RemoteException;
public ArrayList getPlayersWithTeam(String teamId)
throws RemoteException;
-
- public ArrayList getPlayersWithSalaryUsingABS(double salary)
- throws RemoteException;
- public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ public ArrayList getPlayersWithSalaryUsingABS(double salary)
throws RemoteException;
-
-
+
+ public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ throws RemoteException;
+
+
// 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;
public ArrayList getTeamsByPlayerAndLeague(String playerKey,
String leagueKey)
- throws RemoteException;
-
+ throws RemoteException;
+
public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
String leagueKey)
- throws RemoteException;
+ throws RemoteException;
-
+
public Set getCitiesOfLeague(String leagueKey) throws RemoteException;
public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
+ throws RemoteException;
public String getTeamsNameOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
+ throws RemoteException;
public String getTeamNameVariations(String teamId) throws RemoteException;
public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
-
-
+ 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;
public LeagueDetails getLeagueByName(String name)
throws RemoteException;
-
+
// Test
public ArrayList getRemoteTeamsOfLeague(String leagueKey) throws RemoteException;
@@ -169,7 +169,7 @@
public ArrayList testFinder(String parm1, String parm2, String parm3)
throws RemoteException;
-
+
public void cleanUp() throws FinderException, RemoveException, RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/RosterBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/RosterBean.java
index 386979b..36b95b3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/RosterBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/RosterBean.java
@@ -52,19 +52,19 @@
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);
@@ -75,7 +75,7 @@
}
}
- public void removePlayer(String playerId) {
+ public void removePlayer(String playerId) {
Debug.print("RosterBean removePlayer");
try {
@@ -85,7 +85,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public void dropPlayer(String playerId, String teamId) {
Debug.print("RosterBean dropPlayer");
@@ -113,7 +113,7 @@
} // getPlayer
- public ArrayList getPlayersOfTeam(String teamId) {
+ public ArrayList getPlayersOfTeam(String teamId) {
Debug.print("RosterBean getPlayersOfTeam");
Collection players = null;
@@ -128,7 +128,7 @@
} // getPlayersOfTeam
- public ArrayList getPlayersOfTeamCopy(String teamId) {
+ public ArrayList getPlayersOfTeamCopy(String teamId) {
Debug.print("RosterBean getPlayersOfTeamCopy");
ArrayList playersList = null;
@@ -145,7 +145,7 @@
} // getPlayersOfTeamCopy
- public ArrayList getTeamsOfLeague(String leagueId) {
+ public ArrayList getTeamsOfLeague(String leagueId) {
Debug.print("RosterBean getTeamsOfLeague");
@@ -186,7 +186,7 @@
} // getPlayersByPosition
- public ArrayList getPlayersByHigherSalary(String name) {
+ public ArrayList getPlayersByHigherSalary(String name) {
Debug.print("RosterBean getPlayersByByHigherSalary");
Collection players = null;
@@ -200,7 +200,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;
@@ -214,7 +214,7 @@
return copyPlayersToDetails(players);
} // getPlayersBySalaryRange
- public ArrayList getPlayersByLeagueId(String leagueId) {
+ public ArrayList getPlayersByLeagueId(String leagueId) {
Debug.print("RosterBean getPlayersByLeagueId");
Collection players = null;
@@ -229,7 +229,7 @@
return copyPlayersToDetails(players);
} // getPlayersByLeagueId
- public ArrayList getPlayersBySport(String sport) {
+ public ArrayList getPlayersBySport(String sport) {
Debug.print("RosterBean getPlayersBySport");
Collection players = null;
@@ -243,7 +243,7 @@
return copyPlayersToDetails(players);
} // getPlayersBySport
- public ArrayList getPlayersByCity(String city) {
+ public ArrayList getPlayersByCity(String city) {
Debug.print("RosterBean getPlayersByCity");
Collection players = null;
@@ -257,7 +257,7 @@
return copyPlayersToDetails(players);
} // getPlayersByCity
- public ArrayList getAllPlayers() {
+ public ArrayList getAllPlayers() {
Debug.print("RosterBean getAllPlayers");
Collection players = null;
@@ -271,7 +271,7 @@
return copyPlayersToDetails(players);
} // getAllPlayers
- public ArrayList getPlayersNotOnTeam() {
+ public ArrayList getPlayersNotOnTeam() {
Debug.print("RosterBean getPlayersNotOnTeam");
Collection players = null;
@@ -285,8 +285,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;
@@ -300,7 +300,7 @@
return copyPlayersToDetails(players);
} // getPlayersByPositionAndName
- public ArrayList getLeaguesOfPlayer(String playerId) {
+ public ArrayList getLeaguesOfPlayer(String playerId) {
Debug.print("RosterBean getLeaguesOfPlayer");
ArrayList detailsList = new ArrayList();
@@ -312,7 +312,7 @@
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
Iterator i = leagues.iterator();
while (i.hasNext()) {
LocalLeague league = (LocalLeague) i.next();
@@ -323,7 +323,7 @@
return detailsList;
} // getLeaguesOfPlayer
- public ArrayList getSportsOfPlayer(String playerId) {
+ public ArrayList getSportsOfPlayer(String playerId) {
Debug.print("RosterBean getSportsOfPlayer");
ArrayList sportsList = new ArrayList();
@@ -335,7 +335,7 @@
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
Iterator i = sports.iterator();
while (i.hasNext()) {
String sport = (String) i.next();
@@ -346,8 +346,8 @@
// 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);
@@ -358,8 +358,8 @@
throw new EJBException(ex.getMessage());
}
}
-
- public void removeTeam(String teamId) {
+
+ public void removeTeam(String teamId) {
Debug.print("RosterBean removeTeam");
try {
@@ -369,7 +369,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public TeamDetails getTeam(String teamId) {
Debug.print("RosterBean getTeam");
@@ -387,18 +387,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 {
@@ -408,7 +408,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public LeagueDetails getLeague(String leagueId) {
Debug.print("RosterBean getLeague");
@@ -422,7 +422,7 @@
}
return leagueDetails;
}
-
+
// SessionBean methods
public void ejbCreate() throws CreateException {
@@ -470,51 +470,51 @@
public RosterBean() {}
public void ejbRemove() {}
public void setSessionContext(SessionContext sc) {}
-
+
// Private methods
private LocalPlayerHome lookupPlayer() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimplePlayerExt");
return (LocalPlayerHome) objref;
}
private LocalTeamHome lookupTeam() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleTeamExt");
return (LocalTeamHome) objref;
}
private LocalLeagueHome lookupLeague() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleLeagueExt");
return (LocalLeagueHome) objref;
}
private PlayerHome lookupRemotePlayer() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemotePlayerExt");
return (PlayerHome) objref;
}
private TeamHome lookupRemoteTeam() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteTeamExt");
return (TeamHome) objref;
}
private LeagueHome lookupRemoteLeague() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteLeagueExt");
return (LeagueHome) objref;
}
-
+
private ArrayList copyPlayersToDetails(Collection players) {
ArrayList detailsList = new ArrayList();
@@ -544,15 +544,15 @@
return detailsList;
} // copyPlayersToDetails
-
+
/**
- * dirty cleanUp method only EJBs with hardcoded PK will be removed
+ * dirty cleanUp method only EJBs with hardcoded PK will be removed
*/
public void cleanUp() {
- Debug.print("Cleaning up the database");
+ Debug.print("Cleaning up the database");
Collection toClean = null;
Iterator it = null;
-
+
try {
//removing the player EJBs
toClean = playerHome.findAll();
@@ -560,33 +560,33 @@
while (it.hasNext()) {
((LocalPlayer)it.next()).remove();
}
-
+
// removing the team EJBs
toClean = teamHome.findAll();
it = toClean.iterator();
while (it.hasNext()) {
((LocalTeam)it.next()).remove();
}
-
+
// removing the league EJBs
toClean = leagueHome.findAll();
it = toClean.iterator();
while (it.hasNext()) {
((LocalLeague)it.next()).remove();
- }
- Debug.print("Cleaning up the database ... done!");
+ }
+ Debug.print("Cleaning up the database ... done!");
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
}
-
+
/**
- *
+ *
* @param name
* @return
*/
public LeagueDetails getLeagueByName(String name) {
-
+
Debug.print("RosterBean getLeagueByName (SingleObjectFinder)");
LeagueDetails leagueDetails = null;
try {
@@ -598,12 +598,12 @@
}
return leagueDetails;
- }
+ }
// getLeagueByName()
-
+
/**
- *
+ *
* @param playerKey
* @param leagueKey
* @return
@@ -612,13 +612,13 @@
String leagueKey) {
Debug.print("RosterBean getTeamsByPlayerAndLeague");
- ArrayList detailsList = new ArrayList();
+ ArrayList detailsList = new ArrayList();
Collection teamsColl = null;
try {
LocalPlayer player = playerHome.findByPrimaryKey(playerKey);
- LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
- teamsColl = teamHome.findByPlayerAndLeague(player, league);
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
+ teamsColl = teamHome.findByPlayerAndLeague(player, league);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
@@ -632,11 +632,11 @@
detailsList.add(details);
}
- return detailsList;
- }
+ return detailsList;
+ }
/**
- *
+ *
* @param playerKey
* @param leagueKey
* @return
@@ -645,17 +645,17 @@
String leagueKey) {
Debug.print("RosterBean getTeamsByPlayerAndLeagueViaRemote");
- ArrayList detailsList = new ArrayList();
+ ArrayList detailsList = new ArrayList();
Collection teamsColl = null;
try {
Debug.print(" ----- finding ....");
Player player = remPlayerHome.findByPrimaryKey(playerKey);
Debug.print(" ----- Player found");
- League league = remLeagueHome.findByPrimaryKey(leagueKey);
+ League league = remLeagueHome.findByPrimaryKey(leagueKey);
Debug.print(" ----- League found");
teamsColl = remTeamHome.findByPlayerAndLeagueViaRemote(player, league);
- Debug.print(" ----- Team found");
+ Debug.print(" ----- Team found");
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
@@ -674,45 +674,45 @@
}
- return detailsList;
- }
-
+ return detailsList;
+ }
+
/**
- *
+ *
* @param city
* @return
*/
public Set getCitiesOfLeague(String leagueKey) {
-
+
Debug.print("RosterBean getCitiesOfLeague(leagueKey)");
- LocalLeague league;
+ LocalLeague league;
Set cities;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
- cities = league.getCitiesOfThisLeague();
+ cities = league.getCitiesOfThisLeague();
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
-
+
return cities;
}// getCitiesOfLeague()
public ArrayList getRemoteTeamsOfLeague(String leagueKey) {
-
+
Debug.print("RosterBean getRemoteTeamsOfLeague(leagueKey)");
- ArrayList detailsList = new ArrayList();
- League league;
+ ArrayList detailsList = new ArrayList();
+ League league;
Set teams;
-
+
try {
league = remLeagueHome.findByPrimaryKey(leagueKey);
- teams = league.getRemoteTeamsOfThisLeague();
+ teams = league.getRemoteTeamsOfThisLeague();
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
try {
@@ -727,12 +727,12 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return detailsList;
}
-
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -741,7 +741,7 @@
Debug.print("RosterBean getTeamOfLeagueByCity(leagueKey, city)");
LocalLeague league;
LocalTeam team;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
team = league.getTeamByCity(city);
@@ -749,13 +749,13 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
}// getTeamOfLeagueByCity()
-
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -764,7 +764,7 @@
Debug.print("RosterBean getTeamsNameOfLeagueByCity(leagueKey, city)");
LocalLeague league;
String teamName;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
teamName = league.getTeamsNameByCity(city);
@@ -772,14 +772,14 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return teamName;
}// getTeamsNameOfLeagueByCity()
-
-
+
+
/**
- *
+ *
* @param teamID
* @param playerName
* @return
@@ -788,21 +788,21 @@
Debug.print("RosterBean getSalaryOfPlayerFromTeam(teamKey, playerKey)");
LocalTeam team;
double salary;
-
+
try {
- team = teamHome.findByPrimaryKey(teamID);
- salary = team.getSalaryOfPlayer(playerName);
+ team = teamHome.findByPrimaryKey(teamID);
+ salary = team.getSalaryOfPlayer(playerName);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return salary;
+
+ return salary;
}// getSalaryOfPlayerFromTeam()
-
-
+
+
/**
- *
+ *
* @param leagueId
* @return
*/
@@ -810,7 +810,7 @@
Debug.print("RosterBean getPlayersOfLeague(leagueId)");
LocalLeague league;
Set players;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueId);
players = league.getPlayersFromLeague();
@@ -818,12 +818,12 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return copyPlayersToDetails(players);
+
+ return copyPlayersToDetails(players);
}// getPlayersOfLeague()
-
+
/**
- *
+ *
* @param leagueId
* @return
*/
@@ -840,68 +840,68 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return result;
+
+ return result;
}// getPlayersOfLeague()
-
+
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithPositionsGoalkeeperOrDefender() {
Debug.print("RosterBean getPlayersWithPositionsGoalkeeperOrDefender()");
Collection players = null;
-
+
try {
players = playerHome.findByPositionsGoalkeeperOrDefender();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithPositionsGoalkeeperOrDefender()
-
+
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithNameEndingWithON() {
Debug.print("RosterBean getPlayersWithNameEndingWithON()");
Collection players = null;
-
+
try {
players = playerHome.findByNameEndingWithON();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithNameEndingWithON()
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithNullName() {
Debug.print("RosterBean getPlayersWithNullName()");
Collection players = null;
-
+
try {
players = playerHome.findByNullName();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithNullName()
/**
- *
+ *
* @param teamId
* @return
*/
@@ -909,7 +909,7 @@
Debug.print("RosterBean getPlayersWithTeam(teamId)");
LocalTeam team;
Collection players = null;
-
+
try {
team = teamHome.findByPrimaryKey(teamId);
players = playerHome.findByTeam(team);
@@ -917,13 +917,13 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithTeam()
-
-
+
+
/**
- *
+ *
* @param teamId
* @return
*/
@@ -931,7 +931,7 @@
Debug.print("RosterBean getTeamNameVariations(teamId)");
LocalTeam team;
StringBuffer out = new StringBuffer();
-
+
try {
team = teamHome.findByPrimaryKey(teamId);
Debug.print("--- CONCAT");
@@ -939,59 +939,59 @@
Debug.print("--- SUBSTRING");
out.append(team.getTeamNameWithStringfunctionTests2());
Debug.print("--- LOCATE AND LENGTH");
- out.append(team.getTeamNameWithStringfunctionTests3());
+ out.append(team.getTeamNameWithStringfunctionTests3());
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
-
+
return out.toString();
}// getTeamNameVariations()
-
-
+
+
/**
- *
+ *
* @param salary
* @return
*/
public ArrayList getPlayersWithSalaryUsingABS(double salary) {
Debug.print("RosterBean getPlayersWithSalaryUsingABS(salary)");
Collection players = null;
-
+
try {
players = playerHome.findBySalarayWithArithmeticFunctionABS(salary);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithSalaryUsingABS()
/**
- *
+ *
* @param salary
* @return
*/
public ArrayList getPlayersWithSalaryUsingSQRT(double salary) {
Debug.print("RosterBean getPlayersWithSalaryUsingSQRT(salary)");
Collection players = null;
-
+
try {
players = playerHome.findBySalarayWithArithmeticFunctionSQRT(salary);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithSalaryUsingSQRT()
-
-
-
+
+
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -1001,20 +1001,20 @@
League league;
Team team;
TeamDetails teamDetails;
-
+
try {
league = remLeagueHome.findByPrimaryKey(leagueKey);
team = league.getRemoteTeamByCity(city);
- teamDetails = new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
+ teamDetails = new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return teamDetails;
}// getRemoteTeamOfLeagueByCity()
-
- public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) {
+
+ public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) {
Debug.print("RosterBean getPlayersByLeagueId");
Collection players = null;
@@ -1029,5 +1029,5 @@
return copyPlayersToDetails(players);
} // getPlayersByLeagueId
-
-} // RosterBean
+
+} // RosterBean
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/RosterHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/RosterHome.java
index cecd462..b874ad4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/RosterHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/roster/RosterHome.java
@@ -22,6 +22,6 @@
import jakarta.ejb.EJBHome;
public interface RosterHome extends EJBHome {
-
+
Roster create() throws RemoteException, CreateException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/League.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/League.java
index b0b8e1b..96e3703 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/League.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/League.java
@@ -29,15 +29,15 @@
public String getSport() throws RemoteException;
public Collection getTeams() throws RemoteException;
- public Team getRemoteTeamByCity(String city) throws FinderException,
+ public Team getRemoteTeamByCity(String city) throws FinderException,
RemoteException;
-
- public Set getRemoteTeamsOfThisLeague() throws FinderException,
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException,
RemoteException;
- public Collection getRemotePlayersFromLeague() throws FinderException,
+ public Collection getRemotePlayersFromLeague() throws FinderException,
RemoteException;
-
+
// public void addTeam(Team team) throws RemoteException;
// public void dropTeam(Team team) throws RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LeagueBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LeagueBean.java
index 38d3806..fce92de 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LeagueBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/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);
@@ -50,7 +50,7 @@
public abstract Set ejbSelectRemoteTeams(League league)
throws FinderException;
-
+
public abstract LocalTeam ejbSelectTeamByCity(String city)
throws FinderException;
@@ -60,63 +60,63 @@
public abstract String ejbSelectTeamsNameByCity(String city)
throws FinderException;
-
+
public abstract Set ejbSelectPlayersByLeague(LocalLeague league)
throws FinderException;
public abstract Collection ejbSelectRemotePlayersByLeague(League league)
throws FinderException;
-
+
// Business methods
public Set getCitiesOfThisLeague() throws FinderException {
-
- LocalLeague league =
+
+ LocalLeague league =
(team.LocalLeague)context.getEJBLocalObject();
-
- return ejbSelectTeamsCity(league);
+
+ return ejbSelectTeamsCity(league);
}
public Set getRemoteTeamsOfThisLeague() throws FinderException {
-
+
League league = (team.League)context.getEJBObject();
-
- return ejbSelectRemoteTeams(league);
+
+ return ejbSelectRemoteTeams(league);
}
-
+
public LocalTeam getTeamByCity(String city) throws FinderException {
-
+
return ejbSelectTeamByCity(city);
}
public Team getRemoteTeamByCity(String city) throws FinderException {
-
+
return ejbSelectRemoteTeamByCity(city);
}
-
+
public String getTeamsNameByCity(String city) throws FinderException {
-
+
return ejbSelectTeamsNameByCity(city);
}
-
+
public Set getPlayersFromLeague() throws FinderException{
-
+
LocalLeague league = (team.LocalLeague)context.getEJBLocalObject();
-
+
return ejbSelectPlayersByLeague(league);
- }
-
+ }
+
public Collection getRemotePlayersFromLeague() throws FinderException{
-
+
League league = (team.League)context.getEJBObject();
-
+
return ejbSelectRemotePlayersByLeague(league);
- }
-
-
+ }
+
+
public void addTeam(LocalTeam team) {
Debug.print("TeamBean addTeam");
@@ -150,32 +150,32 @@
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() { }
} // LeagueBean class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LeagueHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LeagueHome.java
index 22a734a..8bc0782 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LeagueHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LeagueHome.java
@@ -25,14 +25,14 @@
public League create (String id, String name, String sport)
throws CreateException, RemoteException;
-
+
public League findByPrimaryKey (String id)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
public League findByName(String name)
- throws FinderException, RemoteException;
-
+ throws FinderException, RemoteException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalLeague.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalLeague.java
index f2eb046..a144617 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalLeague.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalLeague.java
@@ -33,5 +33,5 @@
public LocalTeam getTeamByCity(String city) throws FinderException;
public String getTeamsNameByCity(String city) throws FinderException;
public Set getPlayersFromLeague() throws FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalLeagueHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalLeagueHome.java
index ec176da..c19af77 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalLeagueHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalLeagueHome.java
@@ -20,17 +20,17 @@
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;
- public Collection findAll()
+ public Collection findAll()
throws FinderException;
public LocalLeague findByName(String name)
- throws FinderException;
-
+ throws FinderException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalPlayerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalPlayerHome.java
index 90458e3..5777072 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalPlayerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalPlayerHome.java
@@ -20,60 +20,60 @@
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)
throws FinderException;
public Collection findByPositionsGoalkeeperOrDefender()
- throws FinderException;
-
+ throws FinderException;
+
public Collection findByNameEndingWithON()
- throws FinderException;
+ throws FinderException;
public Collection findByNullName()
- throws FinderException;
+ throws FinderException;
public Collection findByTeam(LocalTeam team)
- throws FinderException;
-
+ throws FinderException;
+
public Collection findBySalarayWithArithmeticFunctionABS(double salaray)
- throws FinderException;
+ throws FinderException;
public Collection findBySalarayWithArithmeticFunctionSQRT(double salaray)
- throws FinderException;
-
+ throws FinderException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalTeam.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalTeam.java
index 914a4cb..f87f5ee 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalTeam.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalTeam.java
@@ -31,8 +31,8 @@
public void addPlayer(LocalPlayer player);
public void dropPlayer(LocalPlayer player);
public double getSalaryOfPlayer(String playerName);
- public String getTeamNameWithStringfunctionTests1();
- public String getTeamNameWithStringfunctionTests2();
- public String getTeamNameWithStringfunctionTests3();
-
+ public String getTeamNameWithStringfunctionTests1();
+ public String getTeamNameWithStringfunctionTests2();
+ public String getTeamNameWithStringfunctionTests3();
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalTeamHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalTeamHome.java
index 884657e..c9e2a1e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalTeamHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/LocalTeamHome.java
@@ -22,17 +22,17 @@
import jakarta.ejb.FinderException;
public interface LocalTeamHome extends EJBLocalHome {
-
+
public LocalTeam create (String id, String name, String city)
throws CreateException;
-
+
public LocalTeam findByPrimaryKey (String id)
throws FinderException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException;
-
- public Collection findByPlayerAndLeague(LocalPlayer player,
+
+ public Collection findByPlayerAndLeague(LocalPlayer player,
LocalLeague league)
throws FinderException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/PlayerBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/PlayerBean.java
index 44b0a8e..7cd2890 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/PlayerBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/PlayerBean.java
@@ -29,7 +29,7 @@
public abstract String getPlayerId();
public abstract void setPlayerId(String id);
-
+
public abstract String getName();
public abstract void setName(String name);
@@ -52,20 +52,20 @@
public abstract Collection ejbSelectSports(LocalPlayer player)
throws FinderException;
-
-
+
+
// Business methods
public Collection getLeagues() throws FinderException {
- LocalPlayer player =
+ LocalPlayer player =
(team.LocalPlayer)context.getEJBLocalObject();
return ejbSelectLeagues(player);
}
public Collection getSports() throws FinderException {
- LocalPlayer player =
+ LocalPlayer player =
(team.LocalPlayer)context.getEJBLocalObject();
return ejbSelectSports(player);
}
@@ -82,32 +82,32 @@
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() { }
} // PlayerBean class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/PlayerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/PlayerHome.java
index ded9724..8459852 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/PlayerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/PlayerHome.java
@@ -26,35 +26,35 @@
public Player create (String id, String name, String position,
double salary)
throws CreateException, RemoteException;
-
+
public Player findByPrimaryKey (String id)
throws FinderException, RemoteException;
-
- public Collection findByPosition(String position)
+
+ public Collection findByPosition(String position)
throws FinderException, RemoteException;
- public Collection findByHigherSalary(String name)
+ public Collection findByHigherSalary(String name)
throws FinderException, RemoteException;
- public Collection findBySalaryRange(double low, double high)
+ public Collection findBySalaryRange(double low, double high)
throws FinderException, RemoteException;
-// public Collection findByLeague(League league)
+// public Collection findByLeague(League league)
// throws FinderException, RemoteException;
- public Collection findBySport(String sport)
+ public Collection findBySport(String sport)
throws FinderException, RemoteException;
- public Collection findByCity(String city)
+ public Collection findByCity(String city)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
- public Collection findNotOnTeam()
+ public Collection findNotOnTeam()
throws FinderException, RemoteException;
- public Collection findByPositionAndName(String position,
+ public Collection findByPositionAndName(String position,
String name) throws FinderException, RemoteException;
public Collection findByTest (String parm1, String parm2, String parm3)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/TeamBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/TeamBean.java
index 74fa4d7..b852ec3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/TeamBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/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);
@@ -39,7 +39,7 @@
// Access methods for relationship fields
-
+
public abstract Collection getPlayers();
public abstract void setPlayers(Collection players);
@@ -52,55 +52,55 @@
throws FinderException;
public abstract String ejbSelectByNameWithCONCAT(String part1, String part2)
- throws FinderException;
-
+ throws FinderException;
+
public abstract String ejbSelectByNameSubstring(String substring)
- throws FinderException;
+ throws FinderException;
public abstract String ejbSelectNameLocate(String substring)
- throws FinderException;
+ throws FinderException;
-
+
// Business methods
public double getSalaryOfPlayer(String playerName) throws FinderException {
LocalTeam team = (team.LocalTeam)context.getEJBLocalObject();
-
+
return ejbSelectSalaryOfPlayerInTeam(team, playerName);
}
-
-
+
+
public String getTeamNameWithStringfunctionTests1() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
// LocalTeam team = (team.LocalTeam) context.getEJBLocalObject();
// out.append("<BR>Name of Team : " + team.getName());
- out.append("<BR>");
+ out.append("<BR>");
out.append(ejbSelectByNameWithCONCAT("Cr", "ows"));
out.append("<BR>");
-
+
return out.toString();
}
-
+
public String getTeamNameWithStringfunctionTests2() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
out.append(ejbSelectByNameSubstring("aaaaCrowsaaaaa"));
out.append("<BR>");
return out.toString();
}
-
+
public String getTeamNameWithStringfunctionTests3() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
out.append(ejbSelectNameLocate("row"));
out.append("<BR>");
-
+
return out.toString();
}
-
+
public ArrayList getCopyOfPlayers() {
Debug.print("TeamBean getCopyOfPlayers");
@@ -151,30 +151,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/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/TeamHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/TeamHome.java
index fe13044..bcfe439 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/TeamHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/team/TeamHome.java
@@ -25,14 +25,14 @@
public Team create (String id, String name, String city)
throws CreateException, RemoteException;
-
+
public Team findByPrimaryKey (String id)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
-
- public Collection findByPlayerAndLeagueViaRemote(Player player,
+
+ public Collection findByPlayerAndLeagueViaRemote(Player player,
League league)
throws FinderException, RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/PlayerDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/PlayerDetails.java
index 81041c2..4765bce 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/PlayerDetails.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/ejb/util/PlayerDetails.java
@@ -23,7 +23,7 @@
private String position;
private double salary;
- public PlayerDetails (String id, String name, String position,
+ public PlayerDetails (String id, String name, String position,
double salary) {
this.id = id;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/servlet/RosterServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/servlet/RosterServlet.java
index 81ade04..6a3c99a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/servlet/RosterServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterJava2DB/servlet/RosterServlet.java
@@ -84,7 +84,7 @@
RosterHome.class);
Roster myRoster = home.create();
-
+
// deleting all exisiting DB-entries
myRoster.cleanUp();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/build.properties
index 26c78ce..c1ec894 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/build.properties
@@ -15,13 +15,13 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="rosterVC"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
-<property name="test.client"
- value="RosterClient"/>
+<property name="test.client"\u0020
+ value="RosterClient"/>
<property name="application.xml" value="descriptor/application.xml"/>
<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
@@ -34,10 +34,10 @@
<property name="sun-cmp-mappings-team.xml" value="descriptor/sun-cmp-mappings-team.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="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}"/>
@@ -47,7 +47,7 @@
<property name="hasWebclient" value="true"/>
<property name="web.xml"
- value="descriptor/web.xml"/>
+ value="descriptor/web.xml"/>
<property name="sun-web.xml"
- value="descriptor/sun-web.xml"/>
+ value="descriptor/sun-web.xml"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/build.xml
index 50fc05c..9c8cd8a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/build.xml
@@ -38,7 +38,7 @@
<delete file="${sun-cmp-mappings.xml}"/>
<antcall target="clean-common"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -46,40 +46,40 @@
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
- <antcall target="compile-common">
+ <antcall target="compile-common">
<param name="src" value="servlet"/>
</antcall>
</target>
<target name="package-team-jar" >
- <antcall target="package-ejbjar-common">
-
+ <antcall target="package-ejbjar-common">
+
<param name="dbschema" value="${basedir}/ejb/team/RosterSchemaVC.dbschema" />
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="team/Local*.class, team/League*.class, team/Player*.class, team/Team*.class, util/*.class, RosterSchemaVC.dbschema" />
<param name="ejb-jar.xml" value="${ejb-jar-team.xml}" />
<param name="sun-ejb-jar.xml" value="${sun-ejb-jar-team.xml}" />
- <param name="sun-cmp-mappings.xml" value="${sun-cmp-mappings-team.xml}" />
+ <param name="sun-cmp-mappings.xml" value="${sun-cmp-mappings-team.xml}" />
<param name="ejbjar.files" value="${build.classes.dir}" />
<param name="ejb.jar" value="${assemble.dir}/team-ejb.jar" />
-
+
</antcall>
</target>
<target name="package-roster-jar" >
- <antcall target="package-ejbjar-common">
-
- <param name="ejbjar.classes"
+ <antcall target="package-ejbjar-common">
+
+ <param name="ejbjar.classes"
value="team/Local*.class, team/League.class, team/LeagueHome.class, team/Player.class, team/PlayerHome.class, team/Team.class, team/TeamHome.class,,util/*.class,roster/*.class" />
<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="ejb.jar" value="${assemble.dir}/roster-ejb.jar" />
-
+
</antcall>
</target>
@@ -87,17 +87,17 @@
<antcall target="webclient-war-common">
<param name="hasWebclient" value="true"/>
- <param name="war.classes"
+ <param name="war.classes"
value="**/RosterServlet.class" />
- </antcall>
-
+ </antcall>
+
</target>
<target name="package-appclient" >
<mkdir dir="${assemble.dir}"/>
<antcall target="package-appclientjar-common">
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/RosterClient.class, **/Roster.class, **/RosterHome.class, util/*.class" />
<param name="application-client.xml"
value="${application-client.xml}" />
@@ -118,24 +118,24 @@
<property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
- <mkdir dir="${TEMPDIR}/src" />
+ <mkdir dir="${TEMPDIR}/src" />
<copy todir="${TEMPDIR}/src" >
<fileset dir="${basedir}/ejb" />
</copy>
- <mkdir dir="${TEMPDIR}/src/client" />
+ <mkdir dir="${TEMPDIR}/src/client" />
<copy todir="${TEMPDIR}/src/client" file="${basedir}/client/RosterClient.java" />
<copy todir="${TEMPDIR}/src/client" file="${basedir}/servlet/RosterServlet.java" />
- <copy file="${basedir}/descriptor/INDEX.LIST" todir="${TEMPDIR}/META-INF" failonerror="false"/>
+ <copy file="${basedir}/descriptor/INDEX.LIST" todir="${TEMPDIR}/META-INF" failonerror="false"/>
<ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}">
- <fileset dir="${assemble.dir}">
- <include name="*.jar"/>
- <include name="*.war"/>
- </fileset>
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ <include name="*.war"/>
+ </fileset>
<fileset dir="${TEMPDIR}" />
- <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
</ear>
</target>
@@ -148,16 +148,16 @@
<antcall target="package-webclient-war" />
<antcall target="package-appclient" />
<antcall target="package-ear" />
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="${basedir}/sql/RosterVCApp_derby.sql"/>
</antcall>
<antcall target="deploy-common">
- <param name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
- </antcall>
+ <param name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
+ </antcall>
</target>
<target name="create-resources" depends="init-common">
@@ -171,25 +171,25 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common">
- <param name="deployedapp.name" value="${assemble.dir}/${appname}App"/>
+ <param name="deployedapp.name" value="${assemble.dir}/${appname}App"/>
</antcall>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="${basedir}/sql/drop_RosterVCApp_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/client/RosterClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/client/RosterClient.java
index f4cab5c..6a3acfb 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/client/RosterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/client/RosterClient.java
@@ -28,16 +28,16 @@
public class RosterClient {
private static SimpleReporterAdapter stat =
- new SimpleReporterAdapter("appserv-tests");
+ new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
try {
- stat.addDescription("RosterAppExt");
+ stat.addDescription("RosterAppExt");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleRosterExt");
- RosterHome home =
- (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
RosterHome.class);
Roster myRoster = home.create();
@@ -47,9 +47,9 @@
// getMoreInfo(myRoster);
- stat.addStatus("ejbclient RosterAppExt", stat.PASS);
- stat.printSummary("RosterAppExt");
- System.exit(0);
+ stat.addStatus("ejbclient RosterAppExt", stat.PASS);
+ stat.printSummary("RosterAppExt");
+ System.exit(0);
} catch (Exception ex) {
System.err.println("Caught an exception:");
@@ -85,7 +85,7 @@
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
}
} // getSomeInfo
@@ -123,7 +123,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");
@@ -141,7 +141,7 @@
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
}
} // getMoreInfo
@@ -175,7 +175,7 @@
myRoster.createTeamInLeague(new TeamDetails(
"T2", "Gophers", "Manteca"), "L1");
-
+
myRoster.createTeamInLeague(new TeamDetails(
"T3", "Deer", "Bodie"), "L2");
@@ -299,7 +299,7 @@
myRoster.createPlayer(new PlayerDetails(
"P26", "Hobie Jackson", "pitcher", 582.00));
-
+
myRoster.createPlayer(new PlayerDetails(
"P27", "Melinda Kendall", "catcher", 677.00));
@@ -313,7 +313,7 @@
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
}
} // insertInfo
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/ejb-jar-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/ejb-jar-team.xml
index 704c802..856bbb8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/ejb-jar-team.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/descriptor/ejb-jar-team.xml
@@ -25,7 +25,7 @@
<display-name>LeagueEJB</display-name>
<ejb-name>LeagueEJB</ejb-name>
<home>team.LeagueHome</home>
- <remote>team.League</remote>
+ <remote>team.League</remote>
<local-home>team.LocalLeagueHome</local-home>
<local>team.LocalLeague</local>
<ejb-class>team.LeagueBean</ejb-class>
@@ -143,7 +143,7 @@
</query-method>
<result-type-mapping>Remote</result-type-mapping>
<ejb-ql>select Object(p) from League l, in(l.teams) as t, in(t.players) p where l = ?1</ejb-ql>
- </query>
+ </query>
</entity>
<entity>
<display-name>TeamEJB</display-name>
@@ -246,7 +246,7 @@
</method-params>
</query-method>
<ejb-ql>select distinct t.name from Team t where LOCATE(?1, t.name) > 0 AND LOCATE(?1, t.name) < LENGTH(t.name)</ejb-ql>
- </query>
+ </query>
</entity>
<entity>
<display-name>PlayerEJB</display-name>
@@ -288,7 +288,7 @@
<method-name>findNotOnTeam</method-name>
<method-params />
</query-method>
- <ejb-ql>select object(p) from Player p
+ <ejb-ql>select object(p) from Player p
where p.teams is empty</ejb-ql>
</query>
<query>
@@ -474,7 +474,7 @@
</method-params>
</query-method>
<ejb-ql>select object(p) from Player p where p.salary = SQRT(?1)</ejb-ql>
- </query>
+ </query>
</entity>
</enterprise-beans>
<relationships>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/Roster.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/Roster.java
index 692a185..279aab7 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/Roster.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/Roster.java
@@ -27,55 +27,55 @@
import java.util.Set;
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)
@@ -83,84 +83,84 @@
public ArrayList getSportsOfPlayer(String playerId)
throws RemoteException;
-
+
public double getSalaryOfPlayerFromTeam(String teamID, String playerName)
throws RemoteException;
public ArrayList getPlayersOfLeague(String leagueId)
- throws RemoteException;
-
+ throws RemoteException;
+
public ArrayList getPlayersWithPositionsGoalkeeperOrDefender()
- throws RemoteException;
+ throws RemoteException;
- public ArrayList getPlayersWithNameEndingWithON()
+ public ArrayList getPlayersWithNameEndingWithON()
throws RemoteException;
public ArrayList getPlayersWithNullName()
- throws RemoteException;
+ throws RemoteException;
public ArrayList getPlayersWithTeam(String teamId)
throws RemoteException;
-
- public ArrayList getPlayersWithSalaryUsingABS(double salary)
- throws RemoteException;
- public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ public ArrayList getPlayersWithSalaryUsingABS(double salary)
throws RemoteException;
-
-
+
+ public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ throws RemoteException;
+
+
// 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;
public ArrayList getTeamsByPlayerAndLeague(String playerKey,
String leagueKey)
- throws RemoteException;
-
+ throws RemoteException;
+
public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
String leagueKey)
- throws RemoteException;
+ throws RemoteException;
-
+
public Set getCitiesOfLeague(String leagueKey) throws RemoteException;
public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
+ throws RemoteException;
public String getTeamsNameOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
+ throws RemoteException;
public String getTeamNameVariations(String teamId) throws RemoteException;
public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
-
-
+ 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;
public LeagueDetails getLeagueByName(String name)
throws RemoteException;
-
+
// Test
public ArrayList getRemoteTeamsOfLeague(String leagueKey) throws RemoteException;
@@ -169,7 +169,7 @@
public ArrayList testFinder(String parm1, String parm2, String parm3)
throws RemoteException;
-
+
public void cleanUp() throws FinderException, RemoveException, RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/RosterBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/RosterBean.java
index 386979b..36b95b3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/RosterBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/RosterBean.java
@@ -52,19 +52,19 @@
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);
@@ -75,7 +75,7 @@
}
}
- public void removePlayer(String playerId) {
+ public void removePlayer(String playerId) {
Debug.print("RosterBean removePlayer");
try {
@@ -85,7 +85,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public void dropPlayer(String playerId, String teamId) {
Debug.print("RosterBean dropPlayer");
@@ -113,7 +113,7 @@
} // getPlayer
- public ArrayList getPlayersOfTeam(String teamId) {
+ public ArrayList getPlayersOfTeam(String teamId) {
Debug.print("RosterBean getPlayersOfTeam");
Collection players = null;
@@ -128,7 +128,7 @@
} // getPlayersOfTeam
- public ArrayList getPlayersOfTeamCopy(String teamId) {
+ public ArrayList getPlayersOfTeamCopy(String teamId) {
Debug.print("RosterBean getPlayersOfTeamCopy");
ArrayList playersList = null;
@@ -145,7 +145,7 @@
} // getPlayersOfTeamCopy
- public ArrayList getTeamsOfLeague(String leagueId) {
+ public ArrayList getTeamsOfLeague(String leagueId) {
Debug.print("RosterBean getTeamsOfLeague");
@@ -186,7 +186,7 @@
} // getPlayersByPosition
- public ArrayList getPlayersByHigherSalary(String name) {
+ public ArrayList getPlayersByHigherSalary(String name) {
Debug.print("RosterBean getPlayersByByHigherSalary");
Collection players = null;
@@ -200,7 +200,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;
@@ -214,7 +214,7 @@
return copyPlayersToDetails(players);
} // getPlayersBySalaryRange
- public ArrayList getPlayersByLeagueId(String leagueId) {
+ public ArrayList getPlayersByLeagueId(String leagueId) {
Debug.print("RosterBean getPlayersByLeagueId");
Collection players = null;
@@ -229,7 +229,7 @@
return copyPlayersToDetails(players);
} // getPlayersByLeagueId
- public ArrayList getPlayersBySport(String sport) {
+ public ArrayList getPlayersBySport(String sport) {
Debug.print("RosterBean getPlayersBySport");
Collection players = null;
@@ -243,7 +243,7 @@
return copyPlayersToDetails(players);
} // getPlayersBySport
- public ArrayList getPlayersByCity(String city) {
+ public ArrayList getPlayersByCity(String city) {
Debug.print("RosterBean getPlayersByCity");
Collection players = null;
@@ -257,7 +257,7 @@
return copyPlayersToDetails(players);
} // getPlayersByCity
- public ArrayList getAllPlayers() {
+ public ArrayList getAllPlayers() {
Debug.print("RosterBean getAllPlayers");
Collection players = null;
@@ -271,7 +271,7 @@
return copyPlayersToDetails(players);
} // getAllPlayers
- public ArrayList getPlayersNotOnTeam() {
+ public ArrayList getPlayersNotOnTeam() {
Debug.print("RosterBean getPlayersNotOnTeam");
Collection players = null;
@@ -285,8 +285,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;
@@ -300,7 +300,7 @@
return copyPlayersToDetails(players);
} // getPlayersByPositionAndName
- public ArrayList getLeaguesOfPlayer(String playerId) {
+ public ArrayList getLeaguesOfPlayer(String playerId) {
Debug.print("RosterBean getLeaguesOfPlayer");
ArrayList detailsList = new ArrayList();
@@ -312,7 +312,7 @@
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
Iterator i = leagues.iterator();
while (i.hasNext()) {
LocalLeague league = (LocalLeague) i.next();
@@ -323,7 +323,7 @@
return detailsList;
} // getLeaguesOfPlayer
- public ArrayList getSportsOfPlayer(String playerId) {
+ public ArrayList getSportsOfPlayer(String playerId) {
Debug.print("RosterBean getSportsOfPlayer");
ArrayList sportsList = new ArrayList();
@@ -335,7 +335,7 @@
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
Iterator i = sports.iterator();
while (i.hasNext()) {
String sport = (String) i.next();
@@ -346,8 +346,8 @@
// 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);
@@ -358,8 +358,8 @@
throw new EJBException(ex.getMessage());
}
}
-
- public void removeTeam(String teamId) {
+
+ public void removeTeam(String teamId) {
Debug.print("RosterBean removeTeam");
try {
@@ -369,7 +369,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public TeamDetails getTeam(String teamId) {
Debug.print("RosterBean getTeam");
@@ -387,18 +387,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 {
@@ -408,7 +408,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public LeagueDetails getLeague(String leagueId) {
Debug.print("RosterBean getLeague");
@@ -422,7 +422,7 @@
}
return leagueDetails;
}
-
+
// SessionBean methods
public void ejbCreate() throws CreateException {
@@ -470,51 +470,51 @@
public RosterBean() {}
public void ejbRemove() {}
public void setSessionContext(SessionContext sc) {}
-
+
// Private methods
private LocalPlayerHome lookupPlayer() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimplePlayerExt");
return (LocalPlayerHome) objref;
}
private LocalTeamHome lookupTeam() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleTeamExt");
return (LocalTeamHome) objref;
}
private LocalLeagueHome lookupLeague() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleLeagueExt");
return (LocalLeagueHome) objref;
}
private PlayerHome lookupRemotePlayer() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemotePlayerExt");
return (PlayerHome) objref;
}
private TeamHome lookupRemoteTeam() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteTeamExt");
return (TeamHome) objref;
}
private LeagueHome lookupRemoteLeague() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteLeagueExt");
return (LeagueHome) objref;
}
-
+
private ArrayList copyPlayersToDetails(Collection players) {
ArrayList detailsList = new ArrayList();
@@ -544,15 +544,15 @@
return detailsList;
} // copyPlayersToDetails
-
+
/**
- * dirty cleanUp method only EJBs with hardcoded PK will be removed
+ * dirty cleanUp method only EJBs with hardcoded PK will be removed
*/
public void cleanUp() {
- Debug.print("Cleaning up the database");
+ Debug.print("Cleaning up the database");
Collection toClean = null;
Iterator it = null;
-
+
try {
//removing the player EJBs
toClean = playerHome.findAll();
@@ -560,33 +560,33 @@
while (it.hasNext()) {
((LocalPlayer)it.next()).remove();
}
-
+
// removing the team EJBs
toClean = teamHome.findAll();
it = toClean.iterator();
while (it.hasNext()) {
((LocalTeam)it.next()).remove();
}
-
+
// removing the league EJBs
toClean = leagueHome.findAll();
it = toClean.iterator();
while (it.hasNext()) {
((LocalLeague)it.next()).remove();
- }
- Debug.print("Cleaning up the database ... done!");
+ }
+ Debug.print("Cleaning up the database ... done!");
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
}
-
+
/**
- *
+ *
* @param name
* @return
*/
public LeagueDetails getLeagueByName(String name) {
-
+
Debug.print("RosterBean getLeagueByName (SingleObjectFinder)");
LeagueDetails leagueDetails = null;
try {
@@ -598,12 +598,12 @@
}
return leagueDetails;
- }
+ }
// getLeagueByName()
-
+
/**
- *
+ *
* @param playerKey
* @param leagueKey
* @return
@@ -612,13 +612,13 @@
String leagueKey) {
Debug.print("RosterBean getTeamsByPlayerAndLeague");
- ArrayList detailsList = new ArrayList();
+ ArrayList detailsList = new ArrayList();
Collection teamsColl = null;
try {
LocalPlayer player = playerHome.findByPrimaryKey(playerKey);
- LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
- teamsColl = teamHome.findByPlayerAndLeague(player, league);
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
+ teamsColl = teamHome.findByPlayerAndLeague(player, league);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
@@ -632,11 +632,11 @@
detailsList.add(details);
}
- return detailsList;
- }
+ return detailsList;
+ }
/**
- *
+ *
* @param playerKey
* @param leagueKey
* @return
@@ -645,17 +645,17 @@
String leagueKey) {
Debug.print("RosterBean getTeamsByPlayerAndLeagueViaRemote");
- ArrayList detailsList = new ArrayList();
+ ArrayList detailsList = new ArrayList();
Collection teamsColl = null;
try {
Debug.print(" ----- finding ....");
Player player = remPlayerHome.findByPrimaryKey(playerKey);
Debug.print(" ----- Player found");
- League league = remLeagueHome.findByPrimaryKey(leagueKey);
+ League league = remLeagueHome.findByPrimaryKey(leagueKey);
Debug.print(" ----- League found");
teamsColl = remTeamHome.findByPlayerAndLeagueViaRemote(player, league);
- Debug.print(" ----- Team found");
+ Debug.print(" ----- Team found");
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
@@ -674,45 +674,45 @@
}
- return detailsList;
- }
-
+ return detailsList;
+ }
+
/**
- *
+ *
* @param city
* @return
*/
public Set getCitiesOfLeague(String leagueKey) {
-
+
Debug.print("RosterBean getCitiesOfLeague(leagueKey)");
- LocalLeague league;
+ LocalLeague league;
Set cities;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
- cities = league.getCitiesOfThisLeague();
+ cities = league.getCitiesOfThisLeague();
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
-
+
return cities;
}// getCitiesOfLeague()
public ArrayList getRemoteTeamsOfLeague(String leagueKey) {
-
+
Debug.print("RosterBean getRemoteTeamsOfLeague(leagueKey)");
- ArrayList detailsList = new ArrayList();
- League league;
+ ArrayList detailsList = new ArrayList();
+ League league;
Set teams;
-
+
try {
league = remLeagueHome.findByPrimaryKey(leagueKey);
- teams = league.getRemoteTeamsOfThisLeague();
+ teams = league.getRemoteTeamsOfThisLeague();
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
try {
@@ -727,12 +727,12 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return detailsList;
}
-
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -741,7 +741,7 @@
Debug.print("RosterBean getTeamOfLeagueByCity(leagueKey, city)");
LocalLeague league;
LocalTeam team;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
team = league.getTeamByCity(city);
@@ -749,13 +749,13 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
}// getTeamOfLeagueByCity()
-
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -764,7 +764,7 @@
Debug.print("RosterBean getTeamsNameOfLeagueByCity(leagueKey, city)");
LocalLeague league;
String teamName;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
teamName = league.getTeamsNameByCity(city);
@@ -772,14 +772,14 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return teamName;
}// getTeamsNameOfLeagueByCity()
-
-
+
+
/**
- *
+ *
* @param teamID
* @param playerName
* @return
@@ -788,21 +788,21 @@
Debug.print("RosterBean getSalaryOfPlayerFromTeam(teamKey, playerKey)");
LocalTeam team;
double salary;
-
+
try {
- team = teamHome.findByPrimaryKey(teamID);
- salary = team.getSalaryOfPlayer(playerName);
+ team = teamHome.findByPrimaryKey(teamID);
+ salary = team.getSalaryOfPlayer(playerName);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return salary;
+
+ return salary;
}// getSalaryOfPlayerFromTeam()
-
-
+
+
/**
- *
+ *
* @param leagueId
* @return
*/
@@ -810,7 +810,7 @@
Debug.print("RosterBean getPlayersOfLeague(leagueId)");
LocalLeague league;
Set players;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueId);
players = league.getPlayersFromLeague();
@@ -818,12 +818,12 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return copyPlayersToDetails(players);
+
+ return copyPlayersToDetails(players);
}// getPlayersOfLeague()
-
+
/**
- *
+ *
* @param leagueId
* @return
*/
@@ -840,68 +840,68 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return result;
+
+ return result;
}// getPlayersOfLeague()
-
+
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithPositionsGoalkeeperOrDefender() {
Debug.print("RosterBean getPlayersWithPositionsGoalkeeperOrDefender()");
Collection players = null;
-
+
try {
players = playerHome.findByPositionsGoalkeeperOrDefender();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithPositionsGoalkeeperOrDefender()
-
+
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithNameEndingWithON() {
Debug.print("RosterBean getPlayersWithNameEndingWithON()");
Collection players = null;
-
+
try {
players = playerHome.findByNameEndingWithON();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithNameEndingWithON()
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithNullName() {
Debug.print("RosterBean getPlayersWithNullName()");
Collection players = null;
-
+
try {
players = playerHome.findByNullName();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithNullName()
/**
- *
+ *
* @param teamId
* @return
*/
@@ -909,7 +909,7 @@
Debug.print("RosterBean getPlayersWithTeam(teamId)");
LocalTeam team;
Collection players = null;
-
+
try {
team = teamHome.findByPrimaryKey(teamId);
players = playerHome.findByTeam(team);
@@ -917,13 +917,13 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithTeam()
-
-
+
+
/**
- *
+ *
* @param teamId
* @return
*/
@@ -931,7 +931,7 @@
Debug.print("RosterBean getTeamNameVariations(teamId)");
LocalTeam team;
StringBuffer out = new StringBuffer();
-
+
try {
team = teamHome.findByPrimaryKey(teamId);
Debug.print("--- CONCAT");
@@ -939,59 +939,59 @@
Debug.print("--- SUBSTRING");
out.append(team.getTeamNameWithStringfunctionTests2());
Debug.print("--- LOCATE AND LENGTH");
- out.append(team.getTeamNameWithStringfunctionTests3());
+ out.append(team.getTeamNameWithStringfunctionTests3());
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
-
+
return out.toString();
}// getTeamNameVariations()
-
-
+
+
/**
- *
+ *
* @param salary
* @return
*/
public ArrayList getPlayersWithSalaryUsingABS(double salary) {
Debug.print("RosterBean getPlayersWithSalaryUsingABS(salary)");
Collection players = null;
-
+
try {
players = playerHome.findBySalarayWithArithmeticFunctionABS(salary);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithSalaryUsingABS()
/**
- *
+ *
* @param salary
* @return
*/
public ArrayList getPlayersWithSalaryUsingSQRT(double salary) {
Debug.print("RosterBean getPlayersWithSalaryUsingSQRT(salary)");
Collection players = null;
-
+
try {
players = playerHome.findBySalarayWithArithmeticFunctionSQRT(salary);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithSalaryUsingSQRT()
-
-
-
+
+
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -1001,20 +1001,20 @@
League league;
Team team;
TeamDetails teamDetails;
-
+
try {
league = remLeagueHome.findByPrimaryKey(leagueKey);
team = league.getRemoteTeamByCity(city);
- teamDetails = new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
+ teamDetails = new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return teamDetails;
}// getRemoteTeamOfLeagueByCity()
-
- public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) {
+
+ public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) {
Debug.print("RosterBean getPlayersByLeagueId");
Collection players = null;
@@ -1029,5 +1029,5 @@
return copyPlayersToDetails(players);
} // getPlayersByLeagueId
-
-} // RosterBean
+
+} // RosterBean
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/RosterHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/RosterHome.java
index cecd462..b874ad4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/RosterHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/roster/RosterHome.java
@@ -22,6 +22,6 @@
import jakarta.ejb.EJBHome;
public interface RosterHome extends EJBHome {
-
+
Roster create() throws RemoteException, CreateException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/League.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/League.java
index b0b8e1b..96e3703 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/League.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/League.java
@@ -29,15 +29,15 @@
public String getSport() throws RemoteException;
public Collection getTeams() throws RemoteException;
- public Team getRemoteTeamByCity(String city) throws FinderException,
+ public Team getRemoteTeamByCity(String city) throws FinderException,
RemoteException;
-
- public Set getRemoteTeamsOfThisLeague() throws FinderException,
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException,
RemoteException;
- public Collection getRemotePlayersFromLeague() throws FinderException,
+ public Collection getRemotePlayersFromLeague() throws FinderException,
RemoteException;
-
+
// public void addTeam(Team team) throws RemoteException;
// public void dropTeam(Team team) throws RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LeagueBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LeagueBean.java
index 38d3806..fce92de 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LeagueBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/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);
@@ -50,7 +50,7 @@
public abstract Set ejbSelectRemoteTeams(League league)
throws FinderException;
-
+
public abstract LocalTeam ejbSelectTeamByCity(String city)
throws FinderException;
@@ -60,63 +60,63 @@
public abstract String ejbSelectTeamsNameByCity(String city)
throws FinderException;
-
+
public abstract Set ejbSelectPlayersByLeague(LocalLeague league)
throws FinderException;
public abstract Collection ejbSelectRemotePlayersByLeague(League league)
throws FinderException;
-
+
// Business methods
public Set getCitiesOfThisLeague() throws FinderException {
-
- LocalLeague league =
+
+ LocalLeague league =
(team.LocalLeague)context.getEJBLocalObject();
-
- return ejbSelectTeamsCity(league);
+
+ return ejbSelectTeamsCity(league);
}
public Set getRemoteTeamsOfThisLeague() throws FinderException {
-
+
League league = (team.League)context.getEJBObject();
-
- return ejbSelectRemoteTeams(league);
+
+ return ejbSelectRemoteTeams(league);
}
-
+
public LocalTeam getTeamByCity(String city) throws FinderException {
-
+
return ejbSelectTeamByCity(city);
}
public Team getRemoteTeamByCity(String city) throws FinderException {
-
+
return ejbSelectRemoteTeamByCity(city);
}
-
+
public String getTeamsNameByCity(String city) throws FinderException {
-
+
return ejbSelectTeamsNameByCity(city);
}
-
+
public Set getPlayersFromLeague() throws FinderException{
-
+
LocalLeague league = (team.LocalLeague)context.getEJBLocalObject();
-
+
return ejbSelectPlayersByLeague(league);
- }
-
+ }
+
public Collection getRemotePlayersFromLeague() throws FinderException{
-
+
League league = (team.League)context.getEJBObject();
-
+
return ejbSelectRemotePlayersByLeague(league);
- }
-
-
+ }
+
+
public void addTeam(LocalTeam team) {
Debug.print("TeamBean addTeam");
@@ -150,32 +150,32 @@
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() { }
} // LeagueBean class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LeagueHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LeagueHome.java
index 22a734a..8bc0782 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LeagueHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LeagueHome.java
@@ -25,14 +25,14 @@
public League create (String id, String name, String sport)
throws CreateException, RemoteException;
-
+
public League findByPrimaryKey (String id)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
public League findByName(String name)
- throws FinderException, RemoteException;
-
+ throws FinderException, RemoteException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalLeague.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalLeague.java
index f2eb046..a144617 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalLeague.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalLeague.java
@@ -33,5 +33,5 @@
public LocalTeam getTeamByCity(String city) throws FinderException;
public String getTeamsNameByCity(String city) throws FinderException;
public Set getPlayersFromLeague() throws FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalLeagueHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalLeagueHome.java
index ec176da..c19af77 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalLeagueHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalLeagueHome.java
@@ -20,17 +20,17 @@
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;
- public Collection findAll()
+ public Collection findAll()
throws FinderException;
public LocalLeague findByName(String name)
- throws FinderException;
-
+ throws FinderException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalPlayerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalPlayerHome.java
index 90458e3..5777072 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalPlayerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalPlayerHome.java
@@ -20,60 +20,60 @@
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)
throws FinderException;
public Collection findByPositionsGoalkeeperOrDefender()
- throws FinderException;
-
+ throws FinderException;
+
public Collection findByNameEndingWithON()
- throws FinderException;
+ throws FinderException;
public Collection findByNullName()
- throws FinderException;
+ throws FinderException;
public Collection findByTeam(LocalTeam team)
- throws FinderException;
-
+ throws FinderException;
+
public Collection findBySalarayWithArithmeticFunctionABS(double salaray)
- throws FinderException;
+ throws FinderException;
public Collection findBySalarayWithArithmeticFunctionSQRT(double salaray)
- throws FinderException;
-
+ throws FinderException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalTeam.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalTeam.java
index 914a4cb..f87f5ee 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalTeam.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalTeam.java
@@ -31,8 +31,8 @@
public void addPlayer(LocalPlayer player);
public void dropPlayer(LocalPlayer player);
public double getSalaryOfPlayer(String playerName);
- public String getTeamNameWithStringfunctionTests1();
- public String getTeamNameWithStringfunctionTests2();
- public String getTeamNameWithStringfunctionTests3();
-
+ public String getTeamNameWithStringfunctionTests1();
+ public String getTeamNameWithStringfunctionTests2();
+ public String getTeamNameWithStringfunctionTests3();
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalTeamHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalTeamHome.java
index 884657e..c9e2a1e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalTeamHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/LocalTeamHome.java
@@ -22,17 +22,17 @@
import jakarta.ejb.FinderException;
public interface LocalTeamHome extends EJBLocalHome {
-
+
public LocalTeam create (String id, String name, String city)
throws CreateException;
-
+
public LocalTeam findByPrimaryKey (String id)
throws FinderException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException;
-
- public Collection findByPlayerAndLeague(LocalPlayer player,
+
+ public Collection findByPlayerAndLeague(LocalPlayer player,
LocalLeague league)
throws FinderException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/PlayerBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/PlayerBean.java
index 44b0a8e..7cd2890 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/PlayerBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/PlayerBean.java
@@ -29,7 +29,7 @@
public abstract String getPlayerId();
public abstract void setPlayerId(String id);
-
+
public abstract String getName();
public abstract void setName(String name);
@@ -52,20 +52,20 @@
public abstract Collection ejbSelectSports(LocalPlayer player)
throws FinderException;
-
-
+
+
// Business methods
public Collection getLeagues() throws FinderException {
- LocalPlayer player =
+ LocalPlayer player =
(team.LocalPlayer)context.getEJBLocalObject();
return ejbSelectLeagues(player);
}
public Collection getSports() throws FinderException {
- LocalPlayer player =
+ LocalPlayer player =
(team.LocalPlayer)context.getEJBLocalObject();
return ejbSelectSports(player);
}
@@ -82,32 +82,32 @@
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() { }
} // PlayerBean class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/PlayerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/PlayerHome.java
index ded9724..8459852 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/PlayerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/PlayerHome.java
@@ -26,35 +26,35 @@
public Player create (String id, String name, String position,
double salary)
throws CreateException, RemoteException;
-
+
public Player findByPrimaryKey (String id)
throws FinderException, RemoteException;
-
- public Collection findByPosition(String position)
+
+ public Collection findByPosition(String position)
throws FinderException, RemoteException;
- public Collection findByHigherSalary(String name)
+ public Collection findByHigherSalary(String name)
throws FinderException, RemoteException;
- public Collection findBySalaryRange(double low, double high)
+ public Collection findBySalaryRange(double low, double high)
throws FinderException, RemoteException;
-// public Collection findByLeague(League league)
+// public Collection findByLeague(League league)
// throws FinderException, RemoteException;
- public Collection findBySport(String sport)
+ public Collection findBySport(String sport)
throws FinderException, RemoteException;
- public Collection findByCity(String city)
+ public Collection findByCity(String city)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
- public Collection findNotOnTeam()
+ public Collection findNotOnTeam()
throws FinderException, RemoteException;
- public Collection findByPositionAndName(String position,
+ public Collection findByPositionAndName(String position,
String name) throws FinderException, RemoteException;
public Collection findByTest (String parm1, String parm2, String parm3)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/TeamBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/TeamBean.java
index 74fa4d7..b852ec3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/TeamBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/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);
@@ -39,7 +39,7 @@
// Access methods for relationship fields
-
+
public abstract Collection getPlayers();
public abstract void setPlayers(Collection players);
@@ -52,55 +52,55 @@
throws FinderException;
public abstract String ejbSelectByNameWithCONCAT(String part1, String part2)
- throws FinderException;
-
+ throws FinderException;
+
public abstract String ejbSelectByNameSubstring(String substring)
- throws FinderException;
+ throws FinderException;
public abstract String ejbSelectNameLocate(String substring)
- throws FinderException;
+ throws FinderException;
-
+
// Business methods
public double getSalaryOfPlayer(String playerName) throws FinderException {
LocalTeam team = (team.LocalTeam)context.getEJBLocalObject();
-
+
return ejbSelectSalaryOfPlayerInTeam(team, playerName);
}
-
-
+
+
public String getTeamNameWithStringfunctionTests1() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
// LocalTeam team = (team.LocalTeam) context.getEJBLocalObject();
// out.append("<BR>Name of Team : " + team.getName());
- out.append("<BR>");
+ out.append("<BR>");
out.append(ejbSelectByNameWithCONCAT("Cr", "ows"));
out.append("<BR>");
-
+
return out.toString();
}
-
+
public String getTeamNameWithStringfunctionTests2() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
out.append(ejbSelectByNameSubstring("aaaaCrowsaaaaa"));
out.append("<BR>");
return out.toString();
}
-
+
public String getTeamNameWithStringfunctionTests3() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
out.append(ejbSelectNameLocate("row"));
out.append("<BR>");
-
+
return out.toString();
}
-
+
public ArrayList getCopyOfPlayers() {
Debug.print("TeamBean getCopyOfPlayers");
@@ -151,30 +151,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/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/TeamHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/TeamHome.java
index fe13044..bcfe439 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/TeamHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/team/TeamHome.java
@@ -25,14 +25,14 @@
public Team create (String id, String name, String city)
throws CreateException, RemoteException;
-
+
public Team findByPrimaryKey (String id)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
-
- public Collection findByPlayerAndLeagueViaRemote(Player player,
+
+ public Collection findByPlayerAndLeagueViaRemote(Player player,
League league)
throws FinderException, RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/PlayerDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/PlayerDetails.java
index 81041c2..4765bce 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/PlayerDetails.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/ejb/util/PlayerDetails.java
@@ -23,7 +23,7 @@
private String position;
private double salary;
- public PlayerDetails (String id, String name, String position,
+ public PlayerDetails (String id, String name, String position,
double salary) {
this.id = id;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/servlet/RosterServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/servlet/RosterServlet.java
index 81ade04..6a3c99a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/servlet/RosterServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/servlet/RosterServlet.java
@@ -84,7 +84,7 @@
RosterHome.class);
Roster myRoster = home.create();
-
+
// deleting all exisiting DB-entries
myRoster.cleanUp();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_db2.sql
index 7759ed1..9e105aa 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_db2.sql
@@ -7,40 +7,40 @@
DROP TABLE TEAM;
DROP TABLE LEAGUE;
-CREATE TABLE PLAYER
+CREATE TABLE PLAYER
(
- PLAYER_ID VARCHAR(255) PRIMARY KEY NOT NULL,
- NAME VARCHAR(255),
- POSITION VARCHAR(255),
- SALARY DOUBLE PRECISION NOT NULL,
- VERSION NUMERIC(19) NOT NULL
+ PLAYER_ID VARCHAR(255) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL,
+ VERSION NUMERIC(19) NOT NULL
);
-CREATE TABLE LEAGUE
+CREATE TABLE LEAGUE
(
- LEAGUE_ID VARCHAR(255) PRIMARY KEY NOT NULL,
- NAME VARCHAR(255),
- SPORT VARCHAR(255),
- VERSION NUMERIC(19) NOT NULL
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMERIC(19) NOT NULL
);
-CREATE TABLE TEAM
+CREATE TABLE TEAM
(
- TEAM_ID VARCHAR(255) PRIMARY KEY NOT NULL,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- VERSION NUMERIC(19) NOT NULL,
- FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) PRIMARY KEY NOT NULL,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255),
+ VERSION NUMERIC(19) NOT NULL,
+ FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
);
-CREATE TABLE TEAMPLAYER
+CREATE TABLE TEAMPLAYER
(
- PLAYER_ID VARCHAR(255) NOT NULL,
- TEAM_ID VARCHAR(255) NOT NULL,
+ PLAYER_ID VARCHAR(255) NOT NULL,
+ TEAM_ID VARCHAR(255) NOT NULL,
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)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_derby.sql
index 9017a72..b064828 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_derby.sql
@@ -7,40 +7,40 @@
DROP TABLE TEAM;
DROP TABLE LEAGUE;
-CREATE TABLE PLAYER
+CREATE TABLE PLAYER
(
- PLAYER_ID VARCHAR(255) PRIMARY KEY NOT NULL,
- NAME VARCHAR(255),
- POSITION VARCHAR(255),
- SALARY DOUBLE PRECISION NOT NULL,
- VERSION NUMERIC(19) NOT NULL
+ PLAYER_ID VARCHAR(255) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL,
+ VERSION NUMERIC(19) NOT NULL
);
-CREATE TABLE LEAGUE
+CREATE TABLE LEAGUE
(
- LEAGUE_ID VARCHAR(255) PRIMARY KEY NOT NULL,
- NAME VARCHAR(255),
- SPORT VARCHAR(255),
- VERSION NUMERIC(19) NOT NULL
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY NOT NULL,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMERIC(19) NOT NULL
);
-CREATE TABLE TEAM
+CREATE TABLE TEAM
(
- TEAM_ID VARCHAR(255) PRIMARY KEY NOT NULL,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- VERSION NUMERIC(19) NOT NULL,
- FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) PRIMARY KEY NOT NULL,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255),
+ VERSION NUMERIC(19) NOT NULL,
+ FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
);
-CREATE TABLE TEAMPLAYER
+CREATE TABLE TEAMPLAYER
(
- PLAYER_ID VARCHAR(255) NOT NULL,
- TEAM_ID VARCHAR(255) NOT NULL,
+ PLAYER_ID VARCHAR(255) NOT NULL,
+ TEAM_ID VARCHAR(255) NOT NULL,
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)
);
CREATE TRIGGER T_LEAGUE
@@ -49,7 +49,7 @@
OLD AS O_ROW
FOR EACH ROW MODE DB2SQL
UPDATE LEAGUE SET version = O_ROW.version + 1
- WHERE LEAGUE_ID = O_ROW.LEAGUE_ID
+ WHERE LEAGUE_ID = O_ROW.LEAGUE_ID
;
@@ -59,7 +59,7 @@
OLD AS O_ROW
FOR EACH ROW MODE DB2SQL
UPDATE PLAYER SET version = O_ROW.version + 1
- WHERE PLAYER_ID = O_ROW.PLAYER_ID
+ WHERE PLAYER_ID = O_ROW.PLAYER_ID
;
CREATE TRIGGER T_TEAM
@@ -68,5 +68,5 @@
OLD AS O_ROW
FOR EACH ROW MODE DB2SQL
UPDATE TEAM SET version = O_ROW.version + 1
- WHERE TEAM_ID = O_ROW.TEAM_ID
+ WHERE TEAM_ID = O_ROW.TEAM_ID
;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_ifx.sql
index 3b31d5a..1dbd085 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_ifx.sql
@@ -7,40 +7,40 @@
DROP TABLE TEAM ;
DROP TABLE LEAGUE ;
-CREATE TABLE PLAYER
+CREATE TABLE PLAYER
(
- PLAYER_ID VARCHAR(127) PRIMARY KEY,
- NAME VARCHAR(127),
- POSITION VARCHAR(127),
- SALARY DOUBLE PRECISION NOT NULL ,
- VERSION DECIMAL(19) NOT NULL
+ PLAYER_ID VARCHAR(127) PRIMARY KEY,
+ NAME VARCHAR(127),
+ POSITION VARCHAR(127),
+ SALARY DOUBLE PRECISION NOT NULL ,
+ VERSION DECIMAL(19) NOT NULL
);
-CREATE TABLE LEAGUE
+CREATE TABLE LEAGUE
(
- LEAGUE_ID VARCHAR(127) PRIMARY KEY,
- NAME VARCHAR(127),
- SPORT VARCHAR(127),
- VERSION DECIMAL(19) NOT NULL
+ LEAGUE_ID VARCHAR(127) PRIMARY KEY,
+ NAME VARCHAR(127),
+ SPORT VARCHAR(127),
+ VERSION DECIMAL(19) NOT NULL
);
-CREATE TABLE TEAM
+CREATE TABLE TEAM
(
- TEAM_ID VARCHAR(127) PRIMARY KEY,
- CITY VARCHAR(127),
- NAME VARCHAR(127),
- LEAGUE_ID VARCHAR(127),
- VERSION DECIMAL(19) NOT NULL ,
- FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(127) PRIMARY KEY,
+ CITY VARCHAR(127),
+ NAME VARCHAR(127),
+ LEAGUE_ID VARCHAR(127),
+ VERSION DECIMAL(19) NOT NULL ,
+ FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
);
-CREATE TABLE TEAMPLAYER
+CREATE TABLE TEAMPLAYER
(
- PLAYER_ID VARCHAR(127),
- TEAM_ID VARCHAR(127),
+ PLAYER_ID VARCHAR(127),
+ TEAM_ID VARCHAR(127),
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)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_mssql.sql
index f7183dd..a8df0e0 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_mssql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_mssql.sql
@@ -1,48 +1,48 @@
DROP TRIGGER T_LEAGUE
-DROP TRIGGER T_PLAYER
+DROP TRIGGER T_PLAYER
DROP TRIGGER T_TEAM
go
DROP TABLE TEAMPLAYER
-DROP TABLE PLAYER
+DROP TABLE PLAYER
DROP TABLE TEAM
DROP TABLE LEAGUE
go
-CREATE TABLE PLAYER
+CREATE TABLE PLAYER
(
- PLAYER_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- POSITION VARCHAR(255),
- SALARY double precision not null,
- VERSION NUMERIC(19) not null
+ PLAYER_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY double precision not null,
+ VERSION NUMERIC(19) not null
)
-create table LEAGUE
+create table LEAGUE
(
- LEAGUE_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- SPORT VARCHAR(255),
- VERSION NUMERIC(19) not null
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMERIC(19) not null
)
-create table TEAM
+create table TEAM
(
- TEAM_ID VARCHAR(255) primary key not null,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- VERSION NUMERIC(19) not null,
- foreign key (LEAGUE_ID) references LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) primary key not null,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255),
+ VERSION NUMERIC(19) not null,
+ foreign key (LEAGUE_ID) references LEAGUE (LEAGUE_ID)
)
-create table TEAMPLAYER
+create table TEAMPLAYER
(
- PLAYER_ID VARCHAR(255) not null,
- TEAM_ID VARCHAR(255) not null,
- 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)
+ PLAYER_ID VARCHAR(255) not null,
+ TEAM_ID VARCHAR(255) not null,
+ 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)
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_mysql.sql
index 789dbea..f2d1e11 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_mysql.sql
@@ -7,40 +7,40 @@
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,
- VERSION DECIMAL(19) NOT NULL
+ PLAYER_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL,
+ VERSION DECIMAL(19) NOT NULL
) engine=InnoDB;
-CREATE TABLE LEAGUE
+CREATE TABLE LEAGUE
(
- LEAGUE_ID VARCHAR(255) PRIMARY KEY,
- NAME VARCHAR(255),
- SPORT VARCHAR(255),
- VERSION DECIMAL(19) NOT NULL
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION DECIMAL(19) NOT NULL
) engine=InnoDB;
-CREATE TABLE TEAM
+CREATE TABLE TEAM
(
- TEAM_ID VARCHAR(255) PRIMARY KEY,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- VERSION DECIMAL(19) NOT NULL,
- FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) PRIMARY KEY,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255),
+ VERSION DECIMAL(19) NOT NULL,
+ FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
) engine=InnoDB;
-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)
) engine=InnoDB;
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_ora.sql
index 22262c1..493a741 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_ora.sql
@@ -7,40 +7,40 @@
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,
- VERSION NUMBER(19) NOT NULL
+ PLAYER_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL,
+ VERSION NUMBER(19) NOT NULL
);
-CREATE TABLE LEAGUE
+CREATE TABLE LEAGUE
(
- LEAGUE_ID VARCHAR(255) PRIMARY KEY,
- NAME VARCHAR(255),
- SPORT VARCHAR(255),
- VERSION NUMBER(19) NOT NULL
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMBER(19) NOT NULL
);
-CREATE TABLE TEAM
+CREATE TABLE TEAM
(
- TEAM_ID VARCHAR(255) PRIMARY KEY,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- VERSION NUMBER(19) NOT NULL,
- FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) PRIMARY KEY,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255),
+ VERSION NUMBER(19) NOT NULL,
+ 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)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_pbs.sql
index b243325..e5d6988 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_pbs.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_pbs.sql
@@ -6,45 +6,45 @@
commit;
-CREATE TABLE PLAYER
+CREATE TABLE PLAYER
(
- PLAYER_ID VARCHAR(255) PRIMARY KEY,
- NAME VARCHAR(255),
- POSITION VARCHAR(255),
- SALARY DOUBLE PRECISION NOT NULL,
- VERSION NUMBER(19) NOT NULL
+ PLAYER_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL,
+ VERSION NUMBER(19) NOT NULL
);
commit;
-CREATE TABLE LEAGUE
+CREATE TABLE LEAGUE
(
- LEAGUE_ID VARCHAR(255) PRIMARY KEY,
- NAME VARCHAR(255),
- SPORT VARCHAR(255),
- VERSION NUMBER(19) NOT NULL
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMBER(19) NOT NULL
);
commit;
-CREATE TABLE TEAM
+CREATE TABLE TEAM
(
- TEAM_ID VARCHAR(255) PRIMARY KEY,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- VERSION NUMBER(19) NOT NULL,
- CONSTRAINT FK_1 FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) PRIMARY KEY,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255),
+ VERSION NUMBER(19) NOT NULL,
+ CONSTRAINT FK_1 FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
);
commit;
-CREATE TABLE TEAMPLAYER
+CREATE TABLE TEAMPLAYER
(
- PLAYER_ID VARCHAR(255),
- TEAM_ID VARCHAR(255),
- CONSTRAINT FK_2 FOREIGN KEY (TEAM_ID) REFERENCES TEAM (TEAM_ID),
- CONSTRAINT FK_3 FOREIGN KEY (PLAYER_ID) REFERENCES PLAYER (PLAYER_ID)
+ PLAYER_ID VARCHAR(255),
+ TEAM_ID VARCHAR(255),
+ CONSTRAINT FK_2 FOREIGN KEY (TEAM_ID) REFERENCES TEAM (TEAM_ID),
+ CONSTRAINT FK_3 FOREIGN KEY (PLAYER_ID) REFERENCES PLAYER (PLAYER_ID)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_psql.sql
index 6ee6ba8..b6a7d31 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_psql.sql
@@ -3,40 +3,40 @@
DROP TABLE TEAM cascade;
DROP TABLE LEAGUE cascade;
-CREATE TABLE PLAYER
+CREATE TABLE PLAYER
(
- PLAYER_ID VARCHAR(255) PRIMARY KEY,
- NAME VARCHAR(255),
- POSITION VARCHAR(255),
- SALARY DOUBLE PRECISION NOT NULL,
- VERSION DECIMAL(19) NOT NULL
+ PLAYER_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL,
+ VERSION DECIMAL(19) NOT NULL
);
-CREATE TABLE LEAGUE
+CREATE TABLE LEAGUE
(
- LEAGUE_ID VARCHAR(255) PRIMARY KEY,
- NAME VARCHAR(255),
- SPORT VARCHAR(255),
- VERSION DECIMAL(19) NOT NULL
+ LEAGUE_ID VARCHAR(255) PRIMARY KEY,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION DECIMAL(19) NOT NULL
);
-CREATE TABLE TEAM
+CREATE TABLE TEAM
(
- TEAM_ID VARCHAR(255) PRIMARY KEY,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- VERSION DECIMAL(19) NOT NULL,
- FOREIGN KEY (LEAGUE_ID) REFERENCES LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) PRIMARY KEY,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255),
+ VERSION DECIMAL(19) NOT NULL,
+ 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)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_syb.sql
index b32e2f7..df8ea13 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_syb.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterVC/sql/RosterVCApp_syb.sql
@@ -1,48 +1,48 @@
DROP TRIGGER T_LEAGUE
-DROP TRIGGER T_PLAYER
+DROP TRIGGER T_PLAYER
DROP TRIGGER T_TEAM
go
DROP TABLE TEAMPLAYER
-DROP TABLE PLAYER
+DROP TABLE PLAYER
DROP TABLE TEAM
DROP TABLE LEAGUE
go
-CREATE TABLE PLAYER
+CREATE TABLE PLAYER
(
- PLAYER_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- POSITION VARCHAR(255),
- SALARY double precision not null,
- VERSION NUMERIC(19) not null
+ PLAYER_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY double precision not null,
+ VERSION NUMERIC(19) not null
)
-create table LEAGUE
+create table LEAGUE
(
- LEAGUE_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- SPORT VARCHAR(255),
- VERSION NUMERIC(19) not null
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255),
+ VERSION NUMERIC(19) not null
)
-create table TEAM
+create table TEAM
(
- TEAM_ID VARCHAR(255) primary key not null,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- VERSION NUMERIC(19) not null,
- foreign key (LEAGUE_ID) references LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) primary key not null,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255),
+ VERSION NUMERIC(19) not null,
+ foreign key (LEAGUE_ID) references LEAGUE (LEAGUE_ID)
)
-create table TEAMPLAYER
+create table TEAMPLAYER
(
- PLAYER_ID VARCHAR(255) not null,
+ PLAYER_ID VARCHAR(255) not null,
TEAM_ID VARCHAR(255) not null,
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)
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/build.properties
index 0ac7e21..4e9b56f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/build.properties
@@ -15,13 +15,13 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="rosterext"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
-<property name="test.client"
- value="RosterClient"/>
+<property name="test.client"\u0020
+ value="RosterClient"/>
<property name="application.xml" value="descriptor/application.xml"/>
<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
@@ -34,10 +34,10 @@
<property name="sun-cmp-mappings-team.xml" value="descriptor/sun-cmp-mappings-team.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="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}"/>
@@ -47,7 +47,7 @@
<property name="hasWebclient" value="true"/>
<property name="web.xml"
- value="descriptor/web.xml"/>
+ value="descriptor/web.xml"/>
<property name="sun-web.xml"
- value="descriptor/sun-web.xml"/>
+ value="descriptor/sun-web.xml"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/build.xml
index a868a54..9e22645 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/build.xml
@@ -38,7 +38,7 @@
<delete file="${sun-cmp-mappings.xml}"/>
<antcall target="clean-common"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -46,17 +46,17 @@
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
- <antcall target="compile-common">
+ <antcall target="compile-common">
<param name="src" value="servlet"/>
</antcall>
</target>
<target name="package-team-jar" >
- <antcall target="package-ejbjar-common">
-
+ <antcall target="package-ejbjar-common">
+
<param name="dbschema" value="${basedir}/ejb/team/RosterSchema.dbschema" />
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="team/Local*.class, team/League*.class, team/Player*.class, team/Team*.class, util/*.class, RosterSchema.dbschema" />
<param name="ejb-jar.xml" value="${ejb-jar-team.xml}" />
@@ -64,22 +64,22 @@
<param name="sun-cmp-mappings.xml" value="${sun-cmp-mappings-team.xml}" />
<param name="ejbjar.files" value="${build.classes.dir}" />
<param name="ejb.jar" value="${assemble.dir}/team-ejb.jar" />
-
+
</antcall>
</target>
<target name="package-roster-jar" >
- <antcall target="package-ejbjar-common">
-
- <param name="ejbjar.classes"
+ <antcall target="package-ejbjar-common">
+
+ <param name="ejbjar.classes"
value="team/Local*.class, team/League.class, team/LeagueHome.class, team/Player.class, team/PlayerHome.class, team/Team.class, team/TeamHome.class,,util/*.class,roster/*.class" />
<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="ejb.jar" value="${assemble.dir}/roster-ejb.jar" />
-
+
</antcall>
</target>
@@ -87,17 +87,17 @@
<antcall target="webclient-war-common">
<param name="hasWebclient" value="true"/>
- <param name="war.classes"
+ <param name="war.classes"
value="**/RosterServlet.class" />
- </antcall>
-
+ </antcall>
+
</target>
<target name="package-appclient" >
<mkdir dir="${assemble.dir}"/>
<antcall target="package-appclientjar-common">
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/RosterClient.class, **/Roster.class, **/RosterHome.class, util/*.class" />
<param name="application-client.xml"
value="${application-client.xml}" />
@@ -118,24 +118,24 @@
<property name="TEMPDIR" value="${assemble.dir}/TEMPDIR" />
- <mkdir dir="${TEMPDIR}/src" />
+ <mkdir dir="${TEMPDIR}/src" />
<copy todir="${TEMPDIR}/src" >
<fileset dir="${basedir}/ejb" />
</copy>
- <mkdir dir="${TEMPDIR}/src/client" />
+ <mkdir dir="${TEMPDIR}/src/client" />
<copy todir="${TEMPDIR}/src/client" file="${basedir}/client/RosterClient.java" />
<copy todir="${TEMPDIR}/src/client" file="${basedir}/servlet/RosterServlet.java" />
- <copy file="${basedir}/descriptor/INDEX.LIST" todir="${TEMPDIR}/META-INF" failonerror="false"/>
+ <copy file="${basedir}/descriptor/INDEX.LIST" todir="${TEMPDIR}/META-INF" failonerror="false"/>
<ear earfile="${assemble.dir}/${appname}App.ear" appxml="${application.xml}">
- <fileset dir="${assemble.dir}">
- <include name="*.jar"/>
- <include name="*.war"/>
- </fileset>
+ <fileset dir="${assemble.dir}">
+ <include name="*.jar"/>
+ <include name="*.war"/>
+ </fileset>
<fileset dir="${TEMPDIR}" />
- <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
+ <fileset dir="${env.APS_HOME}/lib" includes="reporter.jar"/>
</ear>
</target>
@@ -151,11 +151,11 @@
<antcall target="package-ear" />
- </target>
+ </target>
-
- <target name="deploy"
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="${basedir}/sql/RosterApp_derby.sql"/>
@@ -174,22 +174,22 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="${basedir}/sql/drop_RosterApp_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/client/RosterClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/client/RosterClient.java
index 274a190..2f22468 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/client/RosterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/client/RosterClient.java
@@ -28,18 +28,18 @@
public class RosterClient {
private static SimpleReporterAdapter stat =
- new SimpleReporterAdapter("appserv-tests");
+ new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
try {
- System.out.println("START");
+ System.out.println("START");
stat.addDescription("RosterAppExt");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleRosterExt");
- RosterHome home =
- (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
RosterHome.class);
Roster myRoster = home.create();
@@ -49,8 +49,8 @@
// getMoreInfo(myRoster);
- stat.addStatus("ejbclient RosterAppExt", stat.PASS);
- stat.printSummary("RosterAppExt");
+ stat.addStatus("ejbclient RosterAppExt", stat.PASS);
+ stat.printSummary("RosterAppExt");
System.exit(0);
} catch (Exception ex) {
@@ -86,7 +86,7 @@
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
}
} // getSomeInfo
@@ -124,7 +124,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");
@@ -142,7 +142,7 @@
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
}
} // getMoreInfo
@@ -176,7 +176,7 @@
myRoster.createTeamInLeague(new TeamDetails(
"T2", "Gophers", "Manteca"), "L1");
-
+
myRoster.createTeamInLeague(new TeamDetails(
"T3", "Deer", "Bodie"), "L2");
@@ -300,7 +300,7 @@
myRoster.createPlayer(new PlayerDetails(
"P26", "Hobie Jackson", "pitcher", 582.00));
-
+
myRoster.createPlayer(new PlayerDetails(
"P27", "Melinda Kendall", "catcher", 677.00));
@@ -314,7 +314,7 @@
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
+ stat.addStatus("ejbclient RosterAppExt", stat.FAIL);
}
} // insertInfo
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/ejb-jar-team.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/ejb-jar-team.xml
index 704c802..856bbb8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/ejb-jar-team.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/descriptor/ejb-jar-team.xml
@@ -25,7 +25,7 @@
<display-name>LeagueEJB</display-name>
<ejb-name>LeagueEJB</ejb-name>
<home>team.LeagueHome</home>
- <remote>team.League</remote>
+ <remote>team.League</remote>
<local-home>team.LocalLeagueHome</local-home>
<local>team.LocalLeague</local>
<ejb-class>team.LeagueBean</ejb-class>
@@ -143,7 +143,7 @@
</query-method>
<result-type-mapping>Remote</result-type-mapping>
<ejb-ql>select Object(p) from League l, in(l.teams) as t, in(t.players) p where l = ?1</ejb-ql>
- </query>
+ </query>
</entity>
<entity>
<display-name>TeamEJB</display-name>
@@ -246,7 +246,7 @@
</method-params>
</query-method>
<ejb-ql>select distinct t.name from Team t where LOCATE(?1, t.name) > 0 AND LOCATE(?1, t.name) < LENGTH(t.name)</ejb-ql>
- </query>
+ </query>
</entity>
<entity>
<display-name>PlayerEJB</display-name>
@@ -288,7 +288,7 @@
<method-name>findNotOnTeam</method-name>
<method-params />
</query-method>
- <ejb-ql>select object(p) from Player p
+ <ejb-ql>select object(p) from Player p
where p.teams is empty</ejb-ql>
</query>
<query>
@@ -474,7 +474,7 @@
</method-params>
</query-method>
<ejb-ql>select object(p) from Player p where p.salary = SQRT(?1)</ejb-ql>
- </query>
+ </query>
</entity>
</enterprise-beans>
<relationships>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/Roster.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/Roster.java
index 692a185..279aab7 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/Roster.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/Roster.java
@@ -27,55 +27,55 @@
import java.util.Set;
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)
@@ -83,84 +83,84 @@
public ArrayList getSportsOfPlayer(String playerId)
throws RemoteException;
-
+
public double getSalaryOfPlayerFromTeam(String teamID, String playerName)
throws RemoteException;
public ArrayList getPlayersOfLeague(String leagueId)
- throws RemoteException;
-
+ throws RemoteException;
+
public ArrayList getPlayersWithPositionsGoalkeeperOrDefender()
- throws RemoteException;
+ throws RemoteException;
- public ArrayList getPlayersWithNameEndingWithON()
+ public ArrayList getPlayersWithNameEndingWithON()
throws RemoteException;
public ArrayList getPlayersWithNullName()
- throws RemoteException;
+ throws RemoteException;
public ArrayList getPlayersWithTeam(String teamId)
throws RemoteException;
-
- public ArrayList getPlayersWithSalaryUsingABS(double salary)
- throws RemoteException;
- public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ public ArrayList getPlayersWithSalaryUsingABS(double salary)
throws RemoteException;
-
-
+
+ public ArrayList getPlayersWithSalaryUsingSQRT(double salary)
+ throws RemoteException;
+
+
// 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;
public ArrayList getTeamsByPlayerAndLeague(String playerKey,
String leagueKey)
- throws RemoteException;
-
+ throws RemoteException;
+
public ArrayList getTeamsByPlayerAndLeagueViaRemote(String playerKey,
String leagueKey)
- throws RemoteException;
+ throws RemoteException;
-
+
public Set getCitiesOfLeague(String leagueKey) throws RemoteException;
public TeamDetails getTeamOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
+ throws RemoteException;
public String getTeamsNameOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
+ throws RemoteException;
public String getTeamNameVariations(String teamId) throws RemoteException;
public TeamDetails getRemoteTeamOfLeagueByCity(String leagueKey, String city)
- throws RemoteException;
-
-
+ 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;
public LeagueDetails getLeagueByName(String name)
throws RemoteException;
-
+
// Test
public ArrayList getRemoteTeamsOfLeague(String leagueKey) throws RemoteException;
@@ -169,7 +169,7 @@
public ArrayList testFinder(String parm1, String parm2, String parm3)
throws RemoteException;
-
+
public void cleanUp() throws FinderException, RemoveException, RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/RosterBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/RosterBean.java
index 386979b..36b95b3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/RosterBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/RosterBean.java
@@ -52,19 +52,19 @@
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);
@@ -75,7 +75,7 @@
}
}
- public void removePlayer(String playerId) {
+ public void removePlayer(String playerId) {
Debug.print("RosterBean removePlayer");
try {
@@ -85,7 +85,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public void dropPlayer(String playerId, String teamId) {
Debug.print("RosterBean dropPlayer");
@@ -113,7 +113,7 @@
} // getPlayer
- public ArrayList getPlayersOfTeam(String teamId) {
+ public ArrayList getPlayersOfTeam(String teamId) {
Debug.print("RosterBean getPlayersOfTeam");
Collection players = null;
@@ -128,7 +128,7 @@
} // getPlayersOfTeam
- public ArrayList getPlayersOfTeamCopy(String teamId) {
+ public ArrayList getPlayersOfTeamCopy(String teamId) {
Debug.print("RosterBean getPlayersOfTeamCopy");
ArrayList playersList = null;
@@ -145,7 +145,7 @@
} // getPlayersOfTeamCopy
- public ArrayList getTeamsOfLeague(String leagueId) {
+ public ArrayList getTeamsOfLeague(String leagueId) {
Debug.print("RosterBean getTeamsOfLeague");
@@ -186,7 +186,7 @@
} // getPlayersByPosition
- public ArrayList getPlayersByHigherSalary(String name) {
+ public ArrayList getPlayersByHigherSalary(String name) {
Debug.print("RosterBean getPlayersByByHigherSalary");
Collection players = null;
@@ -200,7 +200,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;
@@ -214,7 +214,7 @@
return copyPlayersToDetails(players);
} // getPlayersBySalaryRange
- public ArrayList getPlayersByLeagueId(String leagueId) {
+ public ArrayList getPlayersByLeagueId(String leagueId) {
Debug.print("RosterBean getPlayersByLeagueId");
Collection players = null;
@@ -229,7 +229,7 @@
return copyPlayersToDetails(players);
} // getPlayersByLeagueId
- public ArrayList getPlayersBySport(String sport) {
+ public ArrayList getPlayersBySport(String sport) {
Debug.print("RosterBean getPlayersBySport");
Collection players = null;
@@ -243,7 +243,7 @@
return copyPlayersToDetails(players);
} // getPlayersBySport
- public ArrayList getPlayersByCity(String city) {
+ public ArrayList getPlayersByCity(String city) {
Debug.print("RosterBean getPlayersByCity");
Collection players = null;
@@ -257,7 +257,7 @@
return copyPlayersToDetails(players);
} // getPlayersByCity
- public ArrayList getAllPlayers() {
+ public ArrayList getAllPlayers() {
Debug.print("RosterBean getAllPlayers");
Collection players = null;
@@ -271,7 +271,7 @@
return copyPlayersToDetails(players);
} // getAllPlayers
- public ArrayList getPlayersNotOnTeam() {
+ public ArrayList getPlayersNotOnTeam() {
Debug.print("RosterBean getPlayersNotOnTeam");
Collection players = null;
@@ -285,8 +285,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;
@@ -300,7 +300,7 @@
return copyPlayersToDetails(players);
} // getPlayersByPositionAndName
- public ArrayList getLeaguesOfPlayer(String playerId) {
+ public ArrayList getLeaguesOfPlayer(String playerId) {
Debug.print("RosterBean getLeaguesOfPlayer");
ArrayList detailsList = new ArrayList();
@@ -312,7 +312,7 @@
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
Iterator i = leagues.iterator();
while (i.hasNext()) {
LocalLeague league = (LocalLeague) i.next();
@@ -323,7 +323,7 @@
return detailsList;
} // getLeaguesOfPlayer
- public ArrayList getSportsOfPlayer(String playerId) {
+ public ArrayList getSportsOfPlayer(String playerId) {
Debug.print("RosterBean getSportsOfPlayer");
ArrayList sportsList = new ArrayList();
@@ -335,7 +335,7 @@
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
Iterator i = sports.iterator();
while (i.hasNext()) {
String sport = (String) i.next();
@@ -346,8 +346,8 @@
// 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);
@@ -358,8 +358,8 @@
throw new EJBException(ex.getMessage());
}
}
-
- public void removeTeam(String teamId) {
+
+ public void removeTeam(String teamId) {
Debug.print("RosterBean removeTeam");
try {
@@ -369,7 +369,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public TeamDetails getTeam(String teamId) {
Debug.print("RosterBean getTeam");
@@ -387,18 +387,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 {
@@ -408,7 +408,7 @@
throw new EJBException(ex.getMessage());
}
}
-
+
public LeagueDetails getLeague(String leagueId) {
Debug.print("RosterBean getLeague");
@@ -422,7 +422,7 @@
}
return leagueDetails;
}
-
+
// SessionBean methods
public void ejbCreate() throws CreateException {
@@ -470,51 +470,51 @@
public RosterBean() {}
public void ejbRemove() {}
public void setSessionContext(SessionContext sc) {}
-
+
// Private methods
private LocalPlayerHome lookupPlayer() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimplePlayerExt");
return (LocalPlayerHome) objref;
}
private LocalTeamHome lookupTeam() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleTeamExt");
return (LocalTeamHome) objref;
}
private LocalLeagueHome lookupLeague() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleLeagueExt");
return (LocalLeagueHome) objref;
}
private PlayerHome lookupRemotePlayer() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemotePlayerExt");
return (PlayerHome) objref;
}
private TeamHome lookupRemoteTeam() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteTeamExt");
return (TeamHome) objref;
}
private LeagueHome lookupRemoteLeague() throws NamingException {
-
+
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/RemoteLeagueExt");
return (LeagueHome) objref;
}
-
+
private ArrayList copyPlayersToDetails(Collection players) {
ArrayList detailsList = new ArrayList();
@@ -544,15 +544,15 @@
return detailsList;
} // copyPlayersToDetails
-
+
/**
- * dirty cleanUp method only EJBs with hardcoded PK will be removed
+ * dirty cleanUp method only EJBs with hardcoded PK will be removed
*/
public void cleanUp() {
- Debug.print("Cleaning up the database");
+ Debug.print("Cleaning up the database");
Collection toClean = null;
Iterator it = null;
-
+
try {
//removing the player EJBs
toClean = playerHome.findAll();
@@ -560,33 +560,33 @@
while (it.hasNext()) {
((LocalPlayer)it.next()).remove();
}
-
+
// removing the team EJBs
toClean = teamHome.findAll();
it = toClean.iterator();
while (it.hasNext()) {
((LocalTeam)it.next()).remove();
}
-
+
// removing the league EJBs
toClean = leagueHome.findAll();
it = toClean.iterator();
while (it.hasNext()) {
((LocalLeague)it.next()).remove();
- }
- Debug.print("Cleaning up the database ... done!");
+ }
+ Debug.print("Cleaning up the database ... done!");
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
}
-
+
/**
- *
+ *
* @param name
* @return
*/
public LeagueDetails getLeagueByName(String name) {
-
+
Debug.print("RosterBean getLeagueByName (SingleObjectFinder)");
LeagueDetails leagueDetails = null;
try {
@@ -598,12 +598,12 @@
}
return leagueDetails;
- }
+ }
// getLeagueByName()
-
+
/**
- *
+ *
* @param playerKey
* @param leagueKey
* @return
@@ -612,13 +612,13 @@
String leagueKey) {
Debug.print("RosterBean getTeamsByPlayerAndLeague");
- ArrayList detailsList = new ArrayList();
+ ArrayList detailsList = new ArrayList();
Collection teamsColl = null;
try {
LocalPlayer player = playerHome.findByPrimaryKey(playerKey);
- LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
- teamsColl = teamHome.findByPlayerAndLeague(player, league);
+ LocalLeague league = leagueHome.findByPrimaryKey(leagueKey);
+ teamsColl = teamHome.findByPlayerAndLeague(player, league);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
@@ -632,11 +632,11 @@
detailsList.add(details);
}
- return detailsList;
- }
+ return detailsList;
+ }
/**
- *
+ *
* @param playerKey
* @param leagueKey
* @return
@@ -645,17 +645,17 @@
String leagueKey) {
Debug.print("RosterBean getTeamsByPlayerAndLeagueViaRemote");
- ArrayList detailsList = new ArrayList();
+ ArrayList detailsList = new ArrayList();
Collection teamsColl = null;
try {
Debug.print(" ----- finding ....");
Player player = remPlayerHome.findByPrimaryKey(playerKey);
Debug.print(" ----- Player found");
- League league = remLeagueHome.findByPrimaryKey(leagueKey);
+ League league = remLeagueHome.findByPrimaryKey(leagueKey);
Debug.print(" ----- League found");
teamsColl = remTeamHome.findByPlayerAndLeagueViaRemote(player, league);
- Debug.print(" ----- Team found");
+ Debug.print(" ----- Team found");
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
@@ -674,45 +674,45 @@
}
- return detailsList;
- }
-
+ return detailsList;
+ }
+
/**
- *
+ *
* @param city
* @return
*/
public Set getCitiesOfLeague(String leagueKey) {
-
+
Debug.print("RosterBean getCitiesOfLeague(leagueKey)");
- LocalLeague league;
+ LocalLeague league;
Set cities;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
- cities = league.getCitiesOfThisLeague();
+ cities = league.getCitiesOfThisLeague();
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
-
+
return cities;
}// getCitiesOfLeague()
public ArrayList getRemoteTeamsOfLeague(String leagueKey) {
-
+
Debug.print("RosterBean getRemoteTeamsOfLeague(leagueKey)");
- ArrayList detailsList = new ArrayList();
- League league;
+ ArrayList detailsList = new ArrayList();
+ League league;
Set teams;
-
+
try {
league = remLeagueHome.findByPrimaryKey(leagueKey);
- teams = league.getRemoteTeamsOfThisLeague();
+ teams = league.getRemoteTeamsOfThisLeague();
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
try {
@@ -727,12 +727,12 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return detailsList;
}
-
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -741,7 +741,7 @@
Debug.print("RosterBean getTeamOfLeagueByCity(leagueKey, city)");
LocalLeague league;
LocalTeam team;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
team = league.getTeamByCity(city);
@@ -749,13 +749,13 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
}// getTeamOfLeagueByCity()
-
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -764,7 +764,7 @@
Debug.print("RosterBean getTeamsNameOfLeagueByCity(leagueKey, city)");
LocalLeague league;
String teamName;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueKey);
teamName = league.getTeamsNameByCity(city);
@@ -772,14 +772,14 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return teamName;
}// getTeamsNameOfLeagueByCity()
-
-
+
+
/**
- *
+ *
* @param teamID
* @param playerName
* @return
@@ -788,21 +788,21 @@
Debug.print("RosterBean getSalaryOfPlayerFromTeam(teamKey, playerKey)");
LocalTeam team;
double salary;
-
+
try {
- team = teamHome.findByPrimaryKey(teamID);
- salary = team.getSalaryOfPlayer(playerName);
+ team = teamHome.findByPrimaryKey(teamID);
+ salary = team.getSalaryOfPlayer(playerName);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return salary;
+
+ return salary;
}// getSalaryOfPlayerFromTeam()
-
-
+
+
/**
- *
+ *
* @param leagueId
* @return
*/
@@ -810,7 +810,7 @@
Debug.print("RosterBean getPlayersOfLeague(leagueId)");
LocalLeague league;
Set players;
-
+
try {
league = leagueHome.findByPrimaryKey(leagueId);
players = league.getPlayersFromLeague();
@@ -818,12 +818,12 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return copyPlayersToDetails(players);
+
+ return copyPlayersToDetails(players);
}// getPlayersOfLeague()
-
+
/**
- *
+ *
* @param leagueId
* @return
*/
@@ -840,68 +840,68 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
- return result;
+
+ return result;
}// getPlayersOfLeague()
-
+
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithPositionsGoalkeeperOrDefender() {
Debug.print("RosterBean getPlayersWithPositionsGoalkeeperOrDefender()");
Collection players = null;
-
+
try {
players = playerHome.findByPositionsGoalkeeperOrDefender();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithPositionsGoalkeeperOrDefender()
-
+
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithNameEndingWithON() {
Debug.print("RosterBean getPlayersWithNameEndingWithON()");
Collection players = null;
-
+
try {
players = playerHome.findByNameEndingWithON();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithNameEndingWithON()
/**
- *
+ *
* @return
*/
public ArrayList getPlayersWithNullName() {
Debug.print("RosterBean getPlayersWithNullName()");
Collection players = null;
-
+
try {
players = playerHome.findByNullName();
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithNullName()
/**
- *
+ *
* @param teamId
* @return
*/
@@ -909,7 +909,7 @@
Debug.print("RosterBean getPlayersWithTeam(teamId)");
LocalTeam team;
Collection players = null;
-
+
try {
team = teamHome.findByPrimaryKey(teamId);
players = playerHome.findByTeam(team);
@@ -917,13 +917,13 @@
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithTeam()
-
-
+
+
/**
- *
+ *
* @param teamId
* @return
*/
@@ -931,7 +931,7 @@
Debug.print("RosterBean getTeamNameVariations(teamId)");
LocalTeam team;
StringBuffer out = new StringBuffer();
-
+
try {
team = teamHome.findByPrimaryKey(teamId);
Debug.print("--- CONCAT");
@@ -939,59 +939,59 @@
Debug.print("--- SUBSTRING");
out.append(team.getTeamNameWithStringfunctionTests2());
Debug.print("--- LOCATE AND LENGTH");
- out.append(team.getTeamNameWithStringfunctionTests3());
+ out.append(team.getTeamNameWithStringfunctionTests3());
}
catch (Exception ex) {
- throw new EJBException(ex.getMessage());
+ throw new EJBException(ex.getMessage());
}
-
+
return out.toString();
}// getTeamNameVariations()
-
-
+
+
/**
- *
+ *
* @param salary
* @return
*/
public ArrayList getPlayersWithSalaryUsingABS(double salary) {
Debug.print("RosterBean getPlayersWithSalaryUsingABS(salary)");
Collection players = null;
-
+
try {
players = playerHome.findBySalarayWithArithmeticFunctionABS(salary);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithSalaryUsingABS()
/**
- *
+ *
* @param salary
* @return
*/
public ArrayList getPlayersWithSalaryUsingSQRT(double salary) {
Debug.print("RosterBean getPlayersWithSalaryUsingSQRT(salary)");
Collection players = null;
-
+
try {
players = playerHome.findBySalarayWithArithmeticFunctionSQRT(salary);
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return copyPlayersToDetails(players);
}// getPlayersWithSalaryUsingSQRT()
-
-
-
+
+
+
/**
- *
+ *
* @param leagueKey
* @param city
* @return
@@ -1001,20 +1001,20 @@
League league;
Team team;
TeamDetails teamDetails;
-
+
try {
league = remLeagueHome.findByPrimaryKey(leagueKey);
team = league.getRemoteTeamByCity(city);
- teamDetails = new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
+ teamDetails = new TeamDetails(team.getTeamId(), team.getName(), team.getCity());
}
catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
-
+
return teamDetails;
}// getRemoteTeamOfLeagueByCity()
-
- public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) {
+
+ public ArrayList getPlayersByLeagueIdWithNULL(String leagueId) {
Debug.print("RosterBean getPlayersByLeagueId");
Collection players = null;
@@ -1029,5 +1029,5 @@
return copyPlayersToDetails(players);
} // getPlayersByLeagueId
-
-} // RosterBean
+
+} // RosterBean
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/RosterHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/RosterHome.java
index cecd462..b874ad4 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/RosterHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/roster/RosterHome.java
@@ -22,6 +22,6 @@
import jakarta.ejb.EJBHome;
public interface RosterHome extends EJBHome {
-
+
Roster create() throws RemoteException, CreateException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/League.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/League.java
index b0b8e1b..96e3703 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/League.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/League.java
@@ -29,15 +29,15 @@
public String getSport() throws RemoteException;
public Collection getTeams() throws RemoteException;
- public Team getRemoteTeamByCity(String city) throws FinderException,
+ public Team getRemoteTeamByCity(String city) throws FinderException,
RemoteException;
-
- public Set getRemoteTeamsOfThisLeague() throws FinderException,
+
+ public Set getRemoteTeamsOfThisLeague() throws FinderException,
RemoteException;
- public Collection getRemotePlayersFromLeague() throws FinderException,
+ public Collection getRemotePlayersFromLeague() throws FinderException,
RemoteException;
-
+
// public void addTeam(Team team) throws RemoteException;
// public void dropTeam(Team team) throws RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LeagueBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LeagueBean.java
index 38d3806..fce92de 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LeagueBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/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);
@@ -50,7 +50,7 @@
public abstract Set ejbSelectRemoteTeams(League league)
throws FinderException;
-
+
public abstract LocalTeam ejbSelectTeamByCity(String city)
throws FinderException;
@@ -60,63 +60,63 @@
public abstract String ejbSelectTeamsNameByCity(String city)
throws FinderException;
-
+
public abstract Set ejbSelectPlayersByLeague(LocalLeague league)
throws FinderException;
public abstract Collection ejbSelectRemotePlayersByLeague(League league)
throws FinderException;
-
+
// Business methods
public Set getCitiesOfThisLeague() throws FinderException {
-
- LocalLeague league =
+
+ LocalLeague league =
(team.LocalLeague)context.getEJBLocalObject();
-
- return ejbSelectTeamsCity(league);
+
+ return ejbSelectTeamsCity(league);
}
public Set getRemoteTeamsOfThisLeague() throws FinderException {
-
+
League league = (team.League)context.getEJBObject();
-
- return ejbSelectRemoteTeams(league);
+
+ return ejbSelectRemoteTeams(league);
}
-
+
public LocalTeam getTeamByCity(String city) throws FinderException {
-
+
return ejbSelectTeamByCity(city);
}
public Team getRemoteTeamByCity(String city) throws FinderException {
-
+
return ejbSelectRemoteTeamByCity(city);
}
-
+
public String getTeamsNameByCity(String city) throws FinderException {
-
+
return ejbSelectTeamsNameByCity(city);
}
-
+
public Set getPlayersFromLeague() throws FinderException{
-
+
LocalLeague league = (team.LocalLeague)context.getEJBLocalObject();
-
+
return ejbSelectPlayersByLeague(league);
- }
-
+ }
+
public Collection getRemotePlayersFromLeague() throws FinderException{
-
+
League league = (team.League)context.getEJBObject();
-
+
return ejbSelectRemotePlayersByLeague(league);
- }
-
-
+ }
+
+
public void addTeam(LocalTeam team) {
Debug.print("TeamBean addTeam");
@@ -150,32 +150,32 @@
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() { }
} // LeagueBean class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LeagueHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LeagueHome.java
index 22a734a..8bc0782 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LeagueHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LeagueHome.java
@@ -25,14 +25,14 @@
public League create (String id, String name, String sport)
throws CreateException, RemoteException;
-
+
public League findByPrimaryKey (String id)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
public League findByName(String name)
- throws FinderException, RemoteException;
-
+ throws FinderException, RemoteException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalLeague.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalLeague.java
index f2eb046..a144617 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalLeague.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalLeague.java
@@ -33,5 +33,5 @@
public LocalTeam getTeamByCity(String city) throws FinderException;
public String getTeamsNameByCity(String city) throws FinderException;
public Set getPlayersFromLeague() throws FinderException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalLeagueHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalLeagueHome.java
index ec176da..c19af77 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalLeagueHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalLeagueHome.java
@@ -20,17 +20,17 @@
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;
- public Collection findAll()
+ public Collection findAll()
throws FinderException;
public LocalLeague findByName(String name)
- throws FinderException;
-
+ throws FinderException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalPlayerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalPlayerHome.java
index 90458e3..5777072 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalPlayerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalPlayerHome.java
@@ -20,60 +20,60 @@
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)
throws FinderException;
public Collection findByPositionsGoalkeeperOrDefender()
- throws FinderException;
-
+ throws FinderException;
+
public Collection findByNameEndingWithON()
- throws FinderException;
+ throws FinderException;
public Collection findByNullName()
- throws FinderException;
+ throws FinderException;
public Collection findByTeam(LocalTeam team)
- throws FinderException;
-
+ throws FinderException;
+
public Collection findBySalarayWithArithmeticFunctionABS(double salaray)
- throws FinderException;
+ throws FinderException;
public Collection findBySalarayWithArithmeticFunctionSQRT(double salaray)
- throws FinderException;
-
+ throws FinderException;
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalTeam.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalTeam.java
index 914a4cb..f87f5ee 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalTeam.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalTeam.java
@@ -31,8 +31,8 @@
public void addPlayer(LocalPlayer player);
public void dropPlayer(LocalPlayer player);
public double getSalaryOfPlayer(String playerName);
- public String getTeamNameWithStringfunctionTests1();
- public String getTeamNameWithStringfunctionTests2();
- public String getTeamNameWithStringfunctionTests3();
-
+ public String getTeamNameWithStringfunctionTests1();
+ public String getTeamNameWithStringfunctionTests2();
+ public String getTeamNameWithStringfunctionTests3();
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalTeamHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalTeamHome.java
index 884657e..c9e2a1e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalTeamHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/LocalTeamHome.java
@@ -22,17 +22,17 @@
import jakarta.ejb.FinderException;
public interface LocalTeamHome extends EJBLocalHome {
-
+
public LocalTeam create (String id, String name, String city)
throws CreateException;
-
+
public LocalTeam findByPrimaryKey (String id)
throws FinderException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException;
-
- public Collection findByPlayerAndLeague(LocalPlayer player,
+
+ public Collection findByPlayerAndLeague(LocalPlayer player,
LocalLeague league)
throws FinderException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/PlayerBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/PlayerBean.java
index 44b0a8e..7cd2890 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/PlayerBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/PlayerBean.java
@@ -29,7 +29,7 @@
public abstract String getPlayerId();
public abstract void setPlayerId(String id);
-
+
public abstract String getName();
public abstract void setName(String name);
@@ -52,20 +52,20 @@
public abstract Collection ejbSelectSports(LocalPlayer player)
throws FinderException;
-
-
+
+
// Business methods
public Collection getLeagues() throws FinderException {
- LocalPlayer player =
+ LocalPlayer player =
(team.LocalPlayer)context.getEJBLocalObject();
return ejbSelectLeagues(player);
}
public Collection getSports() throws FinderException {
- LocalPlayer player =
+ LocalPlayer player =
(team.LocalPlayer)context.getEJBLocalObject();
return ejbSelectSports(player);
}
@@ -82,32 +82,32 @@
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() { }
} // PlayerBean class
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/PlayerHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/PlayerHome.java
index ded9724..8459852 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/PlayerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/PlayerHome.java
@@ -26,35 +26,35 @@
public Player create (String id, String name, String position,
double salary)
throws CreateException, RemoteException;
-
+
public Player findByPrimaryKey (String id)
throws FinderException, RemoteException;
-
- public Collection findByPosition(String position)
+
+ public Collection findByPosition(String position)
throws FinderException, RemoteException;
- public Collection findByHigherSalary(String name)
+ public Collection findByHigherSalary(String name)
throws FinderException, RemoteException;
- public Collection findBySalaryRange(double low, double high)
+ public Collection findBySalaryRange(double low, double high)
throws FinderException, RemoteException;
-// public Collection findByLeague(League league)
+// public Collection findByLeague(League league)
// throws FinderException, RemoteException;
- public Collection findBySport(String sport)
+ public Collection findBySport(String sport)
throws FinderException, RemoteException;
- public Collection findByCity(String city)
+ public Collection findByCity(String city)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
- public Collection findNotOnTeam()
+ public Collection findNotOnTeam()
throws FinderException, RemoteException;
- public Collection findByPositionAndName(String position,
+ public Collection findByPositionAndName(String position,
String name) throws FinderException, RemoteException;
public Collection findByTest (String parm1, String parm2, String parm3)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/TeamBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/TeamBean.java
index 74fa4d7..b852ec3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/TeamBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/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);
@@ -39,7 +39,7 @@
// Access methods for relationship fields
-
+
public abstract Collection getPlayers();
public abstract void setPlayers(Collection players);
@@ -52,55 +52,55 @@
throws FinderException;
public abstract String ejbSelectByNameWithCONCAT(String part1, String part2)
- throws FinderException;
-
+ throws FinderException;
+
public abstract String ejbSelectByNameSubstring(String substring)
- throws FinderException;
+ throws FinderException;
public abstract String ejbSelectNameLocate(String substring)
- throws FinderException;
+ throws FinderException;
-
+
// Business methods
public double getSalaryOfPlayer(String playerName) throws FinderException {
LocalTeam team = (team.LocalTeam)context.getEJBLocalObject();
-
+
return ejbSelectSalaryOfPlayerInTeam(team, playerName);
}
-
-
+
+
public String getTeamNameWithStringfunctionTests1() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
// LocalTeam team = (team.LocalTeam) context.getEJBLocalObject();
// out.append("<BR>Name of Team : " + team.getName());
- out.append("<BR>");
+ out.append("<BR>");
out.append(ejbSelectByNameWithCONCAT("Cr", "ows"));
out.append("<BR>");
-
+
return out.toString();
}
-
+
public String getTeamNameWithStringfunctionTests2() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
out.append(ejbSelectByNameSubstring("aaaaCrowsaaaaa"));
out.append("<BR>");
return out.toString();
}
-
+
public String getTeamNameWithStringfunctionTests3() throws FinderException {
-
+
StringBuffer out = new StringBuffer();
out.append(ejbSelectNameLocate("row"));
out.append("<BR>");
-
+
return out.toString();
}
-
+
public ArrayList getCopyOfPlayers() {
Debug.print("TeamBean getCopyOfPlayers");
@@ -151,30 +151,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/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/TeamHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/TeamHome.java
index fe13044..bcfe439 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/TeamHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/team/TeamHome.java
@@ -25,14 +25,14 @@
public Team create (String id, String name, String city)
throws CreateException, RemoteException;
-
+
public Team findByPrimaryKey (String id)
throws FinderException, RemoteException;
- public Collection findAll()
+ public Collection findAll()
throws FinderException, RemoteException;
-
- public Collection findByPlayerAndLeagueViaRemote(Player player,
+
+ public Collection findByPlayerAndLeagueViaRemote(Player player,
League league)
throws FinderException, RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/PlayerDetails.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/PlayerDetails.java
index 81041c2..4765bce 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/PlayerDetails.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/ejb/util/PlayerDetails.java
@@ -23,7 +23,7 @@
private String position;
private double salary;
- public PlayerDetails (String id, String name, String position,
+ public PlayerDetails (String id, String name, String position,
double salary) {
this.id = id;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/servlet/RosterServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/servlet/RosterServlet.java
index 81ade04..6a3c99a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/servlet/RosterServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/servlet/RosterServlet.java
@@ -84,7 +84,7 @@
RosterHome.class);
Roster myRoster = home.create();
-
+
// deleting all exisiting DB-entries
myRoster.cleanUp();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_db2.sql
index be0c918..60756b2 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_db2.sql
@@ -3,37 +3,37 @@
DROP TABLE Team ;
DROP TABLE League ;
-CREATE TABLE Player
+CREATE TABLE Player
(
- player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- name VARCHAR(255),
- position VARCHAR(255),
- salary DOUBLE PRECISION NOT NULL
+ player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
);
-CREATE TABLE League
+CREATE TABLE League
(
- league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- name VARCHAR(255),
- sport VARCHAR(255)
+ league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ sport VARCHAR(255)
);
-CREATE TABLE Team
+CREATE TABLE Team
(
- team_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- city VARCHAR(255),
- name VARCHAR(255),
- league_Id VARCHAR(255),
- FOREIGN KEY (league_Id) REFERENCES League (league_Id)
+ team_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ 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) NOT NULL,
- team_Id VARCHAR(255) NOT NULL,
+ player_Id VARCHAR(255) NOT NULL,
+ team_Id VARCHAR(255) NOT NULL,
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)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_derby.sql
index 5ece60e..c9dcc3e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_derby.sql
@@ -3,35 +3,35 @@
DROP TABLE TEAM ;
DROP TABLE LEAGUE ;
-CREATE TABLE PLAYER
+CREATE TABLE PLAYER
(
- player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- name VARCHAR(255),
- position VARCHAR(255),
- salary DOUBLE PRECISION NOT NULL
+ player_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ position VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL
);
-CREATE TABLE LEAGUE
+CREATE TABLE LEAGUE
(
- league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- name VARCHAR(255),
- sport VARCHAR(255)
+ league_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ name VARCHAR(255),
+ sport VARCHAR(255)
);
-CREATE TABLE TEAM
+CREATE TABLE TEAM
(
- team_Id VARCHAR(255) PRIMARY KEY NOT NULL,
- city VARCHAR(255),
- name VARCHAR(255),
- league_Id VARCHAR(255),
- FOREIGN KEY (league_Id) REFERENCES League (league_Id)
+ team_Id VARCHAR(255) PRIMARY KEY NOT NULL,
+ 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) NOT NULL,
- team_Id VARCHAR(255) NOT NULL,
+ player_Id VARCHAR(255) NOT NULL,
+ team_Id VARCHAR(255) NOT NULL,
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/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_ifx.sql
index bb4d86c..94f88d2 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_ifx.sql
@@ -3,37 +3,37 @@
DROP TABLE Team ;
DROP TABLE League ;
-CREATE TABLE Player
+CREATE TABLE Player
(
- player_Id VARCHAR(127) PRIMARY KEY,
- name VARCHAR(127),
- position VARCHAR(127),
- salary DOUBLE PRECISION NOT NULL
+ player_Id VARCHAR(127) PRIMARY KEY,
+ name VARCHAR(127),
+ position VARCHAR(127),
+ salary DOUBLE PRECISION NOT NULL
);
-CREATE TABLE League
+CREATE TABLE League
(
- league_Id VARCHAR(127) PRIMARY KEY,
- name VARCHAR(127),
- sport VARCHAR(127)
+ league_Id VARCHAR(127) PRIMARY KEY,
+ name VARCHAR(127),
+ sport VARCHAR(127)
);
-CREATE TABLE Team
+CREATE TABLE Team
(
- team_Id VARCHAR(127) PRIMARY KEY,
- city VARCHAR(127),
- name VARCHAR(127),
- league_Id VARCHAR(127),
- FOREIGN KEY (league_Id) REFERENCES League (league_Id)
+ team_Id VARCHAR(127) PRIMARY KEY,
+ city VARCHAR(127),
+ name VARCHAR(127),
+ league_Id VARCHAR(127),
+ FOREIGN KEY (league_Id) REFERENCES League (league_Id)
);
-CREATE TABLE TeamPlayer
+CREATE TABLE TeamPlayer
(
- player_Id VARCHAR(127),
- team_Id VARCHAR(127),
+ player_Id VARCHAR(127),
+ team_Id VARCHAR(127),
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)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_mssql.sql
index 787488f..bad9d5a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_mssql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_mssql.sql
@@ -1,40 +1,40 @@
drop table TEAMPLAYER
-drop table PLAYER
+drop table PLAYER
drop table TEAM
drop TABLE LEAGUE
go
-create table PLAYER
+create table PLAYER
(
- PLAYER_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- POSITION VARCHAR(255),
- SALARY double precision not null
+ PLAYER_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY double precision not null
)
-create table LEAGUE
+create table LEAGUE
(
- LEAGUE_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- SPORT VARCHAR(255)
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
)
-create table TEAM
+create table TEAM
(
- TEAM_ID VARCHAR(255) primary key not null,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- foreign key (LEAGUE_ID) references LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) primary key not null,
+ 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) not null,
+ PLAYER_ID VARCHAR(255) not null,
TEAM_ID VARCHAR(255) not null,
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)
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_mysql.sql
index d763757..43f42ce 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_mysql.sql
@@ -3,33 +3,33 @@
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
) ENGINE=INNODB;
-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)
) ENGINE=INNODB;
-CREATE TABLE TEAM
+CREATE TABLE TEAM
(
- TEAM_ID VARCHAR(255) PRIMARY KEY,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255)
+ TEAM_ID VARCHAR(255) PRIMARY KEY,
+ CITY VARCHAR(255),
+ NAME VARCHAR(255),
+ LEAGUE_ID VARCHAR(255)
) ENGINE=INNODB;
-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)
) ENGINE=INNODB;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_ora.sql
index 4b4a547..17fabbb 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_ora.sql
@@ -3,37 +3,37 @@
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)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_pbs.sql
index 3f6f5d2..6b190ce 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_pbs.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_pbs.sql
@@ -5,42 +5,42 @@
commit;
-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
);
commit;
-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)
);
commit;
-CREATE TABLE Team
+CREATE TABLE Team
(
- team_Id VARCHAR(255) PRIMARY KEY,
- city VARCHAR(255),
- name VARCHAR(255),
- league_Id VARCHAR(255),
+ team_Id VARCHAR(255) PRIMARY KEY,
+ city VARCHAR(255),
+ name VARCHAR(255),
+ league_Id VARCHAR(255),
CONSTRAINT FK_1 FOREIGN KEY (league_Id) REFERENCES League (league_Id)
);
commit;
-CREATE TABLE TeamPlayer
+CREATE TABLE TeamPlayer
(
- player_Id VARCHAR(255),
- team_Id VARCHAR(255),
- CONSTRAINT FK_2 FOREIGN KEY (team_Id) REFERENCES Team (team_Id),
- CONSTRAINT FK_3 FOREIGN KEY (player_Id) REFERENCES Player (player_Id)
+ player_Id VARCHAR(255),
+ team_Id VARCHAR(255),
+ CONSTRAINT FK_2 FOREIGN KEY (team_Id) REFERENCES Team (team_Id),
+ CONSTRAINT FK_3 FOREIGN KEY (player_Id) REFERENCES Player (player_Id)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_psql.sql
index a6baf3e..7fddb4b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_psql.sql
@@ -3,40 +3,40 @@
DROP TABLE TEAM cascade;
DROP TABLE LEAGUE cascade;
-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/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_syb.sql
index 0c73ef3..40040c5 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_syb.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/rosterext/sql/RosterApp_syb.sql
@@ -1,40 +1,40 @@
drop table TEAMPLAYER
-drop table PLAYER
+drop table PLAYER
drop table TEAM
drop TABLE LEAGUE
go
-create table PLAYER
+create table PLAYER
(
- PLAYER_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- POSITION VARCHAR(255),
- SALARY double precision not null
+ PLAYER_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ POSITION VARCHAR(255),
+ SALARY double precision not null
)
-create table LEAGUE
+create table LEAGUE
(
- LEAGUE_ID VARCHAR(255) primary key not null,
- NAME VARCHAR(255),
- SPORT VARCHAR(255)
+ LEAGUE_ID VARCHAR(255) primary key not null,
+ NAME VARCHAR(255),
+ SPORT VARCHAR(255)
)
-create table TEAM
+create table TEAM
(
- TEAM_ID VARCHAR(255) primary key not null,
- CITY VARCHAR(255),
- NAME VARCHAR(255),
- LEAGUE_ID VARCHAR(255),
- foreign key (LEAGUE_ID) references LEAGUE (LEAGUE_ID)
+ TEAM_ID VARCHAR(255) primary key not null,
+ 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) not null,
+ PLAYER_ID VARCHAR(255) not null,
TEAM_ID VARCHAR(255) not null,
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)
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/build.properties
index 610f246..87f64a7 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/build.properties
@@ -15,13 +15,13 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="SampleWeb"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<!-- <property name="assemble.dir" value="{build.classes.dir}/archive"/> -->
-<property name="test.client"
- value="Client"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="test.client"\u0020
+ value="Client"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
<property name="appclient.jar" value="SampleClient.jar"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/build.xml
index 7107dd1..a32536d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/build.xml
@@ -34,19 +34,19 @@
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
- <target name="deploy"
+
+ <target name="deploy"
depends="init-common">
- <mkdir dir="${build.classes.dir}"/>
- <mkdir dir="${assemble.dir}"/>
+ <mkdir dir="${build.classes.dir}"/>
+ <mkdir dir="${assemble.dir}"/>
<echo message="assemble.dir => ${assemble.dir} " />
- <copy file="${basedir}/ear/SampleWebApp.ear" todir="${assemble.dir}" />
+ <copy file="${basedir}/ear/SampleWebApp.ear" todir="${assemble.dir}" />
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/SampleWebApp_derby.sql"/>
</antcall>
<antcall target="deploy-common">
- <param name="${deployed.app}" value="${basedir}/ear/SampleWebApp.ear"/>
- </antcall>
+ <param name="${deployed.app}" value="${basedir}/ear/SampleWebApp.ear"/>
+ </antcall>
</target>
<target name="create-resources" depends="init-common">
@@ -60,18 +60,18 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_SampleWebApp_derby.sql"/>
</antcall>
- </target>
+ </target>
<!--
@@ -79,12 +79,12 @@
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/delete_tables.sql"/>
</antcall>
- </target>
+ </target>
-->
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp.sql
index 996f81d..cb3814b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp.sql
@@ -1,10 +1,10 @@
DROP TABLE CompositeIntStringBeanTable;
CREATE TABLE CompositeIntStringBeanTable (
- id INTEGER ,
- name VARCHAR(255) ,
- salary DOUBLE PRECISION NOT NULL,
- CONSTRAINT pk_CompositeIntStringBeanTabl PRIMARY KEY (id , name)
+ id INTEGER ,
+ name VARCHAR(255) ,
+ salary DOUBLE PRECISION NOT NULL,
+ CONSTRAINT pk_CompositeIntStringBeanTabl PRIMARY KEY (id , name)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_db2.sql
index 2098795..9e7a6cf 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_db2.sql
@@ -1,10 +1,10 @@
DROP TABLE CompositeIntStringBeanTable;
CREATE TABLE CompositeIntStringBeanTable (
- id INTEGER NOT NULL,
- name VARCHAR(255) NOT NULL,
- salary DOUBLE PRECISION NOT NULL,
- CONSTRAINT pk_CompIntStrTab PRIMARY KEY (id, name)
+ id INTEGER NOT NULL,
+ name VARCHAR(255) NOT NULL,
+ salary DOUBLE PRECISION NOT NULL,
+ CONSTRAINT pk_CompIntStrTab PRIMARY KEY (id, name)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_derby.sql
index e10d262..0601a0c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_derby.sql
@@ -1,8 +1,8 @@
DROP TABLE CompositeIntStringBeanTable;
CREATE TABLE CompositeIntStringBeanTable (
- id INTEGER NOT NULL,
- name VARCHAR(255) NOT NULL,
- salary DOUBLE PRECISION NOT NULL,
- CONSTRAINT pk_CompIntStrTab PRIMARY KEY (id, name)
+ id INTEGER NOT NULL,
+ name VARCHAR(255) NOT NULL,
+ salary DOUBLE PRECISION NOT NULL,
+ CONSTRAINT pk_CompIntStrTab PRIMARY KEY (id, name)
);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_ifx.sql
index e27f7f5..20e00dc 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_ifx.sql
@@ -1,10 +1,10 @@
DROP TABLE CompositeIntStringBeanTable;
CREATE TABLE CompositeIntStringBeanTable (
- id INTEGER,
- name VARCHAR(127),
- salary DOUBLE PRECISION NOT NULL ,
- PRIMARY KEY (id, name)
+ id INTEGER,
+ name VARCHAR(127),
+ salary DOUBLE PRECISION NOT NULL ,
+ PRIMARY KEY (id, name)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_mssql.sql
index c3431d2..09fc823 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_mssql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_mssql.sql
@@ -2,10 +2,10 @@
go
CREATE TABLE COMPOSITEINTSTRINGBEANTABLE (
- ID INTEGER,
- NAME VARCHAR(255),
- SALARY DOUBLE PRECISION NOT NULL,
- CONSTRAINT PK_COMPOSITEINTSTRINGBEANTABL PRIMARY KEY (ID, NAME)
+ ID INTEGER,
+ NAME VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL,
+ CONSTRAINT PK_COMPOSITEINTSTRINGBEANTABL PRIMARY KEY (ID, NAME)
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_mysql.sql
index 707c802..9c1d7dc 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_mysql.sql
@@ -1,10 +1,10 @@
DROP TABLE COMPOSITEiNTsTRINGbEANtABLE;
CREATE TABLE COMPOSITEINTSTRINGBEANTABLE (
- ID INTEGER,
- NAME VARCHAR(255),
- SALARY DOUBLE PRECISION NOT NULL,
- CONSTRAINT pk_CompositeIntStringBeanTabl PRIMARY KEY (ID, NAME)
+ ID INTEGER,
+ NAME VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL,
+ CONSTRAINT pk_CompositeIntStringBeanTabl PRIMARY KEY (ID, NAME)
) ENGINE=INNODB;
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_ora.sql
index 0b73178..210c0aa 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_ora.sql
@@ -1,10 +1,10 @@
DROP TABLE CompositeIntStringBeanTable;
CREATE TABLE CompositeIntStringBeanTable (
- id INTEGER,
- name VARCHAR(255),
- salary DOUBLE PRECISION NOT NULL,
- CONSTRAINT pk_CompositeIntStringBeanTabl PRIMARY KEY (id, name)
+ id INTEGER,
+ name VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL,
+ CONSTRAINT pk_CompositeIntStringBeanTabl PRIMARY KEY (id, name)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_pbs.sql
index 0b73178..210c0aa 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_pbs.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_pbs.sql
@@ -1,10 +1,10 @@
DROP TABLE CompositeIntStringBeanTable;
CREATE TABLE CompositeIntStringBeanTable (
- id INTEGER,
- name VARCHAR(255),
- salary DOUBLE PRECISION NOT NULL,
- CONSTRAINT pk_CompositeIntStringBeanTabl PRIMARY KEY (id, name)
+ id INTEGER,
+ name VARCHAR(255),
+ salary DOUBLE PRECISION NOT NULL,
+ CONSTRAINT pk_CompositeIntStringBeanTabl PRIMARY KEY (id, name)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_psql.sql
index f0eb56f..9abf0d9 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_psql.sql
@@ -1,10 +1,10 @@
DROP TABLE COMPOSITEiNTsTRINGbEANtABLE cascade;
CREATE TABLE COMPOSITEINTSTRINGBEANTABLE (
- ID INTEGER,
- NAME VARCHAR(255),
- SALARY DOUBLE PRECISION NOT NULL,
- CONSTRAINT pk_CompositeIntStringBeanTabl PRIMARY KEY (ID, NAME)
+ ID INTEGER,
+ NAME VARCHAR(255),
+ SALARY DOUBLE PRECISION NOT NULL,
+ CONSTRAINT pk_CompositeIntStringBeanTabl PRIMARY KEY (ID, NAME)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_syb.sql
index f9b3b32..927150d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_syb.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/sampleapp/sql/SampleWebApp_syb.sql
@@ -2,10 +2,10 @@
go
create table COMPOSITEINTSTRINGBEANTABLE (
- ID INTEGER not null,
- NAME VARCHAR(255) not null,
- SALARY double precision not null,
- constraint PK_COMPOSITEINTSTRINGBEANTABL primary key (ID, NAME)
+ ID INTEGER not null,
+ NAME VARCHAR(255) not null,
+ SALARY double precision not null,
+ constraint PK_COMPOSITEINTSTRINGBEANTABL primary key (ID, NAME)
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/build.properties
index 3c7880a..8669742 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/build.properties
@@ -15,22 +15,22 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="Unknownpk"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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="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="ejb/unknownpk.dbschema"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/build.xml
index 7e673fd..c81cc41 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/build.xml
@@ -34,12 +34,12 @@
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
</antcall>
-
+
<echo message="Copying dbschema file to ejb classes dir" />
<copy file="${dbschema}" todir="${build.classes.dir}/unknownpk" failonerror="false"/>
<antcall target="compile-common">
@@ -49,14 +49,14 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/A**.class, **/unknownpk.dbschema" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/A1Home.class,**/A1.class,**/A2Home.class,**/A2.class,**/*Client*.class" />
</antcall>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/unknownpk_derby.sql"/>
@@ -75,22 +75,22 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_unknownpk_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/client/Client.java
index faabff2..5b5e72e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/client/Client.java
@@ -33,12 +33,12 @@
* @version
*/
public class Client {
-
+
private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
-
+
try {
System.out.println("START");
stat.addDescription("unknownpk");
@@ -66,16 +66,16 @@
a1bean = a1home.findByPrimaryKey(pk1);
System.out.println("FOUND 1.1: " + a1bean.getName());
- stat.addStatus("ejbclient unknownpk", stat.PASS);
+ stat.addStatus("ejbclient unknownpk", stat.PASS);
System.out.println("FINISH");
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient unknownpk", stat.FAIL);
+ stat.addStatus("ejbclient unknownpk", stat.FAIL);
}
stat.printSummary("unknownpk");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/sun-ejb-jar.xml
index 48f8085..0b98292 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/descriptor/sun-ejb-jar.xml
@@ -23,14 +23,14 @@
<ejb>
<ejb-name>UNPK2</ejb-name>
<jndi-name>UNPK2</jndi-name>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <bean-cache>
- <max-cache-size>60</max-cache-size>
- <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
- <victim-selection-policy>FIFO</victim-selection-policy>
- </bean-cache>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <bean-cache>
+ <max-cache-size>60</max-cache-size>
+ <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
+ <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
+ <victim-selection-policy>FIFO</victim-selection-policy>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>UNPK1</ejb-name>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1.java
index a4953e7..ec28e4d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1.java
@@ -24,8 +24,8 @@
*/
public interface A1 extends jakarta.ejb.EJBObject {
-
+
public String getName() throws java.rmi.RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1Bean.java
index 9e8e51e..567369a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1Bean.java
@@ -26,65 +26,65 @@
public class A1Bean 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: A1Bean 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 java.lang.String getName() {
return name;
}
@@ -97,8 +97,8 @@
return null;
}
-
+
public void ejbPostCreate(java.lang.String name)
throws jakarta.ejb.CreateException { }
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1Home.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1Home.java
index c014517..1cc9aaf 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1Home.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A1Home.java
@@ -24,9 +24,9 @@
*/
public interface A1Home extends jakarta.ejb.EJBHome {
-
+
public A1 findByPrimaryKey(Object pk) throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public A1 create(java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2.java
index 6341b97..04118b9 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2.java
@@ -24,8 +24,8 @@
*/
public interface A2 extends jakarta.ejb.EJBObject {
-
+
public String getName() throws java.rmi.RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2Bean.java
index d97940c..d29e3f1 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2Bean.java
@@ -20,71 +20,71 @@
import javax.naming.*;
/**
- * 2.0 bean.
+ * 2.0 bean.
* @author mvatkina
*/
public abstract class A2Bean 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: A2Bean 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 java.lang.String getName();
public abstract void setName(java.lang.String name);
@@ -94,8 +94,8 @@
return null;
}
-
+
public void ejbPostCreate(java.lang.String name)
throws jakarta.ejb.CreateException { }
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2Home.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2Home.java
index 47cbe96..a698ad1 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2Home.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/ejb/A2Home.java
@@ -24,9 +24,9 @@
*/
public interface A2Home extends jakarta.ejb.EJBHome {
-
+
public A2 findByPrimaryKey(Object pk) throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public A2 create(java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_ifx.sql
index d05ab12..a205515 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpk/sql/unknownpk_ifx.sql
@@ -4,13 +4,13 @@
CREATE TABLE UNKNOWNPK1
(
id DECIMAL(32) PRIMARY KEY,
- name VARCHAR(32)
+ name VARCHAR(32)
);
CREATE TABLE UNKNOWNPK2
(
id DECIMAL(32) PRIMARY KEY,
- name VARCHAR(32)
+ name VARCHAR(32)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/build.properties
index ede5b75..789f796 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/build.properties
@@ -15,22 +15,22 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="UnknownpkVC"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/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="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="ejb/unknownpkVC.dbschema"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/build.xml
index 5f41f54..7a63dcb 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/build.xml
@@ -34,12 +34,12 @@
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
</antcall>
-
+
<echo message="Copying dbschema file to ejb classes dir" />
<copy file="${dbschema}" todir="${build.classes.dir}/unknownpk" failonerror="false"/>
<antcall target="compile-common">
@@ -49,14 +49,14 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/A**.class, **/unknownpkVC.dbschema" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/A1Home.class,**/A1.class,**/A2Home.class,**/A2.class,**/*Client*.class" />
</antcall>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/unknownpkVC_derby.sql"/>
@@ -75,22 +75,22 @@
<param name="asadmin.file" value="${basedir}/../common/delete_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
<antcall target="execute-ejb-sql-common">
<param name="sql.file" value="sql/drop_unknownpkVC_derby.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant all
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/client/Client.java
index 45a4654..5143070 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/client/Client.java
@@ -33,16 +33,16 @@
* @version
*/
public class Client {
-
+
private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
-
+
try {
System.out.println("START");
- stat.addDescription("unknownpkVC");
+ stat.addDescription("unknownpkVC");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/UNPK2");
@@ -67,16 +67,16 @@
a1bean = a1home.findByPrimaryKey(pk1);
System.out.println("FOUND 1.1: " + a1bean.getName());
- stat.addStatus("ejbclient unknownpkVC", stat.PASS);
+ stat.addStatus("ejbclient unknownpkVC", stat.PASS);
System.out.println("FINISH");
} catch (Exception ex) {
System.err.println("Caught an exception:");
ex.printStackTrace();
- stat.addStatus("ejbclient unknownpkVC", stat.FAIL);
+ stat.addStatus("ejbclient unknownpkVC", stat.FAIL);
}
- stat.printSummary("unknownpkVC");
+ stat.printSummary("unknownpkVC");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/sun-ejb-jar.xml
index 48f8085..0b98292 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/descriptor/sun-ejb-jar.xml
@@ -23,14 +23,14 @@
<ejb>
<ejb-name>UNPK2</ejb-name>
<jndi-name>UNPK2</jndi-name>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <bean-cache>
- <max-cache-size>60</max-cache-size>
- <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
- <victim-selection-policy>FIFO</victim-selection-policy>
- </bean-cache>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <bean-cache>
+ <max-cache-size>60</max-cache-size>
+ <is-cache-overflow-allowed>true</is-cache-overflow-allowed>
+ <cache-idle-timeout-in-seconds>600</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>6000</removal-timeout-in-seconds>
+ <victim-selection-policy>FIFO</victim-selection-policy>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>UNPK1</ejb-name>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1.java
index a4953e7..ec28e4d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1.java
@@ -24,8 +24,8 @@
*/
public interface A1 extends jakarta.ejb.EJBObject {
-
+
public String getName() throws java.rmi.RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1Bean.java
index 9e8e51e..567369a 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1Bean.java
@@ -26,65 +26,65 @@
public class A1Bean 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: A1Bean 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 java.lang.String getName() {
return name;
}
@@ -97,8 +97,8 @@
return null;
}
-
+
public void ejbPostCreate(java.lang.String name)
throws jakarta.ejb.CreateException { }
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1Home.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1Home.java
index c014517..1cc9aaf 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1Home.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A1Home.java
@@ -24,9 +24,9 @@
*/
public interface A1Home extends jakarta.ejb.EJBHome {
-
+
public A1 findByPrimaryKey(Object pk) throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public A1 create(java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2.java
index 6341b97..04118b9 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2.java
@@ -24,8 +24,8 @@
*/
public interface A2 extends jakarta.ejb.EJBObject {
-
+
public String getName() throws java.rmi.RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2Bean.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2Bean.java
index d97940c..d29e3f1 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2Bean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2Bean.java
@@ -20,71 +20,71 @@
import javax.naming.*;
/**
- * 2.0 bean.
+ * 2.0 bean.
* @author mvatkina
*/
public abstract class A2Bean 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: A2Bean 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 java.lang.String getName();
public abstract void setName(java.lang.String name);
@@ -94,8 +94,8 @@
return null;
}
-
+
public void ejbPostCreate(java.lang.String name)
throws jakarta.ejb.CreateException { }
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2Home.java b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2Home.java
index 47cbe96..a698ad1 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2Home.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/ejb/A2Home.java
@@ -24,9 +24,9 @@
*/
public interface A2Home extends jakarta.ejb.EJBHome {
-
+
public A2 findByPrimaryKey(Object pk) throws java.rmi.RemoteException, jakarta.ejb.FinderException;
-
+
public A2 create(java.lang.String name) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_db2.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_db2.sql
index 656b7b5..617e9ed 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_db2.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_db2.sql
@@ -6,16 +6,16 @@
CREATE TABLE UNKNOWNPKVC1
(
- ID NUMERIC(30) PRIMARY KEY NOT NULL,
+ ID NUMERIC(30) PRIMARY KEY NOT NULL,
NAME VARCHAR(32),
- VERSION NUMERIC(19) NOT NULL
+ VERSION NUMERIC(19) NOT NULL
);
CREATE TABLE UNKNOWNPKVC2
(
ID NUMERIC(30) PRIMARY KEY NOT NULL,
NAME VARCHAR(32),
- VERSION NUMERIC(19) NOT NULL
+ VERSION NUMERIC(19) NOT NULL
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_derby.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_derby.sql
index dd7bc65..3a3496f 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_derby.sql
@@ -6,16 +6,16 @@
CREATE TABLE UNKNOWNPKVC1
(
- ID NUMERIC(30) PRIMARY KEY NOT NULL,
+ ID NUMERIC(30) PRIMARY KEY NOT NULL,
NAME VARCHAR(32),
- VERSION NUMERIC(19) NOT NULL
+ VERSION NUMERIC(19) NOT NULL
);
CREATE TABLE UNKNOWNPKVC2
(
ID NUMERIC(30) PRIMARY KEY NOT NULL,
NAME VARCHAR(32),
- VERSION NUMERIC(19) NOT NULL
+ VERSION NUMERIC(19) NOT NULL
);
CREATE TRIGGER T_UNKNOWNPKVC1
@@ -24,7 +24,7 @@
OLD AS O_ROW
FOR EACH ROW MODE DB2SQL
UPDATE UNKNOWNPKVC1 SET version = O_ROW.version + 1
- WHERE ID = O_ROW.ID
+ WHERE ID = O_ROW.ID
;
CREATE TRIGGER T_UNKNOWNPKVC2
@@ -33,5 +33,5 @@
OLD AS O_ROW
FOR EACH ROW MODE DB2SQL
UPDATE UNKNOWNPKVC2 SET version = O_ROW.version + 1
- WHERE ID = O_ROW.ID
+ WHERE ID = O_ROW.ID
;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_ifx.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_ifx.sql
index 554b23d..7c67fba 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_ifx.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_ifx.sql
@@ -6,16 +6,16 @@
CREATE TABLE UNKNOWNPKVC1
(
- ID DECIMAL(32) PRIMARY KEY,
- NAME VARCHAR(32) ,
- VERSION DECIMAL(19) NOT NULL
+ ID DECIMAL(32) PRIMARY KEY,
+ NAME VARCHAR(32) ,
+ VERSION DECIMAL(19) NOT NULL
);
CREATE TABLE UNKNOWNPKVC2
(
- ID DECIMAL(32) PRIMARY KEY,
- NAME VARCHAR(32) ,
- VERSION DECIMAL(19) NOT NULL
+ ID DECIMAL(32) PRIMARY KEY,
+ NAME VARCHAR(32) ,
+ VERSION DECIMAL(19) NOT NULL
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_mssql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_mssql.sql
index 235f9bd..5d0b3ff 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_mssql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_mssql.sql
@@ -9,15 +9,15 @@
CREATE TABLE UNKNOWNPKVC1
(
ID NUMERIC(38) PRIMARY KEY,
- NAME VARCHAR(32) NULL,
- VERSION NUMERIC(19) NOT NULL
+ NAME VARCHAR(32) NULL,
+ VERSION NUMERIC(19) NOT NULL
)
CREATE TABLE UNKNOWNPKVC2
(
ID NUMERIC(38) PRIMARY KEY,
- NAME VARCHAR(32) NULL,
- VERSION NUMERIC(19) NOT NULL
+ NAME VARCHAR(32) NULL,
+ VERSION NUMERIC(19) NOT NULL
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_mysql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_mysql.sql
index bb2b595..129f158 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_mysql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_mysql.sql
@@ -6,16 +6,16 @@
CREATE TABLE UNKNOWNPKVC1
(
- ID DECIMAL(38) PRIMARY KEY,
- NAME VARCHAR(32) NULL,
- VERSION DECIMAL(19) NOT NULL
+ ID DECIMAL(38) PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ VERSION DECIMAL(19) NOT NULL
) engine=InnoDB;
CREATE TABLE UNKNOWNPKVC2
(
- ID DECIMAL(38) PRIMARY KEY,
- NAME VARCHAR(32) NULL,
- VERSION DECIMAL(19) NOT NULL
+ ID DECIMAL(38) PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ VERSION DECIMAL(19) NOT NULL
) engine=InnoDB;
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_ora.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_ora.sql
index 4ae7469..1b6486b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_ora.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_ora.sql
@@ -6,16 +6,16 @@
CREATE TABLE UNKNOWNPKVC1
(
- ID NUMBER(38) PRIMARY KEY,
- NAME VARCHAR2(32) NULL,
- VERSION NUMBER(19) NOT NULL
+ ID NUMBER(38) PRIMARY KEY,
+ NAME VARCHAR2(32) NULL,
+ VERSION NUMBER(19) NOT NULL
);
CREATE TABLE UNKNOWNPKVC2
(
- ID NUMBER(38) PRIMARY KEY,
- NAME VARCHAR2(32) NULL,
- VERSION NUMBER(19) NOT NULL
+ ID NUMBER(38) PRIMARY KEY,
+ NAME VARCHAR2(32) NULL,
+ VERSION NUMBER(19) NOT NULL
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_pbs.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_pbs.sql
index 6e9819c..0efbedf 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_pbs.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_pbs.sql
@@ -4,16 +4,16 @@
CREATE TABLE UNKNOWNPKVC1
(
- ID NUMBER(38) PRIMARY KEY,
- NAME VARCHAR2(32) NULL,
- VERSION NUMBER(19) NOT NULL
+ ID NUMBER(38) PRIMARY KEY,
+ NAME VARCHAR2(32) NULL,
+ VERSION NUMBER(19) NOT NULL
);
CREATE TABLE UNKNOWNPKVC2
(
- ID NUMBER(38) PRIMARY KEY,
- NAME VARCHAR2(32) NULL,
- VERSION NUMBER(19) NOT NULL
+ ID NUMBER(38) PRIMARY KEY,
+ NAME VARCHAR2(32) NULL,
+ VERSION NUMBER(19) NOT NULL
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_psql.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_psql.sql
index 05eda06..eba6e45 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_psql.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_psql.sql
@@ -3,16 +3,16 @@
CREATE TABLE UNKNOWNPKVC1
(
- ID DECIMAL(38) PRIMARY KEY,
- NAME VARCHAR(32) NULL,
- VERSION DECIMAL(19) NOT NULL
+ ID DECIMAL(38) PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ VERSION DECIMAL(19) NOT NULL
);
CREATE TABLE UNKNOWNPKVC2
(
- ID DECIMAL(38) PRIMARY KEY,
- NAME VARCHAR(32) NULL,
- VERSION DECIMAL(19) NOT NULL
+ ID DECIMAL(38) PRIMARY KEY,
+ NAME VARCHAR(32) NULL,
+ VERSION DECIMAL(19) NOT NULL
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_syb.sql b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_syb.sql
index 685da7b..db363a2 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_syb.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/cmp/unknownpkVC/sql/unknownpkVC_syb.sql
@@ -9,15 +9,15 @@
CREATE TABLE UNKNOWNPKVC1
(
ID NUMERIC(38) PRIMARY KEY NOT NULL,
- NAME VARCHAR(32) NULL,
- VERSION NUMERIC(19) NOT NULL
+ NAME VARCHAR(32) NULL,
+ VERSION NUMERIC(19) NOT NULL
)
CREATE TABLE UNKNOWNPKVC2
(
ID NUMERIC(38) PRIMARY KEY NOT NULL,
- NAME VARCHAR(32) NULL,
- VERSION NUMERIC(19) NOT NULL
+ NAME VARCHAR(32) NULL,
+ VERSION NUMERIC(19) NOT NULL
)
go
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/config/com/sun/enterprise/config/impl/ConfigContextImplTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/config/com/sun/enterprise/config/impl/ConfigContextImplTest.java
index 93372fb..30f18de 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/config/com/sun/enterprise/config/impl/ConfigContextImplTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/config/com/sun/enterprise/config/impl/ConfigContextImplTest.java
@@ -53,181 +53,181 @@
super(name);
}
- public void testInitContext()
- {
- assertTrue(runtimeCtx != null);
- assertTrue(adminCtx != null);
- assertTrue(adminCtx != runtimeCtx);
- }
+ public void testInitContext()
+ {
+ assertTrue(runtimeCtx != null);
+ assertTrue(adminCtx != null);
+ assertTrue(adminCtx != runtimeCtx);
+ }
- public void testRuntimeCtx() throws Exception
- {
- assertTrue(getInterceptor(runtimeCtx).isResolvingPaths());
- ConfigContext clone = (ConfigContext)runtimeCtx.clone();
- assertTrue(getInterceptor(clone).isResolvingPaths());
- }
+ public void testRuntimeCtx() throws Exception
+ {
+ assertTrue(getInterceptor(runtimeCtx).isResolvingPaths());
+ ConfigContext clone = (ConfigContext)runtimeCtx.clone();
+ assertTrue(getInterceptor(clone).isResolvingPaths());
+ }
- public void testAdminCtx() throws Exception
- {
- assertFalse(getInterceptor(adminCtx).isResolvingPaths());
- ConfigContext clone = (ConfigContext)adminCtx.clone();
- assertFalse(getInterceptor(clone).isResolvingPaths());
- }
+ public void testAdminCtx() throws Exception
+ {
+ assertFalse(getInterceptor(adminCtx).isResolvingPaths());
+ ConfigContext clone = (ConfigContext)adminCtx.clone();
+ assertFalse(getInterceptor(clone).isResolvingPaths());
+ }
- public void testDomainInRuntimeCtx() throws Exception
- {
- Domain domain = (Domain)runtimeCtx.getRootConfigBean();
- assertTrue(domain.getInterceptor().isResolvingPaths());
- ConfigContext clone = (ConfigContext)runtimeCtx.clone();
- domain = (Domain)clone.getRootConfigBean();
- assertTrue(domain.getInterceptor().isResolvingPaths());
- }
+ public void testDomainInRuntimeCtx() throws Exception
+ {
+ Domain domain = (Domain)runtimeCtx.getRootConfigBean();
+ assertTrue(domain.getInterceptor().isResolvingPaths());
+ ConfigContext clone = (ConfigContext)runtimeCtx.clone();
+ domain = (Domain)clone.getRootConfigBean();
+ assertTrue(domain.getInterceptor().isResolvingPaths());
+ }
- public void testDomainInAdminCtx() throws Exception
- {
- Domain domain = (Domain)adminCtx.getRootConfigBean();
- assertFalse(domain.getInterceptor().isResolvingPaths());
- ConfigContext clone = (ConfigContext)adminCtx.clone();
- domain = (Domain)clone.getRootConfigBean();
- assertFalse(domain.getInterceptor().isResolvingPaths());
- }
+ public void testDomainInAdminCtx() throws Exception
+ {
+ Domain domain = (Domain)adminCtx.getRootConfigBean();
+ assertFalse(domain.getInterceptor().isResolvingPaths());
+ ConfigContext clone = (ConfigContext)adminCtx.clone();
+ domain = (Domain)clone.getRootConfigBean();
+ assertFalse(domain.getInterceptor().isResolvingPaths());
+ }
- public void testServerInRuntimeCtx() throws Exception
- {
- Domain domain = (Domain)runtimeCtx.getRootConfigBean();
- Server s = domain.getServers().getServerByName("server");
- assertTrue(s.getInterceptor().isResolvingPaths());
- ConfigContext clone = (ConfigContext)runtimeCtx.clone();
- assertTrue(s.getInterceptor().isResolvingPaths());
- domain = (Domain)clone.getRootConfigBean();
- s = domain.getServers().getServerByName("server");
- assertTrue(s.getInterceptor().isResolvingPaths());
- }
+ public void testServerInRuntimeCtx() throws Exception
+ {
+ Domain domain = (Domain)runtimeCtx.getRootConfigBean();
+ Server s = domain.getServers().getServerByName("server");
+ assertTrue(s.getInterceptor().isResolvingPaths());
+ ConfigContext clone = (ConfigContext)runtimeCtx.clone();
+ assertTrue(s.getInterceptor().isResolvingPaths());
+ domain = (Domain)clone.getRootConfigBean();
+ s = domain.getServers().getServerByName("server");
+ assertTrue(s.getInterceptor().isResolvingPaths());
+ }
- public void testServerInAdminCtx() throws Exception
- {
- Domain domain = (Domain)adminCtx.getRootConfigBean();
- Server s = domain.getServers().getServerByName("server");
- assertFalse(s.getInterceptor().isResolvingPaths());
- ConfigContext clone = (ConfigContext)adminCtx.clone();
- assertFalse(s.getInterceptor().isResolvingPaths());
- domain = (Domain)clone.getRootConfigBean();
- s = domain.getServers().getServerByName("server");
- assertFalse(s.getInterceptor().isResolvingPaths());
- }
+ public void testServerInAdminCtx() throws Exception
+ {
+ Domain domain = (Domain)adminCtx.getRootConfigBean();
+ Server s = domain.getServers().getServerByName("server");
+ assertFalse(s.getInterceptor().isResolvingPaths());
+ ConfigContext clone = (ConfigContext)adminCtx.clone();
+ assertFalse(s.getInterceptor().isResolvingPaths());
+ domain = (Domain)clone.getRootConfigBean();
+ s = domain.getServers().getServerByName("server");
+ assertFalse(s.getInterceptor().isResolvingPaths());
+ }
- public void testSSLPortInRuntimeCtx() throws Exception
- {
- assertEquals("1060", getSSLPort(runtimeCtx));
- ConfigContext clone = (ConfigContext)runtimeCtx.clone();
- assertEquals("1060", getSSLPort(clone));
- }
+ public void testSSLPortInRuntimeCtx() throws Exception
+ {
+ assertEquals("1060", getSSLPort(runtimeCtx));
+ ConfigContext clone = (ConfigContext)runtimeCtx.clone();
+ assertEquals("1060", getSSLPort(clone));
+ }
- public void testSSLPortInAdminCtx() throws Exception
- {
- assertEquals("${SSL-port}", getSSLPort(adminCtx));
- ConfigContext clone = (ConfigContext)adminCtx.clone();
- assertEquals("${SSL-port}", getSSLPort(clone));
- }
+ public void testSSLPortInAdminCtx() throws Exception
+ {
+ assertEquals("${SSL-port}", getSSLPort(adminCtx));
+ ConfigContext clone = (ConfigContext)adminCtx.clone();
+ assertEquals("${SSL-port}", getSSLPort(clone));
+ }
- public void testAllChildrenInRuntimeCtx() throws Exception
- {
- testAllConfigBeans(getAllConfigBeans(runtimeCtx), true);
- ConfigContext clone = (ConfigContext)runtimeCtx.clone();
- testAllConfigBeans(getAllConfigBeans(clone), true);
- clone = (ConfigContext)clone.clone();
- testAllConfigBeans(getAllConfigBeans(clone), true);
- }
+ public void testAllChildrenInRuntimeCtx() throws Exception
+ {
+ testAllConfigBeans(getAllConfigBeans(runtimeCtx), true);
+ ConfigContext clone = (ConfigContext)runtimeCtx.clone();
+ testAllConfigBeans(getAllConfigBeans(clone), true);
+ clone = (ConfigContext)clone.clone();
+ testAllConfigBeans(getAllConfigBeans(clone), true);
+ }
- public void testAllChildrenInAdminCtx() throws Exception
- {
- testAllConfigBeans(getAllConfigBeans(adminCtx), false);
- ConfigContext clone = (ConfigContext)adminCtx.clone();
- testAllConfigBeans(getAllConfigBeans(clone), false);
- clone = (ConfigContext)clone.clone();
- testAllConfigBeans(getAllConfigBeans(clone), false);
- }
+ public void testAllChildrenInAdminCtx() throws Exception
+ {
+ testAllConfigBeans(getAllConfigBeans(adminCtx), false);
+ ConfigContext clone = (ConfigContext)adminCtx.clone();
+ testAllConfigBeans(getAllConfigBeans(clone), false);
+ clone = (ConfigContext)clone.clone();
+ testAllConfigBeans(getAllConfigBeans(clone), false);
+ }
- public void testSsl() throws Exception
- {
- Domain domain = (Domain)runtimeCtx.getRootConfigBean();
- IiopListener listener = domain.getConfigs().getConfigByName("server-config").
- getIiopService().getIiopListenerById("SSL");
- assertTrue(listener.getInterceptor().isResolvingPaths());
- Ssl ssl = listener.getSsl();
- assertTrue(ssl.getConfigContext() == runtimeCtx);
- assertTrue(ssl.getInterceptor().isResolvingPaths());
- }
+ public void testSsl() throws Exception
+ {
+ Domain domain = (Domain)runtimeCtx.getRootConfigBean();
+ IiopListener listener = domain.getConfigs().getConfigByName("server-config").
+ getIiopService().getIiopListenerById("SSL");
+ assertTrue(listener.getInterceptor().isResolvingPaths());
+ Ssl ssl = listener.getSsl();
+ assertTrue(ssl.getConfigContext() == runtimeCtx);
+ assertTrue(ssl.getInterceptor().isResolvingPaths());
+ }
- List testAllConfigBeans(List l, boolean isResolve)
- {
- assertTrue((l != null) && (l.size() >=1));
- Iterator it = l.iterator();
- List failed = new ArrayList();
- while (it.hasNext())
- {
- ConfigBean cb = (ConfigBean)it.next();
- if (isResolve != cb.getInterceptor().isResolvingPaths())
- {
- failed.add(cb.getXPath());
- }
- }
- if (failed.size() > 0)
- {
- System.out.println("Failed: "+failed);
- }
- return failed;
- }
+ List testAllConfigBeans(List l, boolean isResolve)
+ {
+ assertTrue((l != null) && (l.size() >=1));
+ Iterator it = l.iterator();
+ List failed = new ArrayList();
+ while (it.hasNext())
+ {
+ ConfigBean cb = (ConfigBean)it.next();
+ if (isResolve != cb.getInterceptor().isResolvingPaths())
+ {
+ failed.add(cb.getXPath());
+ }
+ }
+ if (failed.size() > 0)
+ {
+ System.out.println("Failed: "+failed);
+ }
+ return failed;
+ }
- List getAllConfigBeans(ConfigContext cc) throws Exception
- {
- ArrayList al = new ArrayList();
- ConfigBean root = cc.getRootConfigBean();
- assertTrue(root != null);
- al.add(root);
- al.addAll(getAllChildBeans(root));
- return al;
- }
+ List getAllConfigBeans(ConfigContext cc) throws Exception
+ {
+ ArrayList al = new ArrayList();
+ ConfigBean root = cc.getRootConfigBean();
+ assertTrue(root != null);
+ al.add(root);
+ al.addAll(getAllChildBeans(root));
+ return al;
+ }
- List getAllChildBeans(ConfigBean parent)
- {
- ArrayList al = new ArrayList();
- ConfigBean[] children = parent.getAllChildBeans();
- if (children != null)
- {
- for (int i = 0; i < children.length; i++)
- {
- if (children[i] != null)
- {
- al.add(children[i]);
- al.addAll(getAllChildBeans(children[i]));
- }
- }
- }
- return al;
- }
+ List getAllChildBeans(ConfigBean parent)
+ {
+ ArrayList al = new ArrayList();
+ ConfigBean[] children = parent.getAllChildBeans();
+ if (children != null)
+ {
+ for (int i = 0; i < children.length; i++)
+ {
+ if (children[i] != null)
+ {
+ al.add(children[i]);
+ al.addAll(getAllChildBeans(children[i]));
+ }
+ }
+ }
+ return al;
+ }
- String getSSLPort(ConfigContext cc) throws Exception
- {
- Domain domain = (Domain)cc.getRootConfigBean();
- assertTrue(domain != null);
- IiopListener sslListener = domain.getConfigs().
- getConfigByName("server-config").getIiopService().getIiopListenerById("SSL");
- assertTrue(sslListener != null);
- return sslListener.getPort();
- }
+ String getSSLPort(ConfigContext cc) throws Exception
+ {
+ Domain domain = (Domain)cc.getRootConfigBean();
+ assertTrue(domain != null);
+ IiopListener sslListener = domain.getConfigs().
+ getConfigByName("server-config").getIiopService().getIiopListenerById("SSL");
+ assertTrue(sslListener != null);
+ return sslListener.getPort();
+ }
- boolean isResolve(ConfigContext cc)
- {
- return ((ConfigContextImpl)cc).getConfigBeanInterceptor().isResolvingPaths();
- }
+ boolean isResolve(ConfigContext cc)
+ {
+ return ((ConfigContextImpl)cc).getConfigBeanInterceptor().isResolvingPaths();
+ }
- ConfigBeanInterceptor getInterceptor(ConfigContext cc)
- {
- return ((ConfigContextImpl)cc).getConfigBeanInterceptor();
- }
+ ConfigBeanInterceptor getInterceptor(ConfigContext cc)
+ {
+ return ((ConfigContextImpl)cc).getConfigBeanInterceptor();
+ }
- protected void setUp()
+ protected void setUp()
{
LogDomains.getLogger(EELogDomains.EE_ADMIN_LOGGER);
}
@@ -244,39 +244,39 @@
public static void main(String args[]) throws Exception
{
- System.setProperty("SSL-port", "1060");
+ System.setProperty("SSL-port", "1060");
- initRuntimeContext();
- initAdminContext();
+ initRuntimeContext();
+ initAdminContext();
final TestRunner runner= new TestRunner();
final TestResult result = runner.doRun(ConfigContextImplTest.suite(), false);
System.exit(result.errorCount() + result.failureCount());
}
- static ConfigContext runtimeCtx = null;
+ static ConfigContext runtimeCtx = null;
private static void initRuntimeContext() throws Exception
{
- ConfigEnvironment ce = getConfigEnvironment();
- runtimeCtx = ConfigContextFactory.createConfigContext(ce);
+ ConfigEnvironment ce = getConfigEnvironment();
+ runtimeCtx = ConfigContextFactory.createConfigContext(ce);
}
- static ConfigContext adminCtx = null;
+ static ConfigContext adminCtx = null;
private static void initAdminContext() throws Exception
{
- ConfigEnvironment ce = getConfigEnvironment();
+ ConfigEnvironment ce = getConfigEnvironment();
ce.getConfigBeanInterceptor().setResolvingPaths(false);
- adminCtx = ConfigContextFactory.createConfigContext(ce);
+ adminCtx = ConfigContextFactory.createConfigContext(ce);
}
- static ConfigEnvironment getConfigEnvironment()
- {
- ConfigEnvironment ce = new AppserverConfigEnvironmentFactory().
- getConfigEnvironment();
- ce.setUrl("F:\\tmp\\domain.xml");
+ static ConfigEnvironment getConfigEnvironment()
+ {
+ ConfigEnvironment ce = new AppserverConfigEnvironmentFactory().
+ getConfigEnvironment();
+ ce.setUrl("F:\\tmp\\domain.xml");
ce.setReadOnly(false);
ce.setCachingEnabled(false);
ce.setRootClass("com.sun.enterprise.config.serverbeans.Domain");
ce.setHandler("com.sun.enterprise.config.serverbeans.ServerValidationHandler");
- return ce;
- }
+ return ce;
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/build.properties
index b3dec7b..9aebcb2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/build.properties
@@ -15,12 +15,12 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="corba"/>
-<property name="appname" value="timer"/>
+<property name="appname" value="timer"/> \u0020
<property name="build.dir" value="${env.APS_HOME}/build/${module}/${appname}"/>
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/build.xml
index 79407b8..84346a6 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/build.xml
@@ -45,7 +45,7 @@
<pathelement location="${env.S1AS_HOME}/lib/appserv-rt.jar" />
<pathelement location="${env.APS_HOME}/lib/testng.jar"/>
</path>
-
+
<target name="compile" depends="init-common">
<mkdir dir="${build.dir}/classes" />
<echo message="compile, build.class.dir=${build.dir}/classes"/>
@@ -53,12 +53,12 @@
debug="true" source="1.5">
<classpath>
<path refid="compile.classpath" />
- </classpath>
+ </classpath>
</javac>
</target>
<target name="build" depends="compile">
- </target>
+ </target>
<path id="run.classpath">
<pathelement location="${build.dir}/classes"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/ActivationSuite.java b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/ActivationSuite.java
index 1880a3d..2458706 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/ActivationSuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/ActivationSuite.java
@@ -51,68 +51,68 @@
public class ActivationSuite {
// Test set up:
- //Timer groups:
- // ga contains gb, gc
- // gb contains gd
- // gc contains gd
- // gd contains ge
- // ge contains gc
+ //Timer groups:
+ // ga contains gb, gc
+ // gb contains gd
+ // gc contains gd
+ // gd contains ge
+ // ge contains gc
//
- // Timers (in groups)
- // ga contains t1
- // gb contains t2, t3
+ // Timers (in groups)
+ // ga contains t1
+ // gb contains t2, t3
// gc contains t4
// gd contains t5, t6
// ge contains t7, t8
//
// All descriptions are the same as the names
//
-
+
private String tfName = "TFActivation" ;
private List<Pair<String,List<String>>> data = asList(
- mkPair( "ga", "gb", "t1" ),
- mkPair( "gb", "gd", "t2", "t3" ),
- mkPair( "gc", "gd", "t4" ),
- mkPair( "gd", "ge", "t5", "t6" ),
- mkPair( "ge", "gc", "t7", "t8" ) ) ;
+ mkPair( "ga", "gb", "t1" ),
+ mkPair( "gb", "gd", "t2", "t3" ),
+ mkPair( "gc", "gd", "t4" ),
+ mkPair( "gd", "ge", "t5", "t6" ),
+ mkPair( "ge", "gc", "t7", "t8" ) ) ;
private List<String> t1_t8 = asList(
- "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8" ) ;
+ "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8" ) ;
private List<String> t2_t8 = asList(
- "t2", "t3", "t4", "t5", "t6", "t7", "t8" ) ;
+ "t2", "t3", "t4", "t5", "t6", "t7", "t8" ) ;
private List<String> t4_t8 = asList(
- "t4", "t5", "t6", "t7", "t8" ) ;
+ "t4", "t5", "t6", "t7", "t8" ) ;
// List<Pair<List<String>,List<String>>>
// for each element of list:
// first is Controllables to enable, second is expected active set
//
private List<Pair<List<String>,List<String>>> testData = asList(
- mkPList( asList( "t1", "t3" ), asList( "t1", "t3" )),
- mkPList( asList( "ga" ), t1_t8 ),
- mkPList( asList( "gb" ), t2_t8 ),
- mkPList( asList( "gc" ), t4_t8 ),
- mkPList( asList( "gd" ), t4_t8 ),
- mkPList( asList( "ge" ), t4_t8 ),
- mkPList( asList( "ge", "t1", "t3" ),
- asList( "t1", "t3", "t4", "t5", "t6", "t7", "t8" )),
- mkPList( asList( "gb", "gc" ), t2_t8 )) ;
+ mkPList( asList( "t1", "t3" ), asList( "t1", "t3" )),
+ mkPList( asList( "ga" ), t1_t8 ),
+ mkPList( asList( "gb" ), t2_t8 ),
+ mkPList( asList( "gc" ), t4_t8 ),
+ mkPList( asList( "gd" ), t4_t8 ),
+ mkPList( asList( "ge" ), t4_t8 ),
+ mkPList( asList( "ge", "t1", "t3" ),
+ asList( "t1", "t3", "t4", "t5", "t6", "t7", "t8" )),
+ mkPList( asList( "gb", "gc" ), t2_t8 )) ;
- private List<String> evIn = asList(
- "t1<10", "t1>120",
- "t2<13", "t3<15", "t1<21", "t1>4", "t3>34", "t2>27",
- "t1<12", "t1<23", "t1<31", "t1>24", "t1>8", "t1>91" ) ;
+ private List<String> evIn = asList(
+ "t1<10", "t1>120",
+ "t2<13", "t3<15", "t1<21", "t1>4", "t3>34", "t2>27",
+ "t1<12", "t1<23", "t1<31", "t1>24", "t1>8", "t1>91" ) ;
// Timings:
// t1 20 25 55 86 189
// t2 114
// t3 74
- //
- private List<String> evOut = asList(
- "t1<", "t1>",
- "t3<", "t1<", "t1>", "t3>",
- "t1<", "t1<", "t1<", "t1>", "t1>", "t1>" ) ;
+ //
+ private List<String> evOut = asList(
+ "t1<", "t1>",
+ "t3<", "t1<", "t1>", "t3>",
+ "t1<", "t1<", "t1<", "t1>", "t1>", "t1>" ) ;
private String controllerName = "TestController" ;
private TimerFactory tf ;
@@ -122,326 +122,326 @@
private MyTimerEventHandler h1 ;
private MyTimerEventHandler h2 ;
private TimerEventController controller ;
-
+
private Pair<String,List<String>> mkPair( String key, String... values ) {
- return new Pair<String,List<String>>(
- key, asList( values ) ) ;
+ return new Pair<String,List<String>>(
+ key, asList( values ) ) ;
}
private Pair<List<String>,List<String>> mkPList( List<String> first,
- List<String> second ) {
-
- return new Pair<List<String>,List<String>>(
- first, second ) ;
+ List<String> second ) {
+
+ return new Pair<List<String>,List<String>>(
+ first, second ) ;
}
private <T> Set<T> asSet( T... args ) {
- Set<T> result = new HashSet<T>() ;
- for (T t : args)
- result.add( t ) ;
- return result ;
+ Set<T> result = new HashSet<T>() ;
+ for (T t : args)
+ result.add( t ) ;
+ return result ;
}
private Controllable makeOrGetControllable( String str ) {
- if (str.charAt(0)=='g') {
- // Make a TimerGroup
- TimerGroup tg = tf.timerGroups().get( str ) ;
- if (tg == null) {
- tg = tf.makeTimerGroup( str, str ) ;
- timerGroups.add( tg ) ;
- }
- return tg ;
- } else if (str.charAt(0)=='t') {
- // Make a Timer
- Timer t = tf.timers().get( str ) ;
- if (t == null) {
- t = tf.makeTimer( str, str ) ;
- timers.add( t ) ;
- }
- return t ;
- } else {
- // error in test data
- Assert.fail( "Bad data string" ) ;
- return null ;
- }
+ if (str.charAt(0)=='g') {
+ // Make a TimerGroup
+ TimerGroup tg = tf.timerGroups().get( str ) ;
+ if (tg == null) {
+ tg = tf.makeTimerGroup( str, str ) ;
+ timerGroups.add( tg ) ;
+ }
+ return tg ;
+ } else if (str.charAt(0)=='t') {
+ // Make a Timer
+ Timer t = tf.timers().get( str ) ;
+ if (t == null) {
+ t = tf.makeTimer( str, str ) ;
+ timers.add( t ) ;
+ }
+ return t ;
+ } else {
+ // error in test data
+ Assert.fail( "Bad data string" ) ;
+ return null ;
+ }
}
private Controllable getControllable( String str ) {
- if (str.charAt(0)=='g') {
- // Get a TimerGroup
- TimerGroup tg = tf.timerGroups().get( str ) ;
- Assert.assertTrue( tg != null ) ;
- Assert.assertEquals( tg.name(), str ) ;
- return tg ;
- } else if (str.charAt(0)=='t') {
- // Get a Timer
- Timer t = tf.timers().get( str ) ;
- Assert.assertTrue( t != null ) ;
- Assert.assertEquals( t.name(), str ) ;
- return t ;
- } else {
- // error in test data
- Assert.fail( "Bad data string" ) ;
- return null ;
- }
+ if (str.charAt(0)=='g') {
+ // Get a TimerGroup
+ TimerGroup tg = tf.timerGroups().get( str ) ;
+ Assert.assertTrue( tg != null ) ;
+ Assert.assertEquals( tg.name(), str ) ;
+ return tg ;
+ } else if (str.charAt(0)=='t') {
+ // Get a Timer
+ Timer t = tf.timers().get( str ) ;
+ Assert.assertTrue( t != null ) ;
+ Assert.assertEquals( t.name(), str ) ;
+ return t ;
+ } else {
+ // error in test data
+ Assert.fail( "Bad data string" ) ;
+ return null ;
+ }
}
@Configuration( beforeTest = true )
public void setUp() {
- tf = TimerFactoryBuilder.make( tfName, tfName ) ;
- timers = new ArrayList<Timer>() ;
- timerGroups = new ArrayList<TimerGroup>() ;
- timerGroups.add( tf ) ;
+ tf = TimerFactoryBuilder.make( tfName, tfName ) ;
+ timers = new ArrayList<Timer>() ;
+ timerGroups = new ArrayList<TimerGroup>() ;
+ timerGroups.add( tf ) ;
- for (Pair<String,List<String>> elem : data) {
- String head = elem.first() ;
- List<String> tail = elem.second() ;
- Controllable con = makeOrGetControllable( head ) ;
- Assert.assertTrue( con instanceof TimerGroup ) ;
- TimerGroup container = TimerGroup.class.cast( con ) ;
- for (String str : tail) {
- Controllable c2 = makeOrGetControllable( str ) ;
- container.add( c2 ) ;
- }
- }
+ for (Pair<String,List<String>> elem : data) {
+ String head = elem.first() ;
+ List<String> tail = elem.second() ;
+ Controllable con = makeOrGetControllable( head ) ;
+ Assert.assertTrue( con instanceof TimerGroup ) ;
+ TimerGroup container = TimerGroup.class.cast( con ) ;
+ for (String str : tail) {
+ Controllable c2 = makeOrGetControllable( str ) ;
+ container.add( c2 ) ;
+ }
+ }
- h1 = new MyTimerEventHandler( "h1" ) ;
- h2 = new MyTimerEventHandler( "h2" ) ;
- controller = tf.makeController( controllerName ) ;
+ h1 = new MyTimerEventHandler( "h1" ) ;
+ h2 = new MyTimerEventHandler( "h2" ) ;
+ controller = tf.makeController( controllerName ) ;
}
private <T extends Controllable> void checkList( List<? extends T> list,
- Map<String,? extends T> map ) {
+ Map<String,? extends T> map ) {
- Assert.assertEquals( list.size(), map.size() ) ;
- for (T t : list) {
- Assert.assertEquals( t, map.get( t.name() ) ) ;
- }
+ Assert.assertEquals( list.size(), map.size() ) ;
+ for (T t : list) {
+ Assert.assertEquals( t, map.get( t.name() ) ) ;
+ }
}
@Test()
public void validate() {
- checkList( timers, tf.timers() ) ;
- checkList( timerGroups, tf.timerGroups() ) ;
+ checkList( timers, tf.timers() ) ;
+ checkList( timerGroups, tf.timerGroups() ) ;
- for (Pair<String,List<String>> elem : data) {
- String head = elem.first() ;
- List<String> tail = elem.second() ;
- Controllable con = getControllable( head ) ;
- Assert.assertTrue( con instanceof TimerGroup ) ;
- TimerGroup container = TimerGroup.class.cast( con ) ;
- Assert.assertTrue( container.contents().size() == tail.size() ) ;
- for (String str : tail) {
- Controllable c2 = getControllable( str ) ;
- Assert.assertTrue( container.contents().contains( c2 ) ) ;
- }
- }
+ for (Pair<String,List<String>> elem : data) {
+ String head = elem.first() ;
+ List<String> tail = elem.second() ;
+ Controllable con = getControllable( head ) ;
+ Assert.assertTrue( con instanceof TimerGroup ) ;
+ TimerGroup container = TimerGroup.class.cast( con ) ;
+ Assert.assertTrue( container.contents().size() == tail.size() ) ;
+ for (String str : tail) {
+ Controllable c2 = getControllable( str ) ;
+ Assert.assertTrue( container.contents().contains( c2 ) ) ;
+ }
+ }
}
private Set<Controllable> makeControllableSet( List<String> strs ) {
- Set<Controllable> result = new HashSet<Controllable>() ;
- for (String str : strs) {
- Controllable c = getControllable( str ) ;
- result.add( c ) ;
- }
-
- return result ;
+ Set<Controllable> result = new HashSet<Controllable>() ;
+ for (String str : strs) {
+ Controllable c = getControllable( str ) ;
+ result.add( c ) ;
}
-
+
+ return result ;
+ }
+
private void enableControllables( Set<Controllable> cons ) {
- for (Controllable c : cons)
- c.enable() ;
+ for (Controllable c : cons)
+ c.enable() ;
}
private void disableAllControllables() {
- for (Controllable c : tf.contents())
- c.disable() ;
+ for (Controllable c : tf.contents())
+ c.disable() ;
}
@Test()
public void testTimerEnable() {
- for (Pair<List<String>,List<String>> pair : testData) {
- disableAllControllables() ;
- Set<Controllable> tds = makeControllableSet( pair.first() ) ;
- Set<Controllable> ers = makeControllableSet( pair.second() ) ;
- enableControllables( tds ) ;
- Set<Timer> ars = tf.activeSet() ;
- Assert.assertTrue( ers.equals( ars ) ) ;
- }
- disableAllControllables() ;
+ for (Pair<List<String>,List<String>> pair : testData) {
+ disableAllControllables() ;
+ Set<Controllable> tds = makeControllableSet( pair.first() ) ;
+ Set<Controllable> ers = makeControllableSet( pair.second() ) ;
+ enableControllables( tds ) ;
+ Set<Timer> ars = tf.activeSet() ;
+ Assert.assertTrue( ers.equals( ars ) ) ;
+ }
+ disableAllControllables() ;
}
private class MyTimerEventHandler extends NamedBase implements TimerEventHandler {
- List<TimerEvent> events ;
+ List<TimerEvent> events ;
- public MyTimerEventHandler( String name ) {
- super( tf, name ) ;
- events = new ArrayList<TimerEvent>() ;
- }
-
- public void notify( TimerEvent event ) {
- events.add( event ) ;
- }
-
- public List<TimerEvent> events() {
- return events ;
- }
+ public MyTimerEventHandler( String name ) {
+ super( tf, name ) ;
+ events = new ArrayList<TimerEvent>() ;
}
- private Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> parseEventDescription(
- String str ) {
+ public void notify( TimerEvent event ) {
+ events.add( event ) ;
+ }
- if (str.length() < 3)
- Assert.fail() ;
- String tname = str.substring( 0, 2 ) ;
- char ch = str.charAt( 2 ) ;
- String timeStr = str.substring( 3 ) ;
- int delay = 0;
- if ((timeStr != null) && (timeStr.length() > 0))
- delay = Integer.parseInt( timeStr ) ;
- Controllable c = getControllable( tname ) ;
- Assert.assertTrue( c != null && c instanceof Timer ) ;
- Timer t = Timer.class.cast( c ) ;
- TimerEvent.TimerEventType etype = null ;
- if (ch == '<')
- etype = TimerEvent.TimerEventType.ENTER ;
- else if (ch == '>')
- etype = TimerEvent.TimerEventType.EXIT ;
- else
- Assert.fail() ;
+ public List<TimerEvent> events() {
+ return events ;
+ }
+ }
- Pair<Timer,TimerEvent.TimerEventType> res1 =
- new Pair<Timer,TimerEvent.TimerEventType>( t, etype ) ;
- Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> result =
- new Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>>( delay, res1 ) ;
+ private Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> parseEventDescription(
+ String str ) {
- return result ;
+ if (str.length() < 3)
+ Assert.fail() ;
+ String tname = str.substring( 0, 2 ) ;
+ char ch = str.charAt( 2 ) ;
+ String timeStr = str.substring( 3 ) ;
+ int delay = 0;
+ if ((timeStr != null) && (timeStr.length() > 0))
+ delay = Integer.parseInt( timeStr ) ;
+ Controllable c = getControllable( tname ) ;
+ Assert.assertTrue( c != null && c instanceof Timer ) ;
+ Timer t = Timer.class.cast( c ) ;
+ TimerEvent.TimerEventType etype = null ;
+ if (ch == '<')
+ etype = TimerEvent.TimerEventType.ENTER ;
+ else if (ch == '>')
+ etype = TimerEvent.TimerEventType.EXIT ;
+ else
+ Assert.fail() ;
+
+ Pair<Timer,TimerEvent.TimerEventType> res1 =
+ new Pair<Timer,TimerEvent.TimerEventType>( t, etype ) ;
+ Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> result =
+ new Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>>( delay, res1 ) ;
+
+ return result ;
}
private void sleep( int time ) {
- if (time == 0)
- return ;
+ if (time == 0)
+ return ;
- try {
- Thread.sleep( time ) ;
- } catch (Exception exc) {
- // ignore this
- }
+ try {
+ Thread.sleep( time ) ;
+ } catch (Exception exc) {
+ // ignore this
+ }
}
private void generateEvents( TimerEventController tec, List<String> ed ) {
- for (String str : ed ) {
- Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> p =
- parseEventDescription( str ) ;
- int delay = p.first() ;
- if (p.second().second() == TimerEvent.TimerEventType.ENTER) {
- tec.enter( p.second().first() ) ;
- sleep( delay ) ;
- } else {
- sleep( delay ) ;
- tec.exit( p.second().first() ) ;
- }
- }
+ for (String str : ed ) {
+ Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> p =
+ parseEventDescription( str ) ;
+ int delay = p.first() ;
+ if (p.second().second() == TimerEvent.TimerEventType.ENTER) {
+ tec.enter( p.second().first() ) ;
+ sleep( delay ) ;
+ } else {
+ sleep( delay ) ;
+ tec.exit( p.second().first() ) ;
+ }
+ }
}
// Test for correct event sequence with non-decreasing time stamps
private void validateEvents( List<TimerEvent> elist, List<String> ed ) {
- Iterator<TimerEvent> teiter = elist.iterator() ;
- Iterator<String> editer = ed.iterator() ;
- long time = -1 ;
- while (teiter.hasNext() && editer.hasNext()) {
- TimerEvent te = teiter.next() ;
- String str = editer.next() ;
- Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> p = parseEventDescription( str ) ;
- Assert.assertEquals( te.timer(), p.second().first() ) ;
- Assert.assertEquals( te.type(), p.second().second() ) ;
- Assert.assertTrue( te.time() >= time ) ;
- time = te.time() ;
- }
-
- Assert.assertEquals( teiter.hasNext(), editer.hasNext() ) ;
+ Iterator<TimerEvent> teiter = elist.iterator() ;
+ Iterator<String> editer = ed.iterator() ;
+ long time = -1 ;
+ while (teiter.hasNext() && editer.hasNext()) {
+ TimerEvent te = teiter.next() ;
+ String str = editer.next() ;
+ Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> p = parseEventDescription( str ) ;
+ Assert.assertEquals( te.timer(), p.second().first() ) ;
+ Assert.assertEquals( te.type(), p.second().second() ) ;
+ Assert.assertTrue( te.time() >= time ) ;
+ time = te.time() ;
+ }
+
+ Assert.assertEquals( teiter.hasNext(), editer.hasNext() ) ;
}
private void displayStats( String msg, Statistics stats ) {
- System.out.println( msg ) ;
- System.out.println( "\tcount = " + stats.count() ) ;
- System.out.println( "\tmin = " + stats.min() ) ;
- System.out.println( "\tmax = " + stats.max() ) ;
- System.out.println( "\taverage = " + stats.average() ) ;
- System.out.println( "\tstandard deviation = " + stats.standardDeviation() ) ;
+ System.out.println( msg ) ;
+ System.out.println( "\tcount = " + stats.count() ) ;
+ System.out.println( "\tmin = " + stats.min() ) ;
+ System.out.println( "\tmax = " + stats.max() ) ;
+ System.out.println( "\taverage = " + stats.average() ) ;
+ System.out.println( "\tstandard deviation = " + stats.standardDeviation() ) ;
}
private void displayStatsMap( Map<Timer,Statistics> smap ) {
- for (Timer t : smap.keySet()) {
- displayStats( "Statistics for Timer " + t, smap.get(t) ) ;
- }
+ for (Timer t : smap.keySet()) {
+ displayStats( "Statistics for Timer " + t, smap.get(t) ) ;
+ }
}
@Test()
public void testStatsHandler() {
- List<String> elist = asList( "t1", "t2", "t3" ) ;
- Set<Controllable> cset = makeControllableSet( elist ) ;
- String shName = "Stats1" ;
- StatsEventHandler handler = tf.makeStatsEventHandler( shName ) ;
- controller.register( handler ) ;
- enableControllables( cset ) ;
- generateEvents( controller, evIn ) ;
- Map<Timer,Statistics> smap = handler.stats() ;
- displayStatsMap( smap ) ;
+ List<String> elist = asList( "t1", "t2", "t3" ) ;
+ Set<Controllable> cset = makeControllableSet( elist ) ;
+ String shName = "Stats1" ;
+ StatsEventHandler handler = tf.makeStatsEventHandler( shName ) ;
+ controller.register( handler ) ;
+ enableControllables( cset ) ;
+ generateEvents( controller, evIn ) ;
+ Map<Timer,Statistics> smap = handler.stats() ;
+ displayStatsMap( smap ) ;
- handler.clear() ;
- smap = handler.stats() ;
- for (Timer timer : smap.keySet()) {
- Statistics stats = smap.get( timer ) ;
- Assert.assertTrue( stats.count() == 0 ) ;
- }
+ handler.clear() ;
+ smap = handler.stats() ;
+ for (Timer timer : smap.keySet()) {
+ Statistics stats = smap.get( timer ) ;
+ Assert.assertTrue( stats.count() == 0 ) ;
+ }
}
@Test()
public void testTimerController() {
- List<String> elist = asList( "t1", "t3" ) ;
- Set<Controllable> cset = makeControllableSet( elist ) ;
- enableControllables( cset ) ;
+ List<String> elist = asList( "t1", "t3" ) ;
+ Set<Controllable> cset = makeControllableSet( elist ) ;
+ enableControllables( cset ) ;
- // Test for correct name and factory of controller
- Assert.assertEquals( controller.name(), controllerName ) ;
- Assert.assertEquals( controller.factory(), tf ) ;
+ // Test for correct name and factory of controller
+ Assert.assertEquals( controller.name(), controllerName ) ;
+ Assert.assertEquals( controller.factory(), tf ) ;
- // Test registration of event handlers
- controller.register( h1 ) ;
- controller.register( h2 ) ;
- Set<TimerEventHandler> etecSet = asSet( (TimerEventHandler)h1,
- (TimerEventHandler)h2 ) ;
- Set<TimerEventHandler> atecSet = controller.handlers() ;
- Assert.assertEquals( etecSet, atecSet ) ;
+ // Test registration of event handlers
+ controller.register( h1 ) ;
+ controller.register( h2 ) ;
+ Set<TimerEventHandler> etecSet = asSet( (TimerEventHandler)h1,
+ (TimerEventHandler)h2 ) ;
+ Set<TimerEventHandler> atecSet = controller.handlers() ;
+ Assert.assertEquals( etecSet, atecSet ) ;
- // Test event handler deregistration
- controller.deregister( h2 ) ;
- etecSet = asSet( (TimerEventHandler)h1 ) ;
- atecSet = controller.handlers() ;
- Assert.assertEquals( etecSet, atecSet ) ;
+ // Test event handler deregistration
+ controller.deregister( h2 ) ;
+ etecSet = asSet( (TimerEventHandler)h1 ) ;
+ atecSet = controller.handlers() ;
+ Assert.assertEquals( etecSet, atecSet ) ;
- // Test for correct generation of event sequence with
- // activated timers.
- controller.register( h2 ) ;
- generateEvents( controller, evIn ) ;
- List<TimerEvent> events1 = h1.events() ;
- List<TimerEvent> events2 = h2.events() ;
- Assert.assertEquals( events1, events2 ) ;
+ // Test for correct generation of event sequence with
+ // activated timers.
+ controller.register( h2 ) ;
+ generateEvents( controller, evIn ) ;
+ List<TimerEvent> events1 = h1.events() ;
+ List<TimerEvent> events2 = h2.events() ;
+ Assert.assertEquals( events1, events2 ) ;
- validateEvents( h1.events(), evOut ) ;
+ validateEvents( h1.events(), evOut ) ;
- // clean up
- controller.deregister( h1 ) ;
- controller.deregister( h2 ) ;
- disableAllControllables() ;
+ // clean up
+ controller.deregister( h1 ) ;
+ controller.deregister( h2 ) ;
+ disableAllControllables() ;
}
- @Configuration( afterTest = true )
+ @Configuration( afterTest = true )
public void tearDown() {
- TimerFactoryBuilder.destroy( tf ) ;
+ TimerFactoryBuilder.destroy( tf ) ;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/Client.java
index 33df2e7..7856277 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/Client.java
@@ -54,200 +54,200 @@
// Test TimerFactoryBuilder
@Test()
public void factoryBuilderCreate1() {
- String name = "TF1" ;
- String description = "First Test Factory" ;
- TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
- Assert.assertEquals( tf.name(), name ) ;
- Assert.assertEquals( tf.description(), description ) ;
- TimerFactoryBuilder.destroy( tf ) ;
+ String name = "TF1" ;
+ String description = "First Test Factory" ;
+ TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
+ Assert.assertEquals( tf.name(), name ) ;
+ Assert.assertEquals( tf.description(), description ) ;
+ TimerFactoryBuilder.destroy( tf ) ;
}
@Test()
@ExpectedExceptions( { IllegalArgumentException.class } )
public void factoryBuilderCreate2() {
- String name = "TF1" ;
- String description = "First Test Factory" ;
- TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
- try {
- tf = TimerFactoryBuilder.make( name, description ) ;
- } finally {
- TimerFactoryBuilder.destroy( tf ) ;
- }
+ String name = "TF1" ;
+ String description = "First Test Factory" ;
+ TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
+ try {
+ tf = TimerFactoryBuilder.make( name, description ) ;
+ } finally {
+ TimerFactoryBuilder.destroy( tf ) ;
+ }
}
@Test()
public void factoryBuilderCreate3() {
- String name = "TF1" ;
- String description = "First Test Factory" ;
- TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
- TimerFactoryBuilder.destroy( tf ) ;
- tf = TimerFactoryBuilder.make( name, description ) ;
- TimerFactoryBuilder.destroy( tf ) ;
+ String name = "TF1" ;
+ String description = "First Test Factory" ;
+ TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
+ TimerFactoryBuilder.destroy( tf ) ;
+ tf = TimerFactoryBuilder.make( name, description ) ;
+ TimerFactoryBuilder.destroy( tf ) ;
}
@Test()
public void testVersionedHashSet() {
- String[] data = { "red", "orange", "yellow", "green", "blue", "indigo", "violet" } ;
- String toRemove1 = "green" ;
- String toRemove2 = "blue" ;
+ String[] data = { "red", "orange", "yellow", "green", "blue", "indigo", "violet" } ;
+ String toRemove1 = "green" ;
+ String toRemove2 = "blue" ;
- VersionedHashSet<String> tset = new VersionedHashSet<String>() ;
- long version = tset.version() ;
+ VersionedHashSet<String> tset = new VersionedHashSet<String>() ;
+ long version = tset.version() ;
- // test add
- for (String str : data)
- tset.add( str ) ;
- Assert.assertTrue( version != tset.version() ) ;
- version = tset.version() ;
+ // test add
+ for (String str : data)
+ tset.add( str ) ;
+ Assert.assertTrue( version != tset.version() ) ;
+ version = tset.version() ;
- // Add that does not change set does not change version
- tset.add( toRemove1 ) ;
- Assert.assertEquals( version, tset.version() ) ;
-
- // test direct remove
- tset.remove( toRemove1 ) ;
- Assert.assertTrue( version != tset.version() ) ;
- version = tset.version() ;
+ // Add that does not change set does not change version
+ tset.add( toRemove1 ) ;
+ Assert.assertEquals( version, tset.version() ) ;
- // Remove that does not change set does not change version
- tset.remove( toRemove1 ) ;
- Assert.assertEquals( version, tset.version() ) ;
+ // test direct remove
+ tset.remove( toRemove1 ) ;
+ Assert.assertTrue( version != tset.version() ) ;
+ version = tset.version() ;
- // test iterator without remove
- String rainbow = "" ;
- for (String str : tset)
- rainbow += " " + str ;
+ // Remove that does not change set does not change version
+ tset.remove( toRemove1 ) ;
+ Assert.assertEquals( version, tset.version() ) ;
- Assert.assertEquals( version, tset.version() ) ;
+ // test iterator without remove
+ String rainbow = "" ;
+ for (String str : tset)
+ rainbow += " " + str ;
- // test iterator with remove
- Iterator<String> iter = tset.iterator() ;
- while (iter.hasNext()) {
- String str = iter.next() ;
- if (str.equals( toRemove2 ))
- iter.remove() ;
- }
+ Assert.assertEquals( version, tset.version() ) ;
- Assert.assertTrue( version != tset.version() ) ;
+ // test iterator with remove
+ Iterator<String> iter = tset.iterator() ;
+ while (iter.hasNext()) {
+ String str = iter.next() ;
+ if (str.equals( toRemove2 ))
+ iter.remove() ;
+ }
+
+ Assert.assertTrue( version != tset.version() ) ;
}
private static void sleep( int time ) {
- try {
- Thread.sleep( time ) ;
- } catch (Exception exc) {
- // ignore it
- }
+ try {
+ Thread.sleep( time ) ;
+ } catch (Exception exc) {
+ // ignore it
+ }
}
- private void recordCall( TimingPoints tp, Timer top,
- TimerEventController controller, int transportDelay ) {
+ private void recordCall( TimingPoints tp, Timer top,
+ TimerEventController controller, int transportDelay ) {
- controller.enter( top ) ;
+ controller.enter( top ) ;
- tp.enter_hasNextNext() ;
- sleep( 1 ) ;
- tp.exit_hasNextNext() ;
+ tp.enter_hasNextNext() ;
+ sleep( 1 ) ;
+ tp.exit_hasNextNext() ;
- tp.enter_connectionSetup() ;
- sleep( 4 ) ;
- tp.exit_connectionSetup() ;
+ tp.enter_connectionSetup() ;
+ sleep( 4 ) ;
+ tp.exit_connectionSetup() ;
- tp.enter_clientEncoding() ;
- sleep( 100 ) ;
- tp.exit_clientEncoding() ;
+ tp.enter_clientEncoding() ;
+ sleep( 100 ) ;
+ tp.exit_clientEncoding() ;
- tp.enter_clientTransportAndWait() ;
- sleep( transportDelay ) ;
- tp.exit_clientTransportAndWait() ;
+ tp.enter_clientTransportAndWait() ;
+ sleep( transportDelay ) ;
+ tp.exit_clientTransportAndWait() ;
- tp.enter_clientDecoding() ;
- sleep( 40 ) ;
- tp.exit_clientDecoding() ;
+ tp.enter_clientDecoding() ;
+ sleep( 40 ) ;
+ tp.exit_clientDecoding() ;
- controller.exit( top ) ;
+ controller.exit( top ) ;
}
Map<Timer,Statistics> makeData() {
- // Setup timing points and a top-level timer
- Properties props = new Properties() ;
- props.setProperty( "org.omg.CORBA.ORBClass",
- "com.sun.corba.ee.impl.orb.ORBImpl" ) ;
- ORB orb = (ORB)ORB.init( new String[0], props ) ;
+ // Setup timing points and a top-level timer
+ Properties props = new Properties() ;
+ props.setProperty( "org.omg.CORBA.ORBClass",
+ "com.sun.corba.ee.impl.orb.ORBImpl" ) ;
+ ORB orb = (ORB)ORB.init( new String[0], props ) ;
- try {
- TimerManager<TimingPoints> tm = orb.getTimerManager() ;
- TimingPoints tp = tm.points() ;
- TimerFactory tf = tm.factory() ;
- TimerEventController controller = tm.controller() ;
- StatsEventHandler handler = tf.makeStatsEventHandler( "TestStats" ) ;
- controller.register( handler ) ;
- Timer top = tf.makeTimer( "top", "Encloses the entire operation" ) ;
- top.enable() ;
- tp.transport.enable() ;
- handler.clear() ;
+ try {
+ TimerManager<TimingPoints> tm = orb.getTimerManager() ;
+ TimingPoints tp = tm.points() ;
+ TimerFactory tf = tm.factory() ;
+ TimerEventController controller = tm.controller() ;
+ StatsEventHandler handler = tf.makeStatsEventHandler( "TestStats" ) ;
+ controller.register( handler ) ;
+ Timer top = tf.makeTimer( "top", "Encloses the entire operation" ) ;
+ top.enable() ;
+ tp.transport.enable() ;
+ handler.clear() ;
- // Simulate the actions of the ORB client transport
- recordCall( tp, top, controller, 25 ) ;
- recordCall( tp, top, controller, 31 ) ;
- recordCall( tp, top, controller, 27 ) ;
- recordCall( tp, top, controller, 42 ) ;
- recordCall( tp, top, controller, 19 ) ;
- recordCall( tp, top, controller, 21 ) ;
- recordCall( tp, top, controller, 23 ) ;
- recordCall( tp, top, controller, 25 ) ;
- recordCall( tp, top, controller, 34 ) ;
- recordCall( tp, top, controller, 33 ) ;
- recordCall( tp, top, controller, 31 ) ;
- recordCall( tp, top, controller, 28 ) ;
- recordCall( tp, top, controller, 27 ) ;
- recordCall( tp, top, controller, 29 ) ;
- recordCall( tp, top, controller, 30 ) ;
- recordCall( tp, top, controller, 31 ) ;
- recordCall( tp, top, controller, 28 ) ;
+ // Simulate the actions of the ORB client transport
+ recordCall( tp, top, controller, 25 ) ;
+ recordCall( tp, top, controller, 31 ) ;
+ recordCall( tp, top, controller, 27 ) ;
+ recordCall( tp, top, controller, 42 ) ;
+ recordCall( tp, top, controller, 19 ) ;
+ recordCall( tp, top, controller, 21 ) ;
+ recordCall( tp, top, controller, 23 ) ;
+ recordCall( tp, top, controller, 25 ) ;
+ recordCall( tp, top, controller, 34 ) ;
+ recordCall( tp, top, controller, 33 ) ;
+ recordCall( tp, top, controller, 31 ) ;
+ recordCall( tp, top, controller, 28 ) ;
+ recordCall( tp, top, controller, 27 ) ;
+ recordCall( tp, top, controller, 29 ) ;
+ recordCall( tp, top, controller, 30 ) ;
+ recordCall( tp, top, controller, 31 ) ;
+ recordCall( tp, top, controller, 28 ) ;
- return handler.stats() ;
- } finally {
- orb.destroy() ;
- }
+ return handler.stats() ;
+ } finally {
+ orb.destroy() ;
+ }
}
@Test()
void generateStatsTable() {
- Map<Timer, Statistics> data = makeData() ;
+ Map<Timer, Statistics> data = makeData() ;
- TimerUtils.writeHtmlTable( data, "stats.html",
- "Client Test Timing Data" ) ;
+ TimerUtils.writeHtmlTable( data, "stats.html",
+ "Client Test Timing Data" ) ;
}
public static void main( String[] args ) {
- TestNG tng = new TestNG() ;
+ TestNG tng = new TestNG() ;
- Class<?> cls = null ;
+ Class<?> cls = null ;
- try {
- cls = Class.forName( "corba.timer.TimerPointsSuite" ) ;
- } catch (Exception exc) {
- System.out.println( "Caught exception: " + exc ) ;
- exc.printStackTrace() ;
- }
+ try {
+ cls = Class.forName( "corba.timer.TimerPointsSuite" ) ;
+ } catch (Exception exc) {
+ System.out.println( "Caught exception: " + exc ) ;
+ exc.printStackTrace() ;
+ }
- List<Class<?>> classes = new ArrayList<Class<?>>( asList(
- Client.class,
- NamedBaseSuite.class,
- ControllableBaseSuite.class,
- TimerFactorySuite.class,
- ActivationSuite.class ) ) ;
+ List<Class<?>> classes = new ArrayList<Class<?>>( asList(
+ Client.class,
+ NamedBaseSuite.class,
+ ControllableBaseSuite.class,
+ TimerFactorySuite.class,
+ ActivationSuite.class ) ) ;
- if (cls != null)
- classes.add( cls ) ;
+ if (cls != null)
+ classes.add( cls ) ;
- Class[] tngClasses = classes.toArray( new Class<?>[ classes.size() ] ) ;
+ Class[] tngClasses = classes.toArray( new Class<?>[ classes.size() ] ) ;
- tng.setTestClasses( tngClasses ) ;
+ tng.setTestClasses( tngClasses ) ;
- tng.run() ;
+ tng.run() ;
System.out.println("tng.hasFailure="+tng.hasFailure());
- System.exit( tng.hasFailure() ? 1 : 0 ) ;
+ System.exit( tng.hasFailure() ? 1 : 0 ) ;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/ControllableBaseSuite.java b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/ControllableBaseSuite.java
index 0975eb1..b518c6d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/ControllableBaseSuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/ControllableBaseSuite.java
@@ -47,40 +47,40 @@
private ControllableTest ct ;
private static class ControllableTest extends ControllableBase {
- public ControllableTest( int id, String name, String description,
- TimerFactory factory ) {
+ public ControllableTest( int id, String name, String description,
+ TimerFactory factory ) {
- super( id, name, description, TimerFactoryImpl.class.cast( factory ) ) ;
- }
+ super( id, name, description, TimerFactoryImpl.class.cast( factory ) ) ;
+ }
}
@Configuration( beforeTest = true )
public void setUp() {
- factory = TimerFactoryBuilder.make( "CTF", "No description" ) ;
- ct = new ControllableTest( id, name, description, factory ) ;
+ factory = TimerFactoryBuilder.make( "CTF", "No description" ) ;
+ ct = new ControllableTest( id, name, description, factory ) ;
}
- @Configuration( afterTest = true )
+ @Configuration( afterTest = true )
public void tearDown() {
- TimerFactoryBuilder.destroy( factory ) ;
+ TimerFactoryBuilder.destroy( factory ) ;
}
@Test()
public void testId() {
- Assert.assertEquals( id, ct.id() ) ;
+ Assert.assertEquals( id, ct.id() ) ;
}
- @Test()
+ @Test()
public void testDescription() {
- Assert.assertEquals( description, ct.description() ) ;
+ Assert.assertEquals( description, ct.description() ) ;
}
@Test()
public void testEnable() {
- Assert.assertFalse( ct.isEnabled() ) ;
- ct.enable() ;
- Assert.assertTrue( ct.isEnabled() ) ;
- ct.disable() ;
- Assert.assertFalse( ct.isEnabled() ) ;
+ Assert.assertFalse( ct.isEnabled() ) ;
+ ct.enable() ;
+ Assert.assertTrue( ct.isEnabled() ) ;
+ ct.disable() ;
+ Assert.assertFalse( ct.isEnabled() ) ;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/NamedBaseSuite.java b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/NamedBaseSuite.java
index 12da4ee..f21cb5c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/NamedBaseSuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/NamedBaseSuite.java
@@ -44,94 +44,94 @@
private NamedTest nb2 ;
private static class NamedTest extends NamedBase {
- public NamedTest( TimerFactory factory, String name ) {
- super( factory, name ) ;
- }
+ public NamedTest( TimerFactory factory, String name ) {
+ super( factory, name ) ;
+ }
- public void finish( TimerFactory factory ) {
- setFactory( factory ) ;
- }
+ public void finish( TimerFactory factory ) {
+ setFactory( factory ) ;
+ }
}
@Configuration( beforeTest = true )
public void setUp() {
- factory = TimerFactoryBuilder.make( "NTF", "No description" ) ;
- nb1 = new NamedTest( factory, name ) ;
- nb2 = new NamedTest( null, name ) ;
+ factory = TimerFactoryBuilder.make( "NTF", "No description" ) ;
+ nb1 = new NamedTest( factory, name ) ;
+ nb2 = new NamedTest( null, name ) ;
}
- @Configuration( afterTest = true )
+ @Configuration( afterTest = true )
public void tearDown() {
- TimerFactoryBuilder.destroy( factory ) ;
+ TimerFactoryBuilder.destroy( factory ) ;
}
- @Test()
+ @Test()
public void name1() {
- Assert.assertEquals( name, nb1.name() ) ;
+ Assert.assertEquals( name, nb1.name() ) ;
}
- @Test()
+ @Test()
public void name2() {
- Assert.assertEquals( name, nb2.name() ) ;
+ Assert.assertEquals( name, nb2.name() ) ;
}
@Test()
public void factory1() {
- Assert.assertEquals( factory, nb1.factory() ) ;
+ Assert.assertEquals( factory, nb1.factory() ) ;
}
@Test()
- @ExpectedExceptions( { IllegalStateException.class } )
+ @ExpectedExceptions( { IllegalStateException.class } )
public void factory2() {
- TimerFactory tf = nb2.factory() ;
+ TimerFactory tf = nb2.factory() ;
}
@Test()
public void equals() {
- Assert.assertEquals( nb1, nb2 ) ;
+ Assert.assertEquals( nb1, nb2 ) ;
}
@Test()
public void hashCode1() {
- Assert.assertEquals( nb1.hashCode(), name.hashCode() ) ;
+ Assert.assertEquals( nb1.hashCode(), name.hashCode() ) ;
}
@Test()
public void hashCode2() {
- Assert.assertEquals( nb2.hashCode(), name.hashCode() ) ;
+ Assert.assertEquals( nb2.hashCode(), name.hashCode() ) ;
}
@Test()
public void toString1() {
- Assert.assertEquals( factory.name() + ":" +
- name, nb1.toString() ) ;
+ Assert.assertEquals( factory.name() + ":" +
+ name, nb1.toString() ) ;
}
@Test()
- @ExpectedExceptions( { IllegalStateException.class } )
+ @ExpectedExceptions( { IllegalStateException.class } )
public void toString2() {
- String ts = nb2.toString() ;
+ String ts = nb2.toString() ;
}
@Test()
- @ExpectedExceptions( { IllegalStateException.class } )
+ @ExpectedExceptions( { IllegalStateException.class } )
public void setFactory1() {
- nb1.finish( factory ) ;
+ nb1.finish( factory ) ;
}
- @Test( dependsOnMethods = { "toString2", "factory2" } )
+ @Test( dependsOnMethods = { "toString2", "factory2" } )
public void setFactory2() {
- nb2.finish( factory ) ;
+ nb2.finish( factory ) ;
}
@Test( dependsOnMethods = { "setFactory2" } )
- public void factory2Post() {
- Assert.assertEquals( factory, nb2.factory() ) ;
+ public void factory2Post() {
+ Assert.assertEquals( factory, nb2.factory() ) ;
}
@Test( dependsOnMethods = { "setFactory2" } )
- public void toString2Post() {
- Assert.assertEquals( factory.name() + ":" +
- name, nb2.toString() ) ;
+ public void toString2Post() {
+ Assert.assertEquals( factory.name() + ":" +
+ name, nb2.toString() ) ;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/TimerFactorySuite.java b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/TimerFactorySuite.java
index 223ac91..00deda2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/TimerFactorySuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/TimerFactorySuite.java
@@ -56,121 +56,121 @@
private TimerGroup tg1 ;
private static final int EXPECTED_NUM_TIMERS = 2 ;
-
+
// Remember, the factory is also a TimerGroup!
private static final int EXPECTED_NUM_TIMER_GROUPS = 2 ;
- private static final int EXPECTED_NUM_IDS =
- EXPECTED_NUM_TIMERS + EXPECTED_NUM_TIMER_GROUPS ;
+ private static final int EXPECTED_NUM_IDS =
+ EXPECTED_NUM_TIMERS + EXPECTED_NUM_TIMER_GROUPS ;
@Configuration( beforeTest = true )
public void setUp() {
- tf = TimerFactoryBuilder.make( tfName, tfDescription ) ;
- t1 = tf.makeTimer( timer1Name, timer1Description ) ;
- t2 = tf.makeTimer( timer2Name, timer2Description ) ;
- tg1 = tf.makeTimerGroup( timerGroup1Name, timerGroup1Description ) ;
+ tf = TimerFactoryBuilder.make( tfName, tfDescription ) ;
+ t1 = tf.makeTimer( timer1Name, timer1Description ) ;
+ t2 = tf.makeTimer( timer2Name, timer2Description ) ;
+ tg1 = tf.makeTimerGroup( timerGroup1Name, timerGroup1Description ) ;
}
- @Configuration( afterTest = true )
+ @Configuration( afterTest = true )
public void tearDown() {
- TimerFactoryBuilder.destroy( tf ) ;
+ TimerFactoryBuilder.destroy( tf ) ;
}
@Test()
public void testNumberOfIds() {
- Assert.assertEquals( EXPECTED_NUM_IDS, tf.numberOfIds() ) ;
+ Assert.assertEquals( EXPECTED_NUM_IDS, tf.numberOfIds() ) ;
}
@Test()
public void testGetControllable1() {
- int id = t1.id() ;
- Controllable con = tf.getControllable( id ) ;
- Assert.assertTrue( con instanceof Timer ) ;
- Timer timer = Timer.class.cast( con ) ;
- Assert.assertEquals( t1, timer ) ;
+ int id = t1.id() ;
+ Controllable con = tf.getControllable( id ) ;
+ Assert.assertTrue( con instanceof Timer ) ;
+ Timer timer = Timer.class.cast( con ) ;
+ Assert.assertEquals( t1, timer ) ;
}
@Test()
public void testGetControllable2() {
- int id = t2.id() ;
- Controllable con = tf.getControllable( id ) ;
- Assert.assertTrue( con instanceof Timer ) ;
- Timer timer = Timer.class.cast( con ) ;
- Assert.assertEquals( t2, timer ) ;
+ int id = t2.id() ;
+ Controllable con = tf.getControllable( id ) ;
+ Assert.assertTrue( con instanceof Timer ) ;
+ Timer timer = Timer.class.cast( con ) ;
+ Assert.assertEquals( t2, timer ) ;
}
@Test()
public void testGetControllable3() {
- int id = tg1.id() ;
- Controllable con = tf.getControllable( id ) ;
- Assert.assertTrue( con instanceof TimerGroup ) ;
- TimerGroup tg = TimerGroup.class.cast( con ) ;
- Assert.assertEquals( tg1, tg ) ;
+ int id = tg1.id() ;
+ Controllable con = tf.getControllable( id ) ;
+ Assert.assertTrue( con instanceof TimerGroup ) ;
+ TimerGroup tg = TimerGroup.class.cast( con ) ;
+ Assert.assertEquals( tg1, tg ) ;
}
@Test()
public void testMakeLogEventHandler() {
- String name = "LogEventHandler1" ;
- TimerEventHandler h1 = tf.makeLogEventHandler( name ) ;
- Assert.assertEquals( h1.name(), name ) ;
- try {
- tf.makeLogEventHandler( name ) ;
- Assert.fail( "Should throw an exception" ) ;
- } catch (IllegalArgumentException exc) {
- // this is correct
- } catch (Throwable thr) {
- Assert.fail( "Unexpected exception " + thr ) ;
- }
- try {
- tf.makeStatsEventHandler( name ) ;
- Assert.fail( "Should throw an exception" ) ;
- } catch (IllegalArgumentException exc) {
- // this is correct
- } catch (Throwable thr) {
- Assert.fail( "Unexpected exception " + thr ) ;
- }
- tf.removeTimerEventHandler( h1 ) ;
- h1 = tf.makeLogEventHandler( name ) ;
- tf.removeTimerEventHandler( h1 ) ;
- h1 = tf.makeStatsEventHandler( name ) ;
+ String name = "LogEventHandler1" ;
+ TimerEventHandler h1 = tf.makeLogEventHandler( name ) ;
+ Assert.assertEquals( h1.name(), name ) ;
+ try {
+ tf.makeLogEventHandler( name ) ;
+ Assert.fail( "Should throw an exception" ) ;
+ } catch (IllegalArgumentException exc) {
+ // this is correct
+ } catch (Throwable thr) {
+ Assert.fail( "Unexpected exception " + thr ) ;
+ }
+ try {
+ tf.makeStatsEventHandler( name ) ;
+ Assert.fail( "Should throw an exception" ) ;
+ } catch (IllegalArgumentException exc) {
+ // this is correct
+ } catch (Throwable thr) {
+ Assert.fail( "Unexpected exception " + thr ) ;
+ }
+ tf.removeTimerEventHandler( h1 ) ;
+ h1 = tf.makeLogEventHandler( name ) ;
+ tf.removeTimerEventHandler( h1 ) ;
+ h1 = tf.makeStatsEventHandler( name ) ;
}
@Test()
public void testTimers() {
- Map<String,? extends Timer> tmap = tf.timers() ;
- Assert.assertEquals( tmap.size(), EXPECTED_NUM_TIMERS ) ;
- Timer x1 = tmap.get( timer1Name ) ;
- Assert.assertEquals( x1, t1 ) ;
- Timer x2 = tmap.get( timer2Name ) ;
- Assert.assertEquals( x2, t2 ) ;
+ Map<String,? extends Timer> tmap = tf.timers() ;
+ Assert.assertEquals( tmap.size(), EXPECTED_NUM_TIMERS ) ;
+ Timer x1 = tmap.get( timer1Name ) ;
+ Assert.assertEquals( x1, t1 ) ;
+ Timer x2 = tmap.get( timer2Name ) ;
+ Assert.assertEquals( x2, t2 ) ;
}
@Test()
public void testTimerGroups() {
- Map<String,? extends TimerGroup> tmap = tf.timerGroups() ;
- Assert.assertEquals( tmap.size(), EXPECTED_NUM_TIMER_GROUPS ) ;
- TimerGroup x1 = tmap.get( timerGroup1Name ) ;
- Assert.assertEquals( x1, tg1 ) ;
- TimerGroup x2 = tmap.get( tfName ) ;
- Assert.assertEquals( x2, tf ) ;
+ Map<String,? extends TimerGroup> tmap = tf.timerGroups() ;
+ Assert.assertEquals( tmap.size(), EXPECTED_NUM_TIMER_GROUPS ) ;
+ TimerGroup x1 = tmap.get( timerGroup1Name ) ;
+ Assert.assertEquals( x1, tg1 ) ;
+ TimerGroup x2 = tmap.get( tfName ) ;
+ Assert.assertEquals( x2, tf ) ;
}
@Test()
public void testMakeController() {
- String name = "Controller1" ;
- TimerEventController controller = tf.makeController( name ) ;
- Assert.assertEquals( controller.name(), name ) ;
- try {
- tf.makeController( name ) ;
- Assert.fail( "Should throw an exception" ) ;
- } catch (IllegalArgumentException exc) {
- // this is correct
- } catch (Throwable thr) {
- Assert.fail( "Unexpected exception " + thr ) ;
- }
- tf.removeController( controller ) ;
- controller = tf.makeController( name ) ;
+ String name = "Controller1" ;
+ TimerEventController controller = tf.makeController( name ) ;
+ Assert.assertEquals( controller.name(), name ) ;
+ try {
+ tf.makeController( name ) ;
+ Assert.fail( "Should throw an exception" ) ;
+ } catch (IllegalArgumentException exc) {
+ // this is correct
+ } catch (Throwable thr) {
+ Assert.fail( "Unexpected exception " + thr ) ;
+ }
+ tf.removeController( controller ) ;
+ controller = tf.makeController( name ) ;
}
// enabledSet and activeSet are tested in the ActivationSuite
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/TimerPointsSuite.java b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/TimerPointsSuite.java
index a961d7c..dc0ed00 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/TimerPointsSuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/TimerPointsSuite.java
@@ -48,19 +48,19 @@
public class TimerPointsSuite {
@Test()
public void testXMLParser() {
- // We should be running this test from the corba/timer directory.
- String fileName = "src/test/timing.xml" ;
+ // We should be running this test from the corba/timer directory.
+ String fileName = "src/test/timing.xml" ;
- Pair<String,TimerFactory> result = null ;
- try {
- // Parse the XML file.
- result = TimerPointSourceGenerator.parseDescription( fileName ) ;
+ Pair<String,TimerFactory> result = null ;
+ try {
+ // Parse the XML file.
+ result = TimerPointSourceGenerator.parseDescription( fileName ) ;
- // Try to generate the source file
- TimerPointSourceGenerator.generateSourceFile( "gen", result ) ;
- } catch (IOException ioexc) {
- ioexc.printStackTrace() ;
- Assert.fail( "IOException: " + ioexc ) ;
- }
+ // Try to generate the source file
+ TimerPointSourceGenerator.generateSourceFile( "gen", result ) ;
+ } catch (IOException ioexc) {
+ ioexc.printStackTrace() ;
+ Assert.fail( "IOException: " + ioexc ) ;
+ }
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/timing.xml b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/timing.xml
index b7ee359..971511c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/timing.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/test/timing.xml
@@ -35,34 +35,34 @@
<timer name="test7" description="A test timer"/>
<timerGroup name="tg1" description="A test timer group">
- <contains name="test1"/>
- <contains name="test2"/>
- <contains name="test3"/>
- <contains name="tg3"/>
+ <contains name="test1"/>
+ <contains name="test2"/>
+ <contains name="test3"/>
+ <contains name="tg3"/>
</timerGroup>
<timerGroup name="tg2" description="A test timer group">
- <contains name="test4"/>
- <contains name="test5"/>
- <contains name="tg1"/>
+ <contains name="test4"/>
+ <contains name="test5"/>
+ <contains name="tg1"/>
</timerGroup>
<timerGroup name="tg3" description="A test timer group">
- <contains name="test6"/>
- <contains name="test7"/>
- <contains name="tg2"/>
+ <contains name="test6"/>
+ <contains name="test7"/>
+ <contains name="tg2"/>
</timerGroup>
<timerGroup name="transportClient" description="Major events in client side request cycle">
- <contains name="hasNextNext"/>
- <contains name="connectionSetup"/>
- <contains name="clientEncoding"/>
- <contains name="clientTransportAndWait"/>
- <contains name="clientDecoding"/>
+ <contains name="hasNextNext"/>
+ <contains name="connectionSetup"/>
+ <contains name="clientEncoding"/>
+ <contains name="clientTransportAndWait"/>
+ <contains name="clientDecoding"/>
</timerGroup>
<timerGroup name="transport" description="All transport activity">
- <contains name="transportClient"/>
+ <contains name="transportClient"/>
</timerGroup>
</timing>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/LogProcessorAverager.java b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/LogProcessorAverager.java
index b21c262..2c95434 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/LogProcessorAverager.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/LogProcessorAverager.java
@@ -64,75 +64,75 @@
private static final long SCALE = 1000000000;
- public static void main(String[] av)
+ public static void main(String[] av)
{
- data = new HashMap<Integer, Point>();
- beginPointNameToInt = new HashMap<String, Integer>();
- filename = av[0];
+ data = new HashMap<Integer, Point>();
+ beginPointNameToInt = new HashMap<String, Integer>();
+ filename = av[0];
- try {
- BufferedReader br = new BufferedReader(new FileReader(filename));
- readPoints(br);
- readData(br);
- showResults();
- } catch (Exception e) {
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(filename));
+ readPoints(br);
+ readData(br);
+ showResults();
+ } catch (Exception e) {
e.printStackTrace();
}
}
public static void readPoints(BufferedReader br)
- throws Exception
+ throws Exception
{
- String line;
- int id = 0;
- while ((line = br.readLine()) != null) {
- if (line.equals("#####")) {
- return;
- }
- String[] beginOrEndAndPointName = line.split(" ");
- String beginOrEnd = beginOrEndAndPointName[0];
- String name = beginOrEndAndPointName[1];
- int intId = id++;
- if (beginOrEnd.equals("BEGIN")) {
- beginPointNameToInt.put(name, intId);
- data.put(intId, new BeginPoint(intId, name));
- } else {
- data.put(intId,
- new EndPoint(intId, name, data, beginPointNameToInt));
- }
- }
+ String line;
+ int id = 0;
+ while ((line = br.readLine()) != null) {
+ if (line.equals("#####")) {
+ return;
+ }
+ String[] beginOrEndAndPointName = line.split(" ");
+ String beginOrEnd = beginOrEndAndPointName[0];
+ String name = beginOrEndAndPointName[1];
+ int intId = id++;
+ if (beginOrEnd.equals("BEGIN")) {
+ beginPointNameToInt.put(name, intId);
+ data.put(intId, new BeginPoint(intId, name));
+ } else {
+ data.put(intId,
+ new EndPoint(intId, name, data, beginPointNameToInt));
+ }
+ }
}
public static void readData(BufferedReader br)
- throws Exception
+ throws Exception
{
- String line;
- while ((line = br.readLine()) != null) {
- String[] idAndTime = line.split(" ");
- int id = Integer.parseInt(idAndTime[0]);
- long time = Long.parseLong(idAndTime[1]);
- data.get(id).setValue(time);
- }
+ String line;
+ while ((line = br.readLine()) != null) {
+ String[] idAndTime = line.split(" ");
+ int id = Integer.parseInt(idAndTime[0]);
+ long time = Long.parseLong(idAndTime[1]);
+ data.get(id).setValue(time);
+ }
}
public static void showResults()
{
- // Remove begin points.
- for (Integer id : beginPointNameToInt.values()) {
- data.remove(id);
- }
- System.out.println("----------------------------------------");
- System.out.println(filename);
- for (Point point : data.values()) {
- System.out.println(point.getName()
- + " "
- + point.getAverage() / SCALE
- + " "
- + format(point.getAverage() / SCALE)
- + " "
- + " iterations " + point.getIterations());
- }
- System.out.println("----------------------------------------");
+ // Remove begin points.
+ for (Integer id : beginPointNameToInt.values()) {
+ data.remove(id);
+ }
+ System.out.println("----------------------------------------");
+ System.out.println(filename);
+ for (Point point : data.values()) {
+ System.out.println(point.getName()
+ + " "
+ + point.getAverage() / SCALE
+ + " "
+ + format(point.getAverage() / SCALE)
+ + " "
+ + " iterations " + point.getIterations());
+ }
+ System.out.println("----------------------------------------");
}
public static String format(double d) {
@@ -148,9 +148,9 @@
Point(int intId, String name)
{
- this.intId = intId;
- this.name = name;
- value = -1;
+ this.intId = intId;
+ this.name = name;
+ value = -1;
}
int getIntId() { return intId; }
String getName() { return name; }
@@ -158,9 +158,9 @@
void setValue(long x) { value = x; }
double getAverage() { throw new RuntimeException("Not Implemented"); }
int getIterations() { throw new RuntimeException("Not Implemented"); }
- String toStringString()
+ String toStringString()
{
- return intId + " " + name + " " + value;
+ return intId + " " + name + " " + value;
}
}
@@ -168,11 +168,11 @@
{
BeginPoint(int intId, String name)
{
- super(intId, name);
+ super(intId, name);
}
public String toString()
{
- return "BeginPoint[ " + toStringString() + " ]";
+ return "BeginPoint[ " + toStringString() + " ]";
}
}
@@ -183,32 +183,32 @@
int iterations;
EndPoint(int intId, String name, Map<Integer, Point> data,
- Map<String, Integer> beginPointNameToInt)
+ Map<String, Integer> beginPointNameToInt)
{
- super(intId, name);
- this.data = data;
- this.beginPointNameToInt = beginPointNameToInt;
- iterations = 0;
+ super(intId, name);
+ this.data = data;
+ this.beginPointNameToInt = beginPointNameToInt;
+ iterations = 0;
}
void setValue(long endTime)
{
- int startId = beginPointNameToInt.get(name);
- long startTime = data.get(startId).getValue();
- long elapsedTime = endTime - startTime;
- value += elapsedTime;
- iterations++;
+ int startId = beginPointNameToInt.get(name);
+ long startTime = data.get(startId).getValue();
+ long elapsedTime = endTime - startTime;
+ value += elapsedTime;
+ iterations++;
}
- double getAverage()
+ double getAverage()
{
- return value / iterations;
+ return value / iterations;
}
int getIterations()
{
- return iterations;
+ return iterations;
}
public String toString()
{
- return "EndPoint[ " + toStringString() + " " + iterations + " ]";
+ return "EndPoint[ " + toStringString() + " " + iterations + " ]";
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/TimerPointSourceGenerator.java b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/TimerPointSourceGenerator.java
index deba67f..517a5ed 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/TimerPointSourceGenerator.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/TimerPointSourceGenerator.java
@@ -64,376 +64,376 @@
*
* Note on bootstrapping: the time point file needs to be generated
* before the bulk of the ORB is built. This requires compiling
- * the newtimer and codegen classes into a library file that is
+ * the newtimer and codegen classes into a library file that is
* checked into SCCS.
*/
public class TimerPointSourceGenerator {
private static class TimingInfoProcessor {
- private boolean done = false ;
- private String pkg ;
- private TimerFactory tf ;
- private Map<String,List<String>> contents ;
- private TimerGroup currentTimerGroup ;
+ private boolean done = false ;
+ private String pkg ;
+ private TimerFactory tf ;
+ private Map<String,List<String>> contents ;
+ private TimerGroup currentTimerGroup ;
- private void checkForValidIdentifier( String name ) {
- if (!Identifier.isValidIdentifier( name ))
- throw new IllegalArgumentException(
- "name " + name + " is not a valid Java identifier" ) ;
- }
+ private void checkForValidIdentifier( String name ) {
+ if (!Identifier.isValidIdentifier( name ))
+ throw new IllegalArgumentException(
+ "name " + name + " is not a valid Java identifier" ) ;
+ }
- private void checkDone() {
- if (done)
- throw new IllegalStateException(
- "past getResult: no other methods may be called" ) ;
- }
+ private void checkDone() {
+ if (done)
+ throw new IllegalStateException(
+ "past getResult: no other methods may be called" ) ;
+ }
- public TimingInfoProcessor( String name, String pkg ) {
- this.done = false ;
- this.pkg = pkg ;
- checkForValidIdentifier( name ) ;
- if (!Identifier.isValidFullIdentifier( pkg ))
- throw new IllegalArgumentException(
- pkg + " is not a valid package name" ) ;
- this.tf = TimerFactoryBuilder.make( name, name ) ;
- this.contents = new HashMap<String,List<String>>() ;
- this.currentTimerGroup = null ;
- }
+ public TimingInfoProcessor( String name, String pkg ) {
+ this.done = false ;
+ this.pkg = pkg ;
+ checkForValidIdentifier( name ) ;
+ if (!Identifier.isValidFullIdentifier( pkg ))
+ throw new IllegalArgumentException(
+ pkg + " is not a valid package name" ) ;
+ this.tf = TimerFactoryBuilder.make( name, name ) ;
+ this.contents = new HashMap<String,List<String>>() ;
+ this.currentTimerGroup = null ;
+ }
- public void addTimer( String name, String desc ) {
- checkDone() ;
- checkForValidIdentifier( name ) ;
- tf.makeTimer( name, desc ) ;
- currentTimerGroup = null ;
- }
+ public void addTimer( String name, String desc ) {
+ checkDone() ;
+ checkForValidIdentifier( name ) ;
+ tf.makeTimer( name, desc ) ;
+ currentTimerGroup = null ;
+ }
- public void addTimerGroup( String name, String desc ) {
- checkDone() ;
- checkForValidIdentifier( name ) ;
- currentTimerGroup = tf.makeTimerGroup( name, desc ) ;
- }
+ public void addTimerGroup( String name, String desc ) {
+ checkDone() ;
+ checkForValidIdentifier( name ) ;
+ currentTimerGroup = tf.makeTimerGroup( name, desc ) ;
+ }
- public void contains( String name ) {
- checkDone() ;
- if (currentTimerGroup == null) {
- throw new IllegalStateException(
- "contains must be called after an addTimerGroup call" ) ;
- } else {
- String cname = currentTimerGroup.name() ;
- List<String> list = contents.get( cname ) ;
- if (list == null) {
- list = new ArrayList<String>() ;
- contents.put( cname, list ) ;
- }
+ public void contains( String name ) {
+ checkDone() ;
+ if (currentTimerGroup == null) {
+ throw new IllegalStateException(
+ "contains must be called after an addTimerGroup call" ) ;
+ } else {
+ String cname = currentTimerGroup.name() ;
+ List<String> list = contents.get( cname ) ;
+ if (list == null) {
+ list = new ArrayList<String>() ;
+ contents.put( cname, list ) ;
+ }
- list.add( name ) ;
- }
- }
+ list.add( name ) ;
+ }
+ }
- private static Controllable getControllable( TimerFactory tf, String name ) {
- Controllable result = tf.timers().get( name ) ;
- if (result == null)
- result = tf.timerGroups().get( name ) ;
- if (result == null)
- throw new IllegalArgumentException(
- name + " is not a valid Timer or TimerGroup name" ) ;
- return result ;
- }
+ private static Controllable getControllable( TimerFactory tf, String name ) {
+ Controllable result = tf.timers().get( name ) ;
+ if (result == null)
+ result = tf.timerGroups().get( name ) ;
+ if (result == null)
+ throw new IllegalArgumentException(
+ name + " is not a valid Timer or TimerGroup name" ) ;
+ return result ;
+ }
- private void updateTimerFactoryContents() {
- // Use the Map<String,List<String>> to fill in the TimerGroup
- // containment relation
- for (String str : contents.keySet()) {
- List<String> list = contents.get(str) ;
- TimerGroup tg = tf.timerGroups().get( str ) ;
- for (String content : list) {
- tg.add( getControllable( tf, content ) ) ;
- }
- }
- }
+ private void updateTimerFactoryContents() {
+ // Use the Map<String,List<String>> to fill in the TimerGroup
+ // containment relation
+ for (String str : contents.keySet()) {
+ List<String> list = contents.get(str) ;
+ TimerGroup tg = tf.timerGroups().get( str ) ;
+ for (String content : list) {
+ tg.add( getControllable( tf, content ) ) ;
+ }
+ }
+ }
- public Pair<String,TimerFactory> getResult() {
- checkDone() ;
- done = true ;
- updateTimerFactoryContents() ;
- Pair<String,TimerFactory> result =
- new Pair<String,TimerFactory>( pkg, tf ) ;
- return result ;
- }
+ public Pair<String,TimerFactory> getResult() {
+ checkDone() ;
+ done = true ;
+ updateTimerFactoryContents() ;
+ Pair<String,TimerFactory> result =
+ new Pair<String,TimerFactory>( pkg, tf ) ;
+ return result ;
+ }
}
private static class Handler extends DefaultHandler {
- private static final int WIDTH = 4 ;
+ private static final int WIDTH = 4 ;
- // Names of XML elements and attributes
- private static final String TIMER_ELEMENT = "timer" ;
- private static final String TIMING_ELEMENT = "timing" ;
- private static final String TIMER_GROUP_ELEMENT = "timerGroup" ;
- private static final String CONTAINS_ELEMENT = "contains" ;
+ // Names of XML elements and attributes
+ private static final String TIMER_ELEMENT = "timer" ;
+ private static final String TIMING_ELEMENT = "timing" ;
+ private static final String TIMER_GROUP_ELEMENT = "timerGroup" ;
+ private static final String CONTAINS_ELEMENT = "contains" ;
- private static final String NAME_ATTR = "name" ;
- private static final String DESCRIPTION_ATTR = "description" ;
- private static final String PACKAGE_ATTR = "package" ;
+ private static final String NAME_ATTR = "name" ;
+ private static final String DESCRIPTION_ATTR = "description" ;
+ private static final String PACKAGE_ATTR = "package" ;
- private boolean debug ;
- private int level ;
- private char[] pad ;
- private TimingInfoProcessor tip ;
- private Pair<String,TimerFactory> result ;
+ private boolean debug ;
+ private int level ;
+ private char[] pad ;
+ private TimingInfoProcessor tip ;
+ private Pair<String,TimerFactory> result ;
- public Handler( boolean debug ) {
- this.debug = debug ;
- this.level = 0 ;
- setPad() ;
- this.tip = null ;
- this.result = null ;
- }
-
- private void indent() {
- level++ ;
- setPad() ;
- }
-
- private void undent() {
- level-- ;
- setPad() ;
- }
-
- private void setPad() {
- int length = WIDTH * level ;
- pad = new char[length] ;
- for (int ctr=0; ctr<length; ctr++)
- pad[ctr] = ' ' ;
- }
-
- private void dprint( String msg ) {
- if (debug) {
- System.out.print( pad ) ;
- System.out.println( msg ) ;
- }
- }
-
- public void startDocument() throws SAXException {
- dprint( "startDocument called" ) ;
- }
-
- public void endDocument() throws SAXException {
- dprint( "endDocument called" ) ;
- result = tip.getResult() ;
- }
-
- public void startElement( String namespaceURI,
- String lName, String qName, Attributes attrs )
- throws SAXException {
-
- indent() ;
-
- // only qName is useful
- dprint( "namespaceURI=" + namespaceURI ) ;
- dprint( "lName=" + lName ) ;
- dprint( "qName=" + qName ) ;
- dprint( "Attributes:" ) ;
-
- // only local name, value are useful
- for (int ctr=0; ctr<attrs.getLength(); ctr++) {
- dprint( "\tlocal name =" + attrs.getLocalName(ctr) ) ;
- dprint( "\tqualified name=" + attrs.getQName(ctr) ) ;
- dprint( "\tvalue =" + attrs.getValue(ctr) ) ;
- }
-
- if (qName.equals( TIMING_ELEMENT )) {
- String name = attrs.getValue( NAME_ATTR ) ;
- String pkg = attrs.getValue( PACKAGE_ATTR ) ;
- tip = new TimingInfoProcessor( name, pkg ) ;
- } else if (qName.equals( TIMER_ELEMENT )) {
- String name = attrs.getValue( NAME_ATTR ) ;
- String desc = attrs.getValue( DESCRIPTION_ATTR ) ;
- tip.addTimer( name, desc ) ;
- } else if (qName.equals( TIMER_GROUP_ELEMENT )) {
- String name = attrs.getValue( NAME_ATTR ) ;
- String desc = attrs.getValue( DESCRIPTION_ATTR ) ;
- tip.addTimerGroup( name, desc ) ;
- } else if (qName.equals( CONTAINS_ELEMENT )) {
- String name = attrs.getValue( NAME_ATTR ) ;
- tip.contains( name ) ;
- } else {
- throw new IllegalStateException(
- "Unknown XML element: " + qName ) ;
- }
- }
-
- public void endElement( String namespaceURI,
- String lName, String qName ) throws SAXException {
-
- undent() ;
- }
-
- public Pair<String,TimerFactory> getResult() {
- return result ;
- }
+ public Handler( boolean debug ) {
+ this.debug = debug ;
+ this.level = 0 ;
+ setPad() ;
+ this.tip = null ;
+ this.result = null ;
}
- public static Pair<String,TimerFactory> parseDescription(
- String fileName ) throws IOException {
- return parseDescription( fileName, false ) ;
+ private void indent() {
+ level++ ;
+ setPad() ;
+ }
+
+ private void undent() {
+ level-- ;
+ setPad() ;
+ }
+
+ private void setPad() {
+ int length = WIDTH * level ;
+ pad = new char[length] ;
+ for (int ctr=0; ctr<length; ctr++)
+ pad[ctr] = ' ' ;
+ }
+
+ private void dprint( String msg ) {
+ if (debug) {
+ System.out.print( pad ) ;
+ System.out.println( msg ) ;
+ }
+ }
+
+ public void startDocument() throws SAXException {
+ dprint( "startDocument called" ) ;
+ }
+
+ public void endDocument() throws SAXException {
+ dprint( "endDocument called" ) ;
+ result = tip.getResult() ;
+ }
+
+ public void startElement( String namespaceURI,
+ String lName, String qName, Attributes attrs )
+ throws SAXException {
+
+ indent() ;
+
+ // only qName is useful
+ dprint( "namespaceURI=" + namespaceURI ) ;
+ dprint( "lName=" + lName ) ;
+ dprint( "qName=" + qName ) ;
+ dprint( "Attributes:" ) ;
+
+ // only local name, value are useful
+ for (int ctr=0; ctr<attrs.getLength(); ctr++) {
+ dprint( "\tlocal name =" + attrs.getLocalName(ctr) ) ;
+ dprint( "\tqualified name=" + attrs.getQName(ctr) ) ;
+ dprint( "\tvalue =" + attrs.getValue(ctr) ) ;
+ }
+
+ if (qName.equals( TIMING_ELEMENT )) {
+ String name = attrs.getValue( NAME_ATTR ) ;
+ String pkg = attrs.getValue( PACKAGE_ATTR ) ;
+ tip = new TimingInfoProcessor( name, pkg ) ;
+ } else if (qName.equals( TIMER_ELEMENT )) {
+ String name = attrs.getValue( NAME_ATTR ) ;
+ String desc = attrs.getValue( DESCRIPTION_ATTR ) ;
+ tip.addTimer( name, desc ) ;
+ } else if (qName.equals( TIMER_GROUP_ELEMENT )) {
+ String name = attrs.getValue( NAME_ATTR ) ;
+ String desc = attrs.getValue( DESCRIPTION_ATTR ) ;
+ tip.addTimerGroup( name, desc ) ;
+ } else if (qName.equals( CONTAINS_ELEMENT )) {
+ String name = attrs.getValue( NAME_ATTR ) ;
+ tip.contains( name ) ;
+ } else {
+ throw new IllegalStateException(
+ "Unknown XML element: " + qName ) ;
+ }
+ }
+
+ public void endElement( String namespaceURI,
+ String lName, String qName ) throws SAXException {
+
+ undent() ;
+ }
+
+ public Pair<String,TimerFactory> getResult() {
+ return result ;
+ }
+ }
+
+ public static Pair<String,TimerFactory> parseDescription(
+ String fileName ) throws IOException {
+ return parseDescription( fileName, false ) ;
}
/** Return the package for the file to generate and a TimerFactory
* that contains all of the information from the XML source file
* given by fileName.
*/
- public static Pair<String,TimerFactory> parseDescription(
- String fileName, boolean debug ) throws IOException {
+ public static Pair<String,TimerFactory> parseDescription(
+ String fileName, boolean debug ) throws IOException {
- Handler handler = new Handler( debug ) ;
- SAXParserFactory factory = SAXParserFactory.newInstance() ;
- factory.setValidating( true ) ;
- File file = null ;
+ Handler handler = new Handler( debug ) ;
+ SAXParserFactory factory = SAXParserFactory.newInstance() ;
+ factory.setValidating( true ) ;
+ File file = null ;
- try {
- SAXParser saxParser = factory.newSAXParser() ;
- file = new File( fileName ) ;
- saxParser.parse( file, handler ) ;
- } catch (Exception exc) {
- System.out.println( "Exception in processing " + file + ": " + exc ) ;
- exc.printStackTrace() ;
- return null ;
- }
+ try {
+ SAXParser saxParser = factory.newSAXParser() ;
+ file = new File( fileName ) ;
+ saxParser.parse( file, handler ) ;
+ } catch (Exception exc) {
+ System.out.println( "Exception in processing " + file + ": " + exc ) ;
+ exc.printStackTrace() ;
+ return null ;
+ }
- return handler.getResult() ;
+ return handler.getResult() ;
}
/** Generate the source file for the Timers in the TimerFactory from the description.
- * The file is generated in the directory given by the package from the description
+ * The file is generated in the directory given by the package from the description
* starting at the dirName. The name of the file is NAME.java, where NAME
* is the TimerFactory name from the description.
*/
- public static void generateSourceFile( String dirName,
- Pair<String,TimerFactory> description ) throws IOException {
+ public static void generateSourceFile( String dirName,
+ Pair<String,TimerFactory> description ) throws IOException {
- _clear() ;
- _package( description.first() ) ;
- _import( "java.lang.Object" ) ;
- _import( "java.lang.String" ) ;
- _import( "com.sun.corba.ee.spi.orb.ORB" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.Controllable" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerManager" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerFactory" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.Timer" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerEventController" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerGroup" ) ;
+ _clear() ;
+ _package( description.first() ) ;
+ _import( "java.lang.Object" ) ;
+ _import( "java.lang.String" ) ;
+ _import( "com.sun.corba.ee.spi.orb.ORB" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.Controllable" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerManager" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerFactory" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.Timer" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerEventController" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerGroup" ) ;
- TimerFactory tf = description.second() ;
- _class( PUBLIC, tf.name(), _t("Object") ) ;
+ TimerFactory tf = description.second() ;
+ _class( PUBLIC, tf.name(), _t("Object") ) ;
- // no static initializer needed
-
- generateFields( tf ) ;
- generateConstructor( tf ) ;
- generateEnterExitMethods( tf ) ;
+ // no static initializer needed
- _end() ; // of class generation
+ generateFields( tf ) ;
+ generateConstructor( tf ) ;
+ generateEnterExitMethods( tf ) ;
- File dir = new File( dirName ) ;
- String pkg = description.first() ;
- String fileDir = pkg.replace( '.', File.separatorChar ) ;
- File fdir = new File( dir, fileDir ) ;
- // mkdirs only returns true if dirs were created, so
- // false may or may not indicate an error.
- fdir.mkdirs() ;
- File file = new File( fdir, tf.name() + ".java" ) ;
- PrintStream ps = new PrintStream( file ) ;
- _sourceCode( ps, new Properties() ) ;
+ _end() ; // of class generation
+
+ File dir = new File( dirName ) ;
+ String pkg = description.first() ;
+ String fileDir = pkg.replace( '.', File.separatorChar ) ;
+ File fdir = new File( dir, fileDir ) ;
+ // mkdirs only returns true if dirs were created, so
+ // false may or may not indicate an error.
+ fdir.mkdirs() ;
+ File file = new File( fdir, tf.name() + ".java" ) ;
+ PrintStream ps = new PrintStream( file ) ;
+ _sourceCode( ps, new Properties() ) ;
}
private static void generateFields( TimerFactory tf ) {
- _data( PRIVATE|FINAL, _t("TimerEventController"), "controller" ) ;
+ _data( PRIVATE|FINAL, _t("TimerEventController"), "controller" ) ;
- for (Timer t : tf.timers().values()) {
- Type type = _t("Timer") ;
- _data( PUBLIC|FINAL, type, t.name() ) ;
- }
+ for (Timer t : tf.timers().values()) {
+ Type type = _t("Timer") ;
+ _data( PUBLIC|FINAL, type, t.name() ) ;
+ }
- for (TimerGroup tg : tf.timerGroups().values()) {
- Type type = _t("TimerGroup") ;
- _data( PUBLIC|FINAL, type, tg.name() ) ;
- }
+ for (TimerGroup tg : tf.timerGroups().values()) {
+ Type type = _t("TimerGroup") ;
+ _data( PUBLIC|FINAL, type, tg.name() ) ;
+ }
}
private static void generateConstructor( TimerFactory tf ) {
- _constructor( PUBLIC ) ;
- _arg( _t("TimerFactory"), "tf" ) ;
- _arg( _t("TimerEventController"), "controller" ) ;
- _body() ;
+ _constructor( PUBLIC ) ;
+ _arg( _t("TimerFactory"), "tf" ) ;
+ _arg( _t("TimerEventController"), "controller" ) ;
+ _body() ;
- // set up orb and tm
- _assign( _field( _this(), "controller" ), _v( "controller" ) ) ;
+ // set up orb and tm
+ _assign( _field( _this(), "controller" ), _v( "controller" ) ) ;
- // create all timers
- Signature tsig = _s( _t("Timer"), _t("String"), _t("String") ) ;
- for (Timer t : tf.timers().values() ) {
- _assign( _v( t.name() ),
- _call( _v("tf"), "makeTimer", tsig,
- _const(t.name()), _const(t.description()))) ;
- }
-
- // create all timer groups
- Signature tgsig = _s( _t("TimerGroup"), _t("String"),
- _t("String") ) ;
- for (TimerGroup tg : tf.timerGroups().values() ) {
- _assign( _v( tg.name() ),
- _call( _v("tf"), "makeTimerGroup", tgsig,
- _const(tg.name()), _const(tg.description()))) ;
- }
-
- // fill in timer group containment
- Signature addSig = _s( _void(), _t("Controllable")) ;
- for (TimerGroup tg : tf.timerGroups().values() ) {
- for (Controllable c : tg.contents() ) {
- _expr(
- _call( _v(tg.name()), "add", addSig,
- _v(c.name()))) ;
- }
- }
+ // create all timers
+ Signature tsig = _s( _t("Timer"), _t("String"), _t("String") ) ;
+ for (Timer t : tf.timers().values() ) {
+ _assign( _v( t.name() ),
+ _call( _v("tf"), "makeTimer", tsig,
+ _const(t.name()), _const(t.description()))) ;
+ }
- _end() ;
+ // create all timer groups
+ Signature tgsig = _s( _t("TimerGroup"), _t("String"),
+ _t("String") ) ;
+ for (TimerGroup tg : tf.timerGroups().values() ) {
+ _assign( _v( tg.name() ),
+ _call( _v("tf"), "makeTimerGroup", tgsig,
+ _const(tg.name()), _const(tg.description()))) ;
+ }
+
+ // fill in timer group containment
+ Signature addSig = _s( _void(), _t("Controllable")) ;
+ for (TimerGroup tg : tf.timerGroups().values() ) {
+ for (Controllable c : tg.contents() ) {
+ _expr(
+ _call( _v(tg.name()), "add", addSig,
+ _v(c.name()))) ;
+ }
+ }
+
+ _end() ;
}
private static void generateEnterExitMethods( TimerFactory tf ) {
- // generate enter and exit method for each Timer
- for (Timer t : tf.timers().values() ) {
- generateMethod( "enter", t.name() ) ;
- generateMethod( "exit", t.name() ) ;
- }
+ // generate enter and exit method for each Timer
+ for (Timer t : tf.timers().values() ) {
+ generateMethod( "enter", t.name() ) ;
+ generateMethod( "exit", t.name() ) ;
+ }
}
// XXX we should add JavaDoc support to codegen, and use it
// for the enter/exit methods.
private static void generateMethod( String op, String timer ) {
- _method( PUBLIC, _void(), op+"_"+timer ) ;
- _body() ;
- Signature sig = _s(_void(), _t("TimerEventController")) ;
- _expr( _call( _v("controller"), op, sig, _v(timer))) ;
- _end() ;
+ _method( PUBLIC, _void(), op+"_"+timer ) ;
+ _body() ;
+ Signature sig = _s(_void(), _t("TimerEventController")) ;
+ _expr( _call( _v("controller"), op, sig, _v(timer))) ;
+ _end() ;
}
public static void main( String[] args ) {
- // arguments: infile outdir debug
- if (args.length != 3) {
- System.out.println( "Required arguments: input-file output-directory" ) ;
- System.exit( 1 ) ;
- } else {
- try {
- String infile = args[0] ;
- String outdir = args[1] ;
- boolean debug = Boolean.parseBoolean( args[2] ) ;
- Pair<String,TimerFactory> result = parseDescription( infile,
- debug ) ;
- generateSourceFile( outdir, result ) ;
- } catch (Exception exc) {
- System.out.println( "Failed with exception: " + exc ) ;
- exc.printStackTrace() ;
- System.exit( 1 ) ;
- }
- }
+ // arguments: infile outdir debug
+ if (args.length != 3) {
+ System.out.println( "Required arguments: input-file output-directory" ) ;
+ System.exit( 1 ) ;
+ } else {
+ try {
+ String infile = args[0] ;
+ String outdir = args[1] ;
+ boolean debug = Boolean.parseBoolean( args[2] ) ;
+ Pair<String,TimerFactory> result = parseDescription( infile,
+ debug ) ;
+ generateSourceFile( outdir, result ) ;
+ } catch (Exception exc) {
+ System.out.println( "Failed with exception: " + exc ) ;
+ exc.printStackTrace() ;
+ System.exit( 1 ) ;
+ }
+ }
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/TimerUtils.java b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/TimerUtils.java
index d50c557..5bd7fca 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/TimerUtils.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/corba/timer/src/utils/TimerUtils.java
@@ -34,85 +34,85 @@
public class TimerUtils {
- private TimerUtils() {}
+ private TimerUtils() {}
- public static void dumpLogToFile( TimerFactory tf, LogEventHandler log,
- File file ) {
-
- PrintStream ps = null ;
- try {
- ps = new PrintStream( file ) ;
+ public static void dumpLogToFile( TimerFactory tf, LogEventHandler log,
+ File file ) {
- // Dump the timer and timer group names to the file in numerical order
- // Time group names are not used, but this will be compatible
- // with the log event processor.
- for (int ctr=0; ctr<tf.numberOfIds(); ctr++) {
- Controllable con = tf.getControllable( ctr ) ;
- ps.println( "BEGIN " + con.name() ) ;
- ps.println( "END " + con.name() ) ;
- }
+ PrintStream ps = null ;
+ try {
+ ps = new PrintStream( file ) ;
- ps.println( "#####" ) ;
+ // Dump the timer and timer group names to the file in numerical order
+ // Time group names are not used, but this will be compatible
+ // with the log event processor.
+ for (int ctr=0; ctr<tf.numberOfIds(); ctr++) {
+ Controllable con = tf.getControllable( ctr ) ;
+ ps.println( "BEGIN " + con.name() ) ;
+ ps.println( "END " + con.name() ) ;
+ }
- // Dump the timer info
- for ( TimerEvent event : log ) {
- int id = event.timer().id() ;
- if (event.type() == TimerEvent.TimerEventType.ENTER)
- id = 2*id ;
- else // EXIT event
- id = 2*id + 1 ;
- ps.println( id + " " + event.time() ) ;
- }
- } catch (Exception exc) {
- System.out.println( "Error in dumping " + log + " to file " + file
- + ": " + exc ) ;
- exc.printStackTrace() ;
- } finally {
- if (ps != null)
- ps.close() ;
- }
+ ps.println( "#####" ) ;
+
+ // Dump the timer info
+ for ( TimerEvent event : log ) {
+ int id = event.timer().id() ;
+ if (event.type() == TimerEvent.TimerEventType.ENTER)
+ id = 2*id ;
+ else // EXIT event
+ id = 2*id + 1 ;
+ ps.println( id + " " + event.time() ) ;
+ }
+ } catch (Exception exc) {
+ System.out.println( "Error in dumping " + log + " to file " + file
+ + ": " + exc ) ;
+ exc.printStackTrace() ;
+ } finally {
+ if (ps != null)
+ ps.close() ;
+ }
}
private static class Connector {
- public String name ;
- public long count ;
- public double min ;
- public double max ;
- public double average ;
- public double standardDeviation ;
-
- public Connector( String name, long count, double min,
- double max, double average, double standardDeviation ) {
+ public String name ;
+ public long count ;
+ public double min ;
+ public double max ;
+ public double average ;
+ public double standardDeviation ;
- this.name = name ;
- this.count = count ;
- this.min = min ;
- this.max = max ;
- this.average = average ;
- this.standardDeviation = standardDeviation ;
- }
+ public Connector( String name, long count, double min,
+ double max, double average, double standardDeviation ) {
+
+ this.name = name ;
+ this.count = count ;
+ this.min = min ;
+ this.max = max ;
+ this.average = average ;
+ this.standardDeviation = standardDeviation ;
+ }
}
private static String concat( String[] strs ) {
- StringBuilder sb = new StringBuilder() ;
- for( String str : strs ) {
- sb.append( str ) ;
- sb.append( '\n' ) ;
- }
- return sb.toString() ;
+ StringBuilder sb = new StringBuilder() ;
+ for( String str : strs ) {
+ sb.append( str ) ;
+ sb.append( '\n' ) ;
+ }
+ return sb.toString() ;
}
/** Write the Timer data in the Map to the named file with the given
* title.
*/
public static void writeHtmlTable( Map<Timer, Statistics> data,
- String fname, String title ) {
+ String fname, String title ) {
- // open a file and a printWriter here
- PrintWriter pw = null ;
- try {
- pw = new PrintWriter( fname ) ;
- pw.println(
+ // open a file and a printWriter here
+ PrintWriter pw = null ;
+ try {
+ pw = new PrintWriter( fname ) ;
+ pw.println(
"<html>"+
"<head>"+
" <title>" + title + "</title>"+
@@ -129,29 +129,29 @@
" <td>std deviation</td>"+
" </tr>");
- for (Timer timer : data.keySet() ) {
- Statistics stats = data.get( timer ) ;
- pw.println(
- " <tr>"+
- " <td>"+timer.name()+"</td>"+
- " <td>"+stats.count()+"</td>"+
- " <td>"+stats.min()+"</td>"+
- " <td>"+stats.max()+"</td>"+
- " <td>"+stats.average()+"</td>"+
- " <td>"+stats.standardDeviation()+"</td>"+
- " </tr>");
- }
+ for (Timer timer : data.keySet() ) {
+ Statistics stats = data.get( timer ) ;
+ pw.println(
+ " <tr>"+
+ " <td>"+timer.name()+"</td>"+
+ " <td>"+stats.count()+"</td>"+
+ " <td>"+stats.min()+"</td>"+
+ " <td>"+stats.max()+"</td>"+
+ " <td>"+stats.average()+"</td>"+
+ " <td>"+stats.standardDeviation()+"</td>"+
+ " </tr>");
+ }
pw.println(
- "</table>"+
- "</body>"+
- "</html>");
+ "</table>"+
+ "</body>"+
+ "</html>");
- } catch (Exception exc) {
- throw new RuntimeException( exc ) ;
- } finally {
- if (pw != null)
- pw.close() ;
- }
+ } catch (Exception exc) {
+ throw new RuntimeException( exc ) ;
+ } finally {
+ if (pw != null)
+ pw.close() ;
+ }
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/build.properties
index e0409f7..e3aa052 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/build.properties
@@ -14,7 +14,7 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-
+
src.dir=.
mbeanapi.jar=${publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/build.xml
index 5e83e33..27dc2bb 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/build.xml
@@ -32,7 +32,7 @@
<pathelement location="${jmxri.jar}"/>
<pathelement location="${mbeanapi.jar}"/>
<pathelement location="${mbeanapi-impl.jar}"/>
- <pathelement location="${mgmtapi.jar}"/>
+ <pathelement location="${mgmtapi.jar}"/>
</path>
<path id="run.classpath">
@@ -40,7 +40,7 @@
<pathelement location="${jmxri.jar}"/>
<pathelement location="${mbeanapi.jar}"/>
<pathelement location="${mbeanapi-impl.jar}"/>
- <pathelement location="${jmxremote.jar}"/>
+ <pathelement location="${jmxremote.jar}"/>
<pathelement location="${mgmtapi.jar}"/>
</path>
@@ -77,27 +77,27 @@
<target name="run-standalone-instance-manager" description="runs the standalone instance manager unit test twice to create two standalone instances">
<java classname="com.sun.enterprise.admin.mbeanapi.common.StandaloneInstanceManager">
- <classpath refid="run.classpath"/>
- <arg value="${standalone.instance.one}"/>
+ <classpath refid="run.classpath"/>
+ <arg value="${standalone.instance.one}"/>
</java>
<java classname="com.sun.enterprise.admin.mbeanapi.common.StandaloneInstanceManager">
- <classpath refid="run.classpath"/>
- <arg value="${standalone.instance.two}"/>
- <sysproperty key="HOST" value="localhost"/>
- <sysproperty key="PORT" value="8686"/>
- <sysproperty key="ADMIN_USER" value="admin"/>
- <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
+ <classpath refid="run.classpath"/>
+ <arg value="${standalone.instance.two}"/>
+ <sysproperty key="HOST" value="localhost"/>
+ <sysproperty key="PORT" value="8686"/>
+ <sysproperty key="ADMIN_USER" value="admin"/>
+ <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
</java>
</target>
<target name="run-amx-connection-verifier" description="runs the amx connection verifier unit test">
<java classname="com.sun.enterprise.admin.mbeanapi.common.AMXConnectionVerifier">
- <classpath refid="run.classpath"/>
- <arg value="${standalone.instance.one}"/>
- <sysproperty key="HOST" value="localhost"/>
- <sysproperty key="PORT" value="8686"/>
- <sysproperty key="ADMIN_USER" value="admin"/>
- <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
+ <classpath refid="run.classpath"/>
+ <arg value="${standalone.instance.one}"/>
+ <sysproperty key="HOST" value="localhost"/>
+ <sysproperty key="PORT" value="8686"/>
+ <sysproperty key="ADMIN_USER" value="admin"/>
+ <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
</java>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXConnectionVerifier.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXConnectionVerifier.java
index 859101e..baa9c1c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXConnectionVerifier.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXConnectionVerifier.java
@@ -52,7 +52,7 @@
* @version $Revision: 1.2 $
*/
public class AMXConnectionVerifier {
- private final DomainRoot mDomainRoot;
+ private final DomainRoot mDomainRoot;
private DomainConfig getDomainConfig()
{
@@ -74,14 +74,14 @@
return( SmartStringifier.toString( o ) );
}
- private void listMap(final String msg, final Map m)
+ private void listMap(final String msg, final Map m)
{
println( msg + ": " + toString( m.keySet() ) );
}
private void list()
{
- final DomainConfig dcp = getDomainConfig();
+ final DomainConfig dcp = getDomainConfig();
// Top-level items
println( "\n--- Top-level --- \n" );
@@ -128,7 +128,7 @@
// get a ConfigConfig
- final ConfigConfig config =
+ final ConfigConfig config =
(ConfigConfig)dcp.getConfigConfigMap().get( "server-config" );
@@ -145,19 +145,19 @@
*/
private void queryWild(final String name, final String value)
{
- final String[] propNames = new String[ 1 ];
- propNames[ 0 ] = name;
+ final String[] propNames = new String[ 1 ];
+ propNames[ 0 ] = name;
- final String[] propValues = new String[ 1 ];
- propValues[ 0 ] = value;
+ final String[] propValues = new String[ 1 ];
+ propValues[ 0 ] = value;
- final Set items = getQueryMgr().queryWildSet( propNames, propValues );
+ final Set items = getQueryMgr().queryWildSet( propNames, propValues );
println( "\n--- Queried for " + propNames[ 0 ] + "=" + propValues[ 0 ] + " ---" );
- final Iterator iter = items.iterator();
+ final Iterator iter = items.iterator();
while ( iter.hasNext() )
{
- final AMX item = (AMX)iter.next();
+ final AMX item = (AMX)iter.next();
println( "j2eeType=" + item.getJ2EEType() + "," + "name=" + item.getName() );
}
@@ -168,15 +168,15 @@
*/
private void queryForJ2EEType( final String j2eeType )
{
- final String prop = Util.makeJ2EETypeProp( j2eeType );
- final Set items = getQueryMgr().queryPropsSet( prop );
+ final String prop = Util.makeJ2EETypeProp( j2eeType );
+ final Set items = getQueryMgr().queryPropsSet( prop );
println( "\n--- Queried for " + prop + " ---" );
- final Iterator iter = items.iterator();
+ final Iterator iter = items.iterator();
while ( iter.hasNext() )
{
- final AMX item = (AMX)iter.next();
+ final AMX item = (AMX)iter.next();
// they may or may not have unique names, so show ObjectNames
println( item.getFullType() );
@@ -193,16 +193,16 @@
queryForJ2EEType( XTypes.SSL_CONFIG );
}
- public AMXConnectionVerifier(final String host,
- final int port,
- final String adminUser,
+ public AMXConnectionVerifier(final String host,
+ final int port,
+ final String adminUser,
final String adminPassword,
final boolean useTLS)
throws IOException
{
- final AMXConnector ct = new AMXConnector( host, port, adminUser, adminPassword, useTLS );
+ final AMXConnector ct = new AMXConnector( host, port, adminUser, adminPassword, useTLS );
- mDomainRoot = ct.getDomainRoot();
+ mDomainRoot = ct.getDomainRoot();
proveConnection( );
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXConnector.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXConnector.java
index 81b6b3e..c591c1b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXConnector.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXConnector.java
@@ -33,29 +33,29 @@
* @version $Revision: 1.2 $
*/
public class AMXConnector {
- private final DomainRoot mDomainRoot;
- private final AppserverConnectionSource mAppserverConnectionSource;
- private HandshakeCompletedListenerImpl mHandshakeCompletedListener;
+ private final DomainRoot mDomainRoot;
+ private final AppserverConnectionSource mAppserverConnectionSource;
+ private HandshakeCompletedListenerImpl mHandshakeCompletedListener;
- private final static String TRUST_STORE_FILE = "./keystore";
- private final static String TRUST_STORE_PASSWORD = "changeme";
+ private final static String TRUST_STORE_FILE = "./keystore";
+ private final static String TRUST_STORE_PASSWORD = "changeme";
- // currently it defaults to using rmi transport.
+ // currently it defaults to using rmi transport.
public AMXConnector(
- final String host,
- final int port,
- final String user,
- final String password,
- final boolean useTLS )
+ final String host,
+ final int port,
+ final String user,
+ final String password,
+ final boolean useTLS )
throws IOException
{
- mHandshakeCompletedListener = null;
+ mHandshakeCompletedListener = null;
- TLSParams tlsParams = null;
+ TLSParams tlsParams = null;
if ( useTLS )
{
- tlsParams = createTLSParams( );
+ tlsParams = createTLSParams( );
}
final String info = "host=" + host + ", port=" + port +
@@ -64,12 +64,12 @@
info( "Connecting: " + info );
- mAppserverConnectionSource =
+ mAppserverConnectionSource =
new AppserverConnectionSource( AppserverConnectionSource.PROTOCOL_RMI,
host, port, user, password, tlsParams, null);
- mDomainRoot = mAppserverConnectionSource.getDomainRoot();
+ mDomainRoot = mAppserverConnectionSource.getDomainRoot();
info( "Connection established successfully: " + info );
if ( useTLS )
@@ -81,15 +81,15 @@
private TLSParams createTLSParams()
{
- final File trustStore = new File( TRUST_STORE_FILE );
- final char[] trustStorePassword = TRUST_STORE_PASSWORD.toCharArray();
+ final File trustStore = new File( TRUST_STORE_FILE );
+ final char[] trustStorePassword = TRUST_STORE_PASSWORD.toCharArray();
- mHandshakeCompletedListener = new HandshakeCompletedListenerImpl();
+ mHandshakeCompletedListener = new HandshakeCompletedListenerImpl();
final TrustStoreTrustManager trustMgr =
new TrustStoreTrustManager( trustStore, trustStorePassword);
trustMgr.setPrompt( true );
- final TLSParams tlsParams = new TLSParams( trustMgr, mHandshakeCompletedListener );
+ final TLSParams tlsParams = new TLSParams( trustMgr, mHandshakeCompletedListener );
return( tlsParams );
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXMonitoringTestBase.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXMonitoringTestBase.java
index 4576a56..e6ab0a2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXMonitoringTestBase.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/common/com/sun/enterprise/admin/mbeanapi/common/AMXMonitoringTestBase.java
@@ -28,79 +28,79 @@
/**
*/
public class AMXMonitoringTestBase {
-
+
DomainRoot mDomainRoot;
public static final String SERVER_NAME = "server";
public static final String APP_NAME = "stateless-simple";
public static final String STATELESS_EJB_NAME = "stateless-simple.war";
-
- public AMXMonitoringTestBase(final String host, final int port,
+
+ public AMXMonitoringTestBase(final String host, final int port,
final String adminUser, final String adminPassword,
final boolean useTLS) throws IOException {
-
- final AMXConnector ct =
+
+ final AMXConnector ct =
new AMXConnector( host, port, adminUser, adminPassword, useTLS );
mDomainRoot = ct.getDomainRoot();
-
+
}
-
+
/**
*
*/
private MonitoringRoot getMonitoringRoot() {
return mDomainRoot.getMonitoringRoot();
}
-
+
/**
*
*/
public ServerRootMonitor getServerRootMonitor(final String serverName) {
-
- ServerRootMonitor svrRoot =
+
+ ServerRootMonitor svrRoot =
(serverName != null || "".equals(serverName))
? ( (ServerRootMonitor) getMonitoringRoot().
getServerRootMonitorMap().get(serverName) )
: ( (ServerRootMonitor) getMonitoringRoot().
getServerRootMonitorMap().get(SERVER_NAME) );
- assert(svrRoot != null) : "Cannot find server with name " +
+ assert(svrRoot != null) : "Cannot find server with name " +
serverName + "!";
return svrRoot;
}
-
-
+
+
/**
*
*/
public ApplicationMonitor getApplicationMonitor(
final String serverName, final String appName) {
- ApplicationMonitor app =
+ ApplicationMonitor app =
(appName != null || "".equals(appName))
? ( (ApplicationMonitor) getServerRootMonitor(serverName).
getApplicationMonitorMap().get(appName) )
: ( (ApplicationMonitor) getServerRootMonitor(serverName).
getApplicationMonitorMap().get(APP_NAME) );
- assert(app != null) : "Cannot find application monitor with name " +
+ assert(app != null) : "Cannot find application monitor with name " +
appName + "!";
return app;
}
-
-
+
+
/**
*
*/
- public void listStats (MonitoringStats ms) {
+ public void listStats (MonitoringStats ms) {
if (ms != null) {
Stats stats = ms.getStats();
Statistic[] sts = stats.getStatistics();
printStats(sts);
} else {
- System.out.println("VERIFY! Stats for " + ms.getName()
+ System.out.println("VERIFY! Stats for " + ms.getName()
+ " doesn't exist!");
}
}
-
+
/**
*
*/
@@ -108,13 +108,13 @@
if (stats == null) {
return;
}
-
+
for ( int i=0; i < stats.length; i++) {
printStat(stats[i]);
}
}
-
-
+
+
/**
*
*
@@ -128,18 +128,18 @@
System.out.println(" --- Stat [" + stat.getName() + "]");
System.out.println(" |");
System.out.println(" |");
- System.out.println(" ---- Description: "
+ System.out.println(" ---- Description: "
+ stat.getDescription());
System.out.println(" ---- Start Time: "
+ stat.getStartTime());
- System.out.println(" ---- Last Sample Time: "
+ System.out.println(" ---- Last Sample Time: "
+ stat.getLastSampleTime());
System.out.println(" ---- Unit: "
+ stat.getUnit());
System.out.println("\n");
}
}
-
+
/**
*
*/
@@ -149,7 +149,7 @@
System.out.println("Args[" + i + "]: " + args[i]);
}
}
-
+
/**
*
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/build.properties
index cb4e304..53b06ee 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/build.properties
@@ -14,7 +14,7 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-
+
src.dir=.
mbeanapi.jar=${publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/build.xml
index bf04e83..8496e36 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/build.xml
@@ -32,9 +32,9 @@
<pathelement location="${jmxri.jar}"/>
<pathelement location="${mbeanapi.jar}"/>
<pathelement location="${mbeanapi-impl.jar}"/>
- <pathelement location="${jmxremote.jar}"/>
- <pathelement location="${common}"/>
- <pathelement location="${mgmtapi.jar}"/>
+ <pathelement location="${jmxremote.jar}"/>
+ <pathelement location="${common}"/>
+ <pathelement location="${mgmtapi.jar}"/>
</path>
<path id="run.classpath">
@@ -44,14 +44,14 @@
<pathelement location="${mbeanapi-impl.jar}"/>
<pathelement location="${jmxremote.jar}"/>
<pathelement location="${mgmtapi.jar}"/>
- <pathelement location="${common}"/>
+ <pathelement location="${common}"/>
</path>
<target name="init" description="MBeanapi Tests initialization">
<mkdir dir="${build}"/>
<exec executable="ant" dir="${testsRoot}/../common" failonerror="true">
<arg value="build"/>
- </exec>
+ </exec>
</target>
<!-- all -->
@@ -82,162 +82,162 @@
</target>
<target name="run-standalone-instance-test-1" description="runs the standalone instance test to create, start, stop and delete one standalone instance">
- <java classname="com.sun.enterprise.admin.mbeanapi.config.StandaloneInstanceTest"
- fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
- <classpath refid="run.classpath"/>
- <sysproperty key="HOST" value="localhost"/>
- <sysproperty key="AMX_PORT" value="8686"/>
- <sysproperty key="ADMIN_PORT" value="4849"/>
- <sysproperty key="ADMIN_USER" value="admin"/>
- <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
- <sysproperty key="NODE_AGENT" value="hyades"/> <!-- change this to your node agent name-->
- <sysproperty key="NEW_NODE_AGENT" value="true"/>
- <sysproperty key="NUM_INSTANCES" value="1"/>
- <sysproperty key="USE_TLS" value="true"/>
- <!--<sysproperty key="CONFIG_NAME" value="a_config"/>-->
- <sysproperty key="PROPERTIES" value="HTTP_LISTENER_PORT=${http-list-1}:HTTP_SSL_LISTENER_PORT=${http-list-2}:IIOP_LISTENER_PORT=${orb-list-1}:IIOP_SSL_LISTENER_PORT=${SSL}:IIOP_SSL_MUTUALAUTH_PORT=${SSL_MUTUALAUTH}:JMX_SYSTEM_CONNECTOR_PORT=${JMX_SYSTEM_CONNECTOR}"/>
- <!-- uncomment the following lines if starting jvm in debug mode,
- but do not check in to cvs with debug enabled, and forking set to true-->
- <!--<sysproperty key="java.compiler" value="NONE"/>-->
- <!--<jvmarg value="-Xdebug"/>-->
- <!--<jvmarg value="-Xnoagent"/>-->
- <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
+ <java classname="com.sun.enterprise.admin.mbeanapi.config.StandaloneInstanceTest"
+ fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
+ <classpath refid="run.classpath"/>
+ <sysproperty key="HOST" value="localhost"/>
+ <sysproperty key="AMX_PORT" value="8686"/>
+ <sysproperty key="ADMIN_PORT" value="4849"/>
+ <sysproperty key="ADMIN_USER" value="admin"/>
+ <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
+ <sysproperty key="NODE_AGENT" value="hyades"/> <!-- change this to your node agent name-->
+ <sysproperty key="NEW_NODE_AGENT" value="true"/>
+ <sysproperty key="NUM_INSTANCES" value="1"/>
+ <sysproperty key="USE_TLS" value="true"/>
+ <!--<sysproperty key="CONFIG_NAME" value="a_config"/>-->
+ <sysproperty key="PROPERTIES" value="HTTP_LISTENER_PORT=${http-list-1}:HTTP_SSL_LISTENER_PORT=${http-list-2}:IIOP_LISTENER_PORT=${orb-list-1}:IIOP_SSL_LISTENER_PORT=${SSL}:IIOP_SSL_MUTUALAUTH_PORT=${SSL_MUTUALAUTH}:JMX_SYSTEM_CONNECTOR_PORT=${JMX_SYSTEM_CONNECTOR}"/>
+ <!-- uncomment the following lines if starting jvm in debug mode,
+ but do not check in to cvs with debug enabled, and forking set to true-->
+ <!--<sysproperty key="java.compiler" value="NONE"/>-->
+ <!--<jvmarg value="-Xdebug"/>-->
+ <!--<jvmarg value="-Xnoagent"/>-->
+ <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
</java>
</target>
<target name="run-standalone-instance-test-2" description="runs the standalone instance test to create, start, stop and delete four standalone instances">
<java classname="com.sun.enterprise.admin.mbeanapi.config.StandaloneInstanceTest"
- failonerror="true"
- fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
- <classpath refid="run.classpath"/>
- <sysproperty key="HOST" value="localhost"/>
- <sysproperty key="AMX_PORT" value="8686"/>
- <sysproperty key="ADMIN_PORT" value="4849"/>
- <sysproperty key="ADMIN_USER" value="admin"/>
- <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
- <sysproperty key="NODE_AGENT" value="hyades"/> <!-- change this to your node agent name-->
- <sysproperty key="NEW_NODE_AGENT" value="true"/>
- <sysproperty key="NUM_INSTANCES" value="4"/>
- <sysproperty key="USE_TLS" value="true"/>
- <sysproperty key="PROPERTIES" value="HTTP_LISTENER_PORT=${http-list-1}:HTTP_SSL_LISTENER_PORT=${http-list-2}:IIOP_LISTENER_PORT=${orb-list-1}:IIOP_SSL_LISTENER_PORT=${SSL}:IIOP_SSL_MUTUALAUTH_PORT=${SSL_MUTUALAUTH}:JMX_SYSTEM_CONNECTOR_PORT=${JMX_SYSTEM_CONNECTOR}"/>
- <!-- uncomment the following lines if starting jvm in debug mode,
- but do not check in to cvs with debug enabled, and forking set to true-->
- <!--<sysproperty key="java.compiler" value="NONE"/>-->
- <!--<jvmarg value="-Xdebug"/>-->
- <!--<jvmarg value="-Xnoagent"/>-->
- <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
+ failonerror="true"
+ fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
+ <classpath refid="run.classpath"/>
+ <sysproperty key="HOST" value="localhost"/>
+ <sysproperty key="AMX_PORT" value="8686"/>
+ <sysproperty key="ADMIN_PORT" value="4849"/>
+ <sysproperty key="ADMIN_USER" value="admin"/>
+ <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
+ <sysproperty key="NODE_AGENT" value="hyades"/> <!-- change this to your node agent name-->
+ <sysproperty key="NEW_NODE_AGENT" value="true"/>
+ <sysproperty key="NUM_INSTANCES" value="4"/>
+ <sysproperty key="USE_TLS" value="true"/>
+ <sysproperty key="PROPERTIES" value="HTTP_LISTENER_PORT=${http-list-1}:HTTP_SSL_LISTENER_PORT=${http-list-2}:IIOP_LISTENER_PORT=${orb-list-1}:IIOP_SSL_LISTENER_PORT=${SSL}:IIOP_SSL_MUTUALAUTH_PORT=${SSL_MUTUALAUTH}:JMX_SYSTEM_CONNECTOR_PORT=${JMX_SYSTEM_CONNECTOR}"/>
+ <!-- uncomment the following lines if starting jvm in debug mode,
+ but do not check in to cvs with debug enabled, and forking set to true-->
+ <!--<sysproperty key="java.compiler" value="NONE"/>-->
+ <!--<jvmarg value="-Xdebug"/>-->
+ <!--<jvmarg value="-Xnoagent"/>-->
+ <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
</java>
</target>
<target name="run-config-tests" description="runs resources,pools,http-service config elements tests to create, delete, list operations">
<java classname="com.sun.enterprise.admin.mbeanapi.config.AMXConfigVerifier"
- failonerror="true"
- fork="false"> <!-- turn forking to true if starting jvm in debug mode-->
- <classpath refid="run.classpath"/>
- <sysproperty key="HOST" value="localhost"/>
- <sysproperty key="AMX_PORT" value="8686"/>
- <sysproperty key="ADMIN_PORT" value="4849"/>
- <sysproperty key="ADMIN_USER" value="admin"/>
- <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
- <sysproperty key="NODE_AGENT" value="hyades"/> <!-- change this to your node agent name-->
- <sysproperty key="NEW_NODE_AGENT" value="true"/>
- <sysproperty key="NUM_INSTANCES" value="4"/>
- <sysproperty key="USE_TLS" value="true"/>
- <!-- uncomment the following lines if starting jvm in debug mode,
- but do not check in to cvs with debug enabled, and forking set to true-->
- <!--<sysproperty key="java.compiler" value="NONE"/>-->
- <!--<jvmarg value="-Xdebug"/>-->
- <!--<jvmarg value="-Xnoagent"/>-->
- <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
+ failonerror="true"
+ fork="false"> <!-- turn forking to true if starting jvm in debug mode-->
+ <classpath refid="run.classpath"/>
+ <sysproperty key="HOST" value="localhost"/>
+ <sysproperty key="AMX_PORT" value="8686"/>
+ <sysproperty key="ADMIN_PORT" value="4849"/>
+ <sysproperty key="ADMIN_USER" value="admin"/>
+ <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
+ <sysproperty key="NODE_AGENT" value="hyades"/> <!-- change this to your node agent name-->
+ <sysproperty key="NEW_NODE_AGENT" value="true"/>
+ <sysproperty key="NUM_INSTANCES" value="4"/>
+ <sysproperty key="USE_TLS" value="true"/>
+ <!-- uncomment the following lines if starting jvm in debug mode,
+ but do not check in to cvs with debug enabled, and forking set to true-->
+ <!--<sysproperty key="java.compiler" value="NONE"/>-->
+ <!--<jvmarg value="-Xdebug"/>-->
+ <!--<jvmarg value="-Xnoagent"/>-->
+ <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
</java>
</target>
<target name="run-cluster-lifecycle-test-1" description="creates 1 cluster with 2 instances, starts and stops cluster, then starts and stops each of the instances in the cluster, then deletes instances and cluster">
<java classname="com.sun.enterprise.admin.mbeanapi.config.ClusterLifecycleTest"
- failonerror="true"
- fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
- <classpath refid="run.classpath"/>
- <sysproperty key="HOST" value="localhost"/>
- <sysproperty key="AMX_PORT" value="8686"/>
- <sysproperty key="ADMIN_PORT" value="4849"/>
- <sysproperty key="ADMIN_USER" value="admin"/>
- <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
- <sysproperty key="NODE_AGENT" value="hyades"/> <!-- change this to your node agent name-->
- <sysproperty key="NEW_NODE_AGENT" value="true"/>
- <sysproperty key="NUM_INSTANCES" value="2"/>
- <sysproperty key="NUM_CLUSTERS" value="1"/>
- <sysproperty key="USE_TLS" value="true"/>
- <sysproperty key="PROPERTIES" value="HTTP_LISTENER_PORT=${http-list-1}:HTTP_SSL_LISTENER_PORT=${http-list-2}:IIOP_LISTENER_PORT=${orb-list-1}:IIOP_SSL_LISTENER_PORT=${SSL}:IIOP_SSL_MUTUALAUTH_PORT=${SSL_MUTUALAUTH}:JMX_SYSTEM_CONNECTOR_PORT=${JMX_SYSTEM_CONNECTOR}"/>
- <!-- uncomment the following lines if starting jvm in debug mode,
- but do not check in to cvs with debug enabled, and forking set to true-->
- <!--<sysproperty key="java.compiler" value="NONE"/>-->
- <!--<jvmarg value="-Xdebug"/>-->
- <!--<jvmarg value="-Xnoagent"/>-->
- <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
+ failonerror="true"
+ fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
+ <classpath refid="run.classpath"/>
+ <sysproperty key="HOST" value="localhost"/>
+ <sysproperty key="AMX_PORT" value="8686"/>
+ <sysproperty key="ADMIN_PORT" value="4849"/>
+ <sysproperty key="ADMIN_USER" value="admin"/>
+ <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
+ <sysproperty key="NODE_AGENT" value="hyades"/> <!-- change this to your node agent name-->
+ <sysproperty key="NEW_NODE_AGENT" value="true"/>
+ <sysproperty key="NUM_INSTANCES" value="2"/>
+ <sysproperty key="NUM_CLUSTERS" value="1"/>
+ <sysproperty key="USE_TLS" value="true"/>
+ <sysproperty key="PROPERTIES" value="HTTP_LISTENER_PORT=${http-list-1}:HTTP_SSL_LISTENER_PORT=${http-list-2}:IIOP_LISTENER_PORT=${orb-list-1}:IIOP_SSL_LISTENER_PORT=${SSL}:IIOP_SSL_MUTUALAUTH_PORT=${SSL_MUTUALAUTH}:JMX_SYSTEM_CONNECTOR_PORT=${JMX_SYSTEM_CONNECTOR}"/>
+ <!-- uncomment the following lines if starting jvm in debug mode,
+ but do not check in to cvs with debug enabled, and forking set to true-->
+ <!--<sysproperty key="java.compiler" value="NONE"/>-->
+ <!--<jvmarg value="-Xdebug"/>-->
+ <!--<jvmarg value="-Xnoagent"/>-->
+ <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
</java>
</target>
<target name="run-http-listener-test" description="creates an http-listener, a virtual server and an ssl element under this listener and verified creation.">
<java classname="com.sun.enterprise.admin.mbeanapi.config.HTTPListenerTests"
- failonerror="true"
- fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
- <classpath refid="run.classpath"/>
- <sysproperty key="HOST" value="localhost"/>
- <sysproperty key="AMX_PORT" value="8686"/>
- <sysproperty key="ADMIN_PORT" value="4849"/>
- <sysproperty key="ADMIN_USER" value="admin"/>
- <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
- <sysproperty key="USE_TLS" value="true"/>
+ failonerror="true"
+ fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
+ <classpath refid="run.classpath"/>
+ <sysproperty key="HOST" value="localhost"/>
+ <sysproperty key="AMX_PORT" value="8686"/>
+ <sysproperty key="ADMIN_PORT" value="4849"/>
+ <sysproperty key="ADMIN_USER" value="admin"/>
+ <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
+ <sysproperty key="USE_TLS" value="true"/>
<sysproperty key="CONFIG_NAME" value="server-config"/>
- <!-- uncomment the following lines if starting jvm in debug mode,
- but do not check in to cvs with debug enabled, and forking set to true-->
- <!--<sysproperty key="java.compiler" value="NONE"/>-->
- <!--<jvmarg value="-Xdebug"/>-->
- <!--<jvmarg value="-Xnoagent"/>-->
- <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
+ <!-- uncomment the following lines if starting jvm in debug mode,
+ but do not check in to cvs with debug enabled, and forking set to true-->
+ <!--<sysproperty key="java.compiler" value="NONE"/>-->
+ <!--<jvmarg value="-Xdebug"/>-->
+ <!--<jvmarg value="-Xnoagent"/>-->
+ <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
</java>
</target>
<target name="run-iiop-listener-test" description="creates an iiop-listener, a virtual server and an ssl element under this listener and verified creation.">
<java classname="com.sun.enterprise.admin.mbeanapi.config.IIOPListenerTests"
- failonerror="true"
- fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
- <classpath refid="run.classpath"/>
- <sysproperty key="HOST" value="localhost"/>
- <sysproperty key="AMX_PORT" value="8686"/>
- <sysproperty key="ADMIN_PORT" value="4849"/>
- <sysproperty key="ADMIN_USER" value="admin"/>
- <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
- <sysproperty key="USE_TLS" value="true"/>
- <sysproperty key="CONFIG_NAME" value="server-config"/>
- <!-- uncomment the following lines if starting jvm in debug mode,
- but do not check in to cvs with debug enabled, and forking set to true-->
- <!--<sysproperty key="java.compiler" value="NONE"/>-->
- <!--<jvmarg value="-Xdebug"/>-->
- <!--<jvmarg value="-Xnoagent"/>-->
- <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
+ failonerror="true"
+ fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
+ <classpath refid="run.classpath"/>
+ <sysproperty key="HOST" value="localhost"/>
+ <sysproperty key="AMX_PORT" value="8686"/>
+ <sysproperty key="ADMIN_PORT" value="4849"/>
+ <sysproperty key="ADMIN_USER" value="admin"/>
+ <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
+ <sysproperty key="USE_TLS" value="true"/>
+ <sysproperty key="CONFIG_NAME" value="server-config"/>
+ <!-- uncomment the following lines if starting jvm in debug mode,
+ but do not check in to cvs with debug enabled, and forking set to true-->
+ <!--<sysproperty key="java.compiler" value="NONE"/>-->
+ <!--<jvmarg value="-Xdebug"/>-->
+ <!--<jvmarg value="-Xnoagent"/>-->
+ <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
</java>
</target>
<target name="run-remote-instance-test-1" description="runs the remote standalone instance test to create, start, stop and delete one remote standalone instance">
- <java classname="com.sun.enterprise.admin.mbeanapi.config.RemoteInstanceTest"
- fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
- <classpath refid="run.classpath"/>
- <sysproperty key="HOST" value="localhost"/>
- <sysproperty key="AMX_PORT" value="8686"/>
- <sysproperty key="ADMIN_PORT" value="4849"/>
- <sysproperty key="ADMIN_USER" value="admin"/>
- <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
- <sysproperty key="NODE_AGENT" value="easqelx14"/> <!-- change this to your node agent name-->
- <sysproperty key="NEW_NODE_AGENT" value="true"/>
- <sysproperty key="NUM_INSTANCES" value="1"/>
- <sysproperty key="USE_TLS" value="true"/>
- <!--<sysproperty key="CONFIG_NAME" value="a_config"/>-->
- <sysproperty key="PROPERTIES" value="HTTP_LISTENER_PORT=${http-list-1}:HTTP_SSL_LISTENER_PORT=${http-list-2}:IIOP_LISTENER_PORT=${orb-list-1}:IIOP_SSL_LISTENER_PORT=${SSL}:IIOP_SSL_MUTUALAUTH_PORT=${SSL_MUTUALAUTH}:JMX_SYSTEM_CONNECTOR_PORT=${JMX_SYSTEM_CONNECTOR}"/>
- <!-- uncomment the following lines if starting jvm in debug mode,
- but do not check in to cvs with debug enabled, and forking set to true-->
- <!--<sysproperty key="java.compiler" value="NONE"/>-->
- <!--<jvmarg value="-Xdebug"/>-->
- <!--<jvmarg value="-Xnoagent"/>-->
- <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
+ <java classname="com.sun.enterprise.admin.mbeanapi.config.RemoteInstanceTest"
+ fork="false"> <!-- turn forking to true if starting jvm in debug mode and see comments below-->
+ <classpath refid="run.classpath"/>
+ <sysproperty key="HOST" value="localhost"/>
+ <sysproperty key="AMX_PORT" value="8686"/>
+ <sysproperty key="ADMIN_PORT" value="4849"/>
+ <sysproperty key="ADMIN_USER" value="admin"/>
+ <sysproperty key="ADMIN_PASSWORD" value="adminadmin"/>
+ <sysproperty key="NODE_AGENT" value="easqelx14"/> <!-- change this to your node agent name-->
+ <sysproperty key="NEW_NODE_AGENT" value="true"/>
+ <sysproperty key="NUM_INSTANCES" value="1"/>
+ <sysproperty key="USE_TLS" value="true"/>
+ <!--<sysproperty key="CONFIG_NAME" value="a_config"/>-->
+ <sysproperty key="PROPERTIES" value="HTTP_LISTENER_PORT=${http-list-1}:HTTP_SSL_LISTENER_PORT=${http-list-2}:IIOP_LISTENER_PORT=${orb-list-1}:IIOP_SSL_LISTENER_PORT=${SSL}:IIOP_SSL_MUTUALAUTH_PORT=${SSL_MUTUALAUTH}:JMX_SYSTEM_CONNECTOR_PORT=${JMX_SYSTEM_CONNECTOR}"/>
+ <!-- uncomment the following lines if starting jvm in debug mode,
+ but do not check in to cvs with debug enabled, and forking set to true-->
+ <!--<sysproperty key="java.compiler" value="NONE"/>-->
+ <!--<jvmarg value="-Xdebug"/>-->
+ <!--<jvmarg value="-Xnoagent"/>-->
+ <!--<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=15000"/>-->
</java>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/AMXConfigVerifier.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/AMXConfigVerifier.java
index b5e0770..49cff3c 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/AMXConfigVerifier.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/AMXConfigVerifier.java
@@ -39,19 +39,19 @@
* @version $Revision: 1.3 $
*/
public class AMXConfigVerifier {
- private final DomainRoot mDomainRoot;
- private final MBeanServerConnection mMBeanServerConnection;
+ private final DomainRoot mDomainRoot;
+ private final MBeanServerConnection mMBeanServerConnection;
public AMXConfigVerifier(final String host, final int port, final String adminUser, final String adminPassword, final boolean useTLS) throws Exception
{
- final AMXConnector ct = new AMXConnector( host, port, adminUser, adminPassword, useTLS );
- mDomainRoot = ct.getDomainRoot();
+ final AMXConnector ct = new AMXConnector( host, port, adminUser, adminPassword, useTLS );
+ mDomainRoot = ct.getDomainRoot();
mMBeanServerConnection = ct.getAppserverConnectionSource().getMBeanServerConnection(false);
testDomainElements();
testHttpServiceElements();
}
-
+
public static void main( final String[] args )
@@ -89,7 +89,7 @@
}
return tester;
}
-
+
private void runGenericTest(String str) throws Exception
{
runGenericTest(null, str);
@@ -136,13 +136,13 @@
// admin-object-resource test
runGenericTest( "<admin-object-resource jndi-name=testAdminObjectName res-type=testResType res-adapter=testResourceAdapterName>");
}
-
+
private void testHttpServiceElements() throws Exception
{
TestElemRegistry.initRegistry("server-config");
-
+
runGenericTest( "<virtual-server id=testVirtualServer hosts=localhost>");
-
+
ElemTester virtServer = getElementTester( "<virtual-server id=testVirtualServer2 hosts=localhost>");
virtServer.createElement();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ConfigTestHelper.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ConfigTestHelper.java
index 9109a29..52f7448 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ConfigTestHelper.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ConfigTestHelper.java
@@ -32,7 +32,7 @@
{
return SmartStringifier.toString(o);
}
-
+
static public void printObj(String title, Object o)
{
if(title==null)
@@ -42,27 +42,27 @@
static public Object invokeInMgr(Object mgr, String operation) throws Exception
{
- return invokeInMgr(mgr, operation, null, null);
+ return invokeInMgr(mgr, operation, null, null);
}
-
+
static public Object invokeInMgr(Object mgr, String operation, Object[] params) throws Exception
{
if(params==null || params.length==0)
- return invokeInMgr(mgr, operation, null, null);
+ return invokeInMgr(mgr, operation, null, null);
Class[] classes = new Class[params.length];
for(int i=0; i<params.length; i++)
if(params[i]!=null)
classes[i] = params[i].getClass();
- else
+ else
classes[i] = null;
- return invokeInMgr(mgr, operation, params, classes);
+ return invokeInMgr(mgr, operation, params, classes);
}
-
+
static public Object invokeInMgr(Object mgr, String operation, Object[] params, Class[] classes) throws Exception
{
- return invokeInMgr(mgr, operation, params, classes, true);
+ return invokeInMgr(mgr, operation, params, classes, true);
}
-
+
static public Object invokeInMgr(Object mgr, String operation, Object[] params, Class[] classes, boolean bHideException) throws Exception
{
try
@@ -70,7 +70,7 @@
_lastException = null;
_lastOperation = operation;
_lastParams = params;
-
+
Object res = null;
Method method =null;
Class cl = mgr.getClass();
@@ -101,17 +101,17 @@
String msg = null;
if(_lastException!=null)
msg = ExceptionUtil.getRootCause(_lastException).getMessage();
- int idx = msg!=null?msg.indexOf('\n'):-1;
+ int idx = msg!=null?msg.indexOf('\n'):-1;
if(idx>=0)
{
int idx2 = msg.indexOf('\n', idx+1);
- if(idx2>=0)
+ if(idx2>=0)
idx = idx2;
msg = msg.substring(0, idx);
}
return "Exception: " + msg + " Operation: "+_lastOperation + "("+ SmartStringifier.toString(_lastParams) +")";
}
-
+
static void replaceStr(StringBuffer buf, String strOld, String strNew)
{
int idx = 0;
@@ -123,7 +123,7 @@
idx+=lenNew;
}
}
-
+
static public String camelize(String str)
{
if(str.length()==0)
@@ -148,13 +148,13 @@
//String res = buf.toString();
return buf.toString();
}
-
+
static public Object getBeanAttribute(Object bean, String attributeName) throws Exception
{
return invokeInMgr(bean, "get"+camelize(attributeName), null, null, true);
}
-
+
public static Throwable _lastException;
public static Object _lastResult;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ElemTester.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ElemTester.java
index f4d644d..647e0c6 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ElemTester.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/ElemTester.java
@@ -34,7 +34,7 @@
/**
- * generic named config element tester
+ * generic named config element tester
* @author alexkrav
* Date: Aug 23, 2004
* @version $Revision: 1.11 $
@@ -53,7 +53,7 @@
mElement = element;
mMasterConfig = mElement.getMasterAMXConfigForElement(domainRoot);
String msg = "\n\n------- tester created for "+mElement.getElementName();
- printObj(msg, mElement.getAttributesMapCopy());
+ printObj(msg, mElement.getAttributesMapCopy());
}
public ElemTester(final MBeanServerConnection connection, final DomainRoot domainRoot, final TestElement element,
@@ -70,18 +70,18 @@
{
System.out.println(str);
}
-
+
void printObj(String str, Object obj)
{
ConfigTestHelper.printObj(str, obj);
}
-
+
public Object createElement() throws Exception
{
Object ret = null;
-
- final boolean isNamedElement = false;
-
+
+ final boolean isNamedElement = false;
+
if( isNamedElement ){
ret = ConfigTestHelper.invokeInMgr(mMasterConfig, "create",
mElement.getCreationParams(),
@@ -101,9 +101,9 @@
public void deleteElement() throws Exception
{
String key = mElement.getElementKey();
-
- final boolean isNamedElement = key != null;
-
+
+ final boolean isNamedElement = key != null;
+
if( isNamedElement ){
ConfigTestHelper.invokeInMgr(mMasterConfig, "remove",
new Object[] {key});
@@ -117,15 +117,15 @@
}
}
-
- public ObjectName getElemMBeanObjectName() throws Exception
+
+ public ObjectName getElemMBeanObjectName() throws Exception
{
return mElement.getElemMBeanObjectName();
}
-
- public Map list()
+
+ public Map list()
{
try{
println(REPORT_PREFIX +"list()");
@@ -137,17 +137,17 @@
return null;
}
}
-
+
public void cleanExceptionIfMatched(String parseStr)
{
if(ConfigTestHelper._lastException!=null &&
- (parseStr==null ||
+ (parseStr==null ||
((String)(""+ConfigTestHelper.getLastExceptionShortMsg())).indexOf(parseStr)>=0))
{
ConfigTestHelper._lastException = null;
}
}
-
+
public boolean checkNoException(String description)
{
if(ConfigTestHelper._lastException!=null)
@@ -157,8 +157,8 @@
}
return true;
}
-
-
+
+
public boolean checkList(String description) throws Exception
{
Map map = list();
@@ -197,7 +197,7 @@
}
return bOk;
}
-
+
private ArrayList getAttributesNamesFromMBeanInfo() throws Exception
{
ArrayList list = new ArrayList();
@@ -209,13 +209,13 @@
}
return list;
}
-
+
public boolean checkAttributes(String description, Object amxBean) throws Exception
{
// if(!checkNoException(description))
// return false;
ArrayList attrNames = getAttributesNamesFromMBeanInfo();
- AttributeList attrsInConfig = mConnection.getAttributes(getElemMBeanObjectName(), new String[]{""});
+ AttributeList attrsInConfig = mConnection.getAttributes(getElemMBeanObjectName(), new String[]{""});
HashMap elemAttrsFromConfig = new HashMap();
for(int i=0; i<attrsInConfig.size(); i++)
{
@@ -227,7 +227,7 @@
boolean bOk = true;
for(int i=0; i<attrNames.size(); i++)
{
- String attrName = (String)attrNames.get(i);
+ String attrName = (String)attrNames.get(i);
Object valueInConfig = elemAttrsFromConfig.get(attrName);
Object valueInElem = elemAttrsFromAMXAttrMap.get(attrName);
if( (valueInConfig==null && valueInElem!=null) ||
@@ -271,8 +271,8 @@
}
return bOk;
}
-
- public boolean checkExist(String description)
+
+ public boolean checkExist(String description)
{
if(!checkNoException(description))
return false;
@@ -307,7 +307,7 @@
try{
println("--- generic test");
deleteElement();
-//TEMPORARY
+//TEMPORARY
//if(ConfigTestHelper._lastException!=null)
// ConfigTestHelper._lastException.printStackTrace();
//checkNoException("testting phase");
@@ -320,7 +320,7 @@
checkAttributes("attributes-check", created);
println("WHAT TO DO WITH NON-EXISTENT \"mElemMgr instanceof AMXConfigMgr\"????");
- /*
+ /*
if(mElemMgr instanceof AMXConfigMgr)
checkList("list operation");
*/
@@ -329,7 +329,7 @@
//if(ConfigTestHelper._lastException!=null)
// ConfigTestHelper._lastException.printStackTrace();
checkNotExist("after final-deletion");
-
+
} catch (Exception e)
{
//e.printStackTrace();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestElemRegistry.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestElemRegistry.java
index 9e7ade0..62a1030 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestElemRegistry.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestElemRegistry.java
@@ -36,12 +36,12 @@
}
private static void addRegEntry(HashMap map, String masterNode, String entryName, String[] req)
{
- map.put(entryName,
+ map.put(entryName,
new RegEntry(entryName, entryName, req, masterNode));
}
private static void addRegEntry(HashMap map, String masterNode, String entryName, String dtd_name, String[] req)
{
- map.put(entryName,
+ map.put(entryName,
new RegEntry(entryName, dtd_name, req, masterNode));
}
/*
@@ -60,19 +60,19 @@
RegEntry entry = getRegEntry(name);
return entry.dtdName;
}
-
+
public static int getLevel(String name)
{
RegEntry entry = getRegEntry(name);
return entry.getLevel();
}
*/
-
+
//////////////////////////////////////////////////////////////////////////////////////
public static boolean initRegistry(String configName)
{
mConfigName = configName;
-
+
HashMap reg = new HashMap();
addRegEntry(reg, "domain", "jdbc-connection-pool", new String[]{"name", "datasource-classname"});
addRegEntry(reg, "domain", "custom-resource", new String[]{"jndi-name", "res-type", "factory-class"});
@@ -84,7 +84,7 @@
addRegEntry(reg, "domain", "connector-resource", new String[]{"jndi-name", "pool-name"});
addRegEntry(reg, "domain", "resource-adapter", "resource-adapter-config", new String[]{"resource-adapter-name"});
addRegEntry(reg, "domain", "admin-object-resource", new String[]{"jndi-name", "res-type", "res-adapter"});
-
+
addRegEntry(reg, "http-service", "virtual-server", new String[]{"id", "hosts"});
addRegEntry(reg, "http-service", "http-listener", new String[]{"id", "address", "port*int", "default-virtual-server", "server-name"});
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestElement.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestElement.java
index d3ee48f..dcd8d33 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestElement.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/config/com/sun/enterprise/admin/mbeanapi/config/TestElement.java
@@ -37,7 +37,7 @@
private String name;
private HashMap attributes;
RegEntry entry;
-
+
TestElement(String line)
{
int current = 0, next = 0;
@@ -84,7 +84,7 @@
attrValue = line.substring(0, next);
}
attributes.put(attrName, attrValue);
-
+
entry = TestElemRegistry.getRegEntry(name);
//System.out.println("attributes.put(\""+attrName+"\", \"" + attrValue+ "\")");
//System.out.println("attributes.put(\""+camelize(attrName)+"\"(camelized), \"" + attrValue+ "\")");
@@ -98,12 +98,12 @@
{
return attributes.get(attrName);
}
-
+
public Map getAttributesMapCopy()
{
return new HashMap(attributes);
}
-
+
public String getDtdName()
{
return entry.dtdName;
@@ -139,13 +139,13 @@
params[i] = new Integer((String)(params[i]));
} catch (Exception e) {}
}
- optional.remove(req[i]);
+ optional.remove(req[i]);
}
-
+
params[params.length-1] = optional;
return params;
}
-
+
public Class[] getCreationClasses() throws Exception
{
Class[] classes = entry.getReqAttrClasses();
@@ -155,33 +155,33 @@
cls[cls.length-1] = Class.forName("java.util.Map");
return cls;
}
-
+
public boolean isConfigSubordinatedElem()
{
return !("domain".equals(entry.getMasterNodeName()));
}
-
+
//can be overriden
public ObjectName getElemMBeanObjectName() throws Exception
- {
+ {
if(isConfigSubordinatedElem())
return new ObjectName("com.sun.appserv:category=config,config="+TestElemRegistry.mConfigName+
",type="+getDtdName()+ ","+getElementKeyName()+"="+getElementKey());
else
return new ObjectName("com.sun.appserv:category=config,type="+getDtdName()+
","+getElementKeyName()+"="+getElementKey());
- }
+ }
//can be overriden
public ObjectName getElemMBeanObjectNamePattern() throws Exception
- {
+ {
if(isConfigSubordinatedElem())
return new ObjectName("com.sun.appserv:category=config,config="+TestElemRegistry.mConfigName+
",type="+getDtdName()+",*");
else
return new ObjectName("com.sun.appserv:category=config,type="+getDtdName()+",*");
-
- }
-
+
+ }
+
public AMXConfig getMasterAMXConfigForElement(DomainRoot domainRoot) throws Exception
{
String masterNodeName = entry.getMasterNodeName();
@@ -192,6 +192,6 @@
if("iiop-service".equals(masterNodeName))
return ((ConfigConfig)domainRoot.getDomainConfig().getConfigConfigMap().get("server-config")).getIIOPServiceConfig();
throw new Exception("Testing for Master Node "+masterNodeName+" is not implemented yet");
-
+
}
-}
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/DeploymentTests.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/DeploymentTests.properties
index a5994d6..c379308 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/DeploymentTests.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/DeploymentTests.properties
@@ -42,7 +42,7 @@
sampledir=samples
#####################################
-### optional -- report - the path of the report file that gets generated.
+### optional -- report - the path of the report file that gets generated.
### The default is "DeploymentTests.out"
#####################################
report=DeploymentTests.out
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build.properties
index 6454a01..4c1b0b3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build.properties
@@ -14,7 +14,7 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-
+
src.dir=.
mbeanapi.jar=${publish.home}/admin-core/mbeanapi/lib/mbeanapi.jar
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build.xml
index 0d1f813..e702736 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build.xml
@@ -69,9 +69,9 @@
<!-- copysamples-->
<target name="copyuisamples" depends="compile">
- <copy todir="${samples.dest}">
- <fileset dir="${samples.src}"/>
- </copy>
+ <copy todir="${samples.dest}">
+ <fileset dir="${samples.src}"/>
+ </copy>
</target>
<!-- clean -->
@@ -88,23 +88,23 @@
<!-- runtests -->
<target name="runtests" depends="compile,copyautosamples">
- <java classname="com.sun.enterprise.admin.mbeanapi.deployment.DeploymentTestsAuto" fork="true">
- <jvmarg value="-ea"/>
- <arg value="ant"/>
+ <java classname="com.sun.enterprise.admin.mbeanapi.deployment.DeploymentTestsAuto" fork="true">
+ <jvmarg value="-ea"/>
+ <arg value="ant"/>
<classpath refid="run.classpath"/>
- </java>
+ </java>
</target>
-
+
<!-- runtestsdebug -->
<target name="runtestsdebug" depends="compile,copyautosamples">
- <echo message="Running tests with debugging on Port 3333. Suspended -- go attach now."/>
- <java classname="com.sun.enterprise.admin.mbeanapi.deployment.DeploymentTestsAuto" fork="true">
- <jvmarg value="-ea"/>
- <jvmarg value="-Xdebug"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=3333"/>
- <arg value="ant"/>
+ <echo message="Running tests with debugging on Port 3333. Suspended -- go attach now."/>
+ <java classname="com.sun.enterprise.admin.mbeanapi.deployment.DeploymentTestsAuto" fork="true">
+ <jvmarg value="-ea"/>
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=3333"/>
+ <arg value="ant"/>
<classpath refid="run.classpath"/>
- </java>
+ </java>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/AdminObjectResourceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/AdminObjectResourceTest.java
index e2a8f69..ec7a06b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/AdminObjectResourceTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/AdminObjectResourceTest.java
@@ -32,8 +32,8 @@
static final String kResAdapter = "abcAdapter";
static final String kObjectType = "user";
- public AdminObjectResourceTest(final String user,
- final String password, final String host, final int port,
+ public AdminObjectResourceTest(final String user,
+ final String password, final String host, final int port,
final String jndiName, final String resType, final String resAdapter)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -41,11 +41,11 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateAdminObjectResourceCmd createCmd =
- cmdFactory.createCreateAdminObjectResourceCmd(jndiName,
+ final CreateAdminObjectResourceCmd createCmd =
+ cmdFactory.createCreateAdminObjectResourceCmd(jndiName,
resType, resAdapter, getOptional());
- final DeleteAdminObjectResourceCmd deleteCmd =
+ final DeleteAdminObjectResourceCmd deleteCmd =
cmdFactory.createDeleteAdminObjectResourceCmd(jndiName);
final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
@@ -67,14 +67,14 @@
public static void main(String[] args) throws Exception
{
- new AdminObjectResourceTest("admin", "password", "localhost", 8686,
- kJNDIName, kResType, kResAdapter).run();
+ new AdminObjectResourceTest("admin", "password", "localhost", 8686,
+ kJNDIName, kResType, kResAdapter).run();
}
private Map getOptional()
{
final Map optional = new HashMap();
- //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
//kObjectType);
return optional;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseCmd.java
index 510200c..5c5659f 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseCmd.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/BaseCmd.java
@@ -80,12 +80,12 @@
protected final DomainConfig getDomainConfig() throws Exception
{
- return getDomainRoot().getDomainConfig();
+ return getDomainRoot().getDomainConfig();
}
protected final J2EEDomain getJ2EEDomain() throws Exception
{
- return getDomainRoot().getJ2EEDomain();
+ return getDomainRoot().getJ2EEDomain();
}
protected final TLSParams getTLSParams()
@@ -95,6 +95,6 @@
protected final QueryMgr getQueryMgr() throws Exception
{
- return getDomainRoot().getQueryMgr();
+ return getDomainRoot().getQueryMgr();
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ClusterLifecycleTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ClusterLifecycleTest.java
index 6012f07..546dd1b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ClusterLifecycleTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ClusterLifecycleTest.java
@@ -25,8 +25,8 @@
private final Cmd target;
public ClusterLifecycleTest(final String user, final String password,
- final String host, final int port, final String clusterName,
- final String instanceName, final String nodeAgentName,
+ final String host, final int port, final String clusterName,
+ final String instanceName, final String nodeAgentName,
final String configName, final Map optional)
{
final CmdChainCmd chain = new CmdChainCmd();
@@ -36,21 +36,21 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateClusterCmd createClusterCmd =
+ final CreateClusterCmd createClusterCmd =
cmdFactory.createCreateClusterCmd(
clusterName, configName, optional);
- final CreateClusteredInstanceCmd createClusteredInstanceCmd =
- cmdFactory.createCreateClusteredInstanceCmd(instanceName,
+ final CreateClusteredInstanceCmd createClusteredInstanceCmd =
+ cmdFactory.createCreateClusteredInstanceCmd(instanceName,
clusterName, nodeAgentName, optional);
- final StartClusterCmd startClusterCmd =
+ final StartClusterCmd startClusterCmd =
cmdFactory.createStartClusterCmd(clusterName);
- final StopClusterCmd stopClusterCmd =
+ final StopClusterCmd stopClusterCmd =
cmdFactory.createStopClusterCmd(clusterName);
- final DeleteClusteredInstanceCmd deleteClusteredInstanceCmd =
+ final DeleteClusteredInstanceCmd deleteClusteredInstanceCmd =
cmdFactory.createDeleteClusteredInstanceCmd(instanceName);
final DeleteClusterCmd deleteClusterCmd = cmdFactory.
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdFactory.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdFactory.java
index 3d7e4e1..8b754e3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdFactory.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CmdFactory.java
@@ -32,9 +32,9 @@
public ConnectCmd createConnectCmd(Phup phup)
{
- return createConnectCmd(phup.user, phup.password, phup.host, phup.port);
- }
- public ConnectCmd createConnectCmd(String user, String password,
+ return createConnectCmd(phup.user, phup.password, phup.host, phup.port);
+ }
+ public ConnectCmd createConnectCmd(String user, String password,
String host, int port)
{
final CmdEnv cmdEnv = new CmdEnv();
@@ -48,7 +48,7 @@
}
public CreateInstanceCmd createCreateInstanceCmd(
- String instanceName, String nodeAgentName,
+ String instanceName, String nodeAgentName,
String configName, Map optional)
{
final CmdEnv cmdEnv = new CmdEnv();
@@ -91,17 +91,17 @@
return new StopInstanceCmd(cmdEnv);
}
- public DeployCmd createDeployCmd(String archive, String name,
+ public DeployCmd createDeployCmd(String archive, String name,
String contextRoot, boolean enable, String appservTarget)
{
return createDeployCmd(archive, name, null, contextRoot, enable,
true, true, false, true, false, appservTarget);
}
- public DeployCmd createDeployCmd(String archive, String name,
+ public DeployCmd createDeployCmd(String archive, String name,
String description, String contextRoot, boolean enable,
- boolean forceDeploy, boolean generateRMIStubs,
- boolean availabilityEnabled, boolean cascade, boolean verify,
+ boolean forceDeploy, boolean generateRMIStubs,
+ boolean availabilityEnabled, boolean cascade, boolean verify,
String target)
{
final CmdEnv cmdEnv = new CmdEnv();
@@ -112,34 +112,34 @@
final Map deployOptions = new HashMap(10);
deployOptions.put(DeploymentMgr.DEPLOY_OPTION_NAME_KEY, name);
- deployOptions.put(DeploymentMgr.DEPLOY_OPTION_DESCRIPTION_KEY,
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_DESCRIPTION_KEY,
description);
- deployOptions.put(DeploymentMgr.DEPLOY_OPTION_CONTEXT_ROOT_KEY,
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_CONTEXT_ROOT_KEY,
contextRoot);
- deployOptions.put(DeploymentMgr.DEPLOY_OPTION_ENABLE_KEY,
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_ENABLE_KEY,
new Boolean(enable).toString());
- deployOptions.put(DeploymentMgr.DEPLOY_OPTION_GENERATE_RMI_STUBS_KEY,
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_GENERATE_RMI_STUBS_KEY,
new Boolean(generateRMIStubs).toString());
- deployOptions.put(DeploymentMgr.DEPLOY_OPTION_FORCE_KEY,
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_FORCE_KEY,
new Boolean(forceDeploy).toString());
- deployOptions.put(DeploymentMgr.DEPLOY_OPTION_AVAILABILITY_ENABLED_KEY,
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_AVAILABILITY_ENABLED_KEY,
new Boolean(availabilityEnabled).toString());
- deployOptions.put(DeploymentMgr.DEPLOY_OPTION_CASCADE_KEY,
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_CASCADE_KEY,
new Boolean(cascade).toString());
- deployOptions.put(DeploymentMgr.DEPLOY_OPTION_VERIFY_KEY,
+ deployOptions.put(DeploymentMgr.DEPLOY_OPTION_VERIFY_KEY,
new Boolean(verify).toString());
-
- try
- {
- // FIXME TBD Add to MBAPI...
- if(new File(archive).isDirectory())
- //deployOptions.put(DeploymentMgr.DEPLOY_OPTION_DIRECTORY_DEPLOYED_KEY, Boolean.TRUE.toString());
- deployOptions.put("directorydeployed", Boolean.TRUE.toString());
- }
- catch(Exception e)
- {
- //
- }
+
+ try
+ {
+ // FIXME TBD Add to MBAPI...
+ if(new File(archive).isDirectory())
+ //deployOptions.put(DeploymentMgr.DEPLOY_OPTION_DIRECTORY_DEPLOYED_KEY, Boolean.TRUE.toString());
+ deployOptions.put("directorydeployed", Boolean.TRUE.toString());
+ }
+ catch(Exception e)
+ {
+ //
+ }
cmdEnv.put(DeployCmd.kDeployOptions, deployOptions);
return new DeployCmd(cmdEnv);
@@ -324,24 +324,24 @@
return new DeleteConnectorResourceCmd(cmdEnv);
}
- public CreateConnectorConnectionPoolCmd
+ public CreateConnectorConnectionPoolCmd
createCreateConnectorConnectionPoolCmd(
- String name, String resourceAdapterName,
+ String name, String resourceAdapterName,
String connectionDefinitionName, Map optional)
{
final CmdEnv cmdEnv = new CmdEnv();
cmdEnv.put(CreateConnectorConnectionPoolCmd.kName, name);
- cmdEnv.put(CreateConnectorConnectionPoolCmd.kResourceAdapterName,
+ cmdEnv.put(CreateConnectorConnectionPoolCmd.kResourceAdapterName,
resourceAdapterName);
- cmdEnv.put(CreateConnectorConnectionPoolCmd.kConnectionDefinitionName,
+ cmdEnv.put(CreateConnectorConnectionPoolCmd.kConnectionDefinitionName,
connectionDefinitionName);
cmdEnv.put(CreateConnectorConnectionPoolCmd.kOptional, optional);
return new CreateConnectorConnectionPoolCmd(cmdEnv);
}
- public DeleteConnectorConnectionPoolCmd
+ public DeleteConnectorConnectionPoolCmd
createDeleteConnectorConnectionPoolCmd(String name)
{
final CmdEnv cmdEnv = new CmdEnv();
@@ -351,21 +351,21 @@
return new DeleteConnectorConnectionPoolCmd(cmdEnv);
}
- public CreateJDBCConnectionPoolCmd
+ public CreateJDBCConnectionPoolCmd
createCreateJDBCConnectionPoolCmd(
String name, String datasourceClassname, Map optional)
{
final CmdEnv cmdEnv = new CmdEnv();
cmdEnv.put(CreateJDBCConnectionPoolCmd.kName, name);
- cmdEnv.put(CreateJDBCConnectionPoolCmd.kDatasourceClassname,
+ cmdEnv.put(CreateJDBCConnectionPoolCmd.kDatasourceClassname,
datasourceClassname);
cmdEnv.put(CreateJDBCConnectionPoolCmd.kOptional, optional);
return new CreateJDBCConnectionPoolCmd(cmdEnv);
}
- public DeleteJDBCConnectionPoolCmd
+ public DeleteJDBCConnectionPoolCmd
createDeleteJDBCConnectionPoolCmd(String name)
{
final CmdEnv cmdEnv = new CmdEnv();
@@ -375,12 +375,12 @@
return new DeleteJDBCConnectionPoolCmd(cmdEnv);
}
- public UndeployCmd createUndeployCmd(String name, String target)
+ public UndeployCmd createUndeployCmd(String name, String target)
{
final CmdEnv cmdEnv = new CmdEnv();
final Map undeployOptions = new HashMap(1);
- cmdEnv.put(DeployCmd.kTarget, target);
+ cmdEnv.put(DeployCmd.kTarget, target);
undeployOptions.put(DeploymentMgr.DEPLOY_OPTION_NAME_KEY, name);
cmdEnv.put(DeployCmd.kDeployOptions, undeployOptions);
@@ -438,7 +438,7 @@
}
public CreateClusteredInstanceCmd createCreateClusteredInstanceCmd(
- String instanceName, String clusterName, String nodeAgentName,
+ String instanceName, String clusterName, String nodeAgentName,
Map optional)
{
final CmdEnv cmdEnv = new CmdEnv();
@@ -461,7 +461,7 @@
return new DeleteClusteredInstanceCmd(cmdEnv);
}
- public VirtualServerCmd createVirtualServerCmd(String name,
+ public VirtualServerCmd createVirtualServerCmd(String name,
String configName, String hosts, Map optional, String mode)
{
final CmdEnv cmdEnv = new CmdEnv();
@@ -484,7 +484,7 @@
cmdEnv.put(CreateAppRefCmd.kVirtualServers, virtualServers);
cmdEnv.put(CreateAppRefCmd.kEnabled, new Boolean(enabled));
cmdEnv.put(CreateAppRefCmd.kLBEnabled, new Boolean(lbEnabled));
- cmdEnv.put(CreateAppRefCmd.kDisableTimeoutInMinutes,
+ cmdEnv.put(CreateAppRefCmd.kDisableTimeoutInMinutes,
new Integer(disableTimeoutInMinutes));
cmdEnv.put(CreateAppRefCmd.kTarget, target);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectCmd.java
index 736d44d..70633f2 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectCmd.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectCmd.java
@@ -47,7 +47,7 @@
final String password = (String)getCmdEnv().get(kPassword);
final AppserverConnectionSource cs = new AppserverConnectionSource(
- AppserverConnectionSource.PROTOCOL_RMI, host, port.intValue(),
+ AppserverConnectionSource.PROTOCOL_RMI, host, port.intValue(),
user, password, getTLSParams(), null);
getCmdEnv().put(kConnectionSource, cs);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectorConnectionPoolTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectorConnectionPoolTest.java
index d03f131..0450419 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectorConnectionPoolTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectorConnectionPoolTest.java
@@ -34,9 +34,9 @@
static final String kTransactionSupport = "LocalTransaction";
static final String kConnectionDefinitionName = "javax.sql.DataSource";
- public ConnectorConnectionPoolTest(final String user,
- final String password, final String host, final int port,
- final String name, final String resourceAdapterName,
+ public ConnectorConnectionPoolTest(final String user,
+ final String password, final String host, final int port,
+ final String name, final String resourceAdapterName,
final String connectionDefinitionName)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -44,12 +44,12 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateConnectorConnectionPoolCmd createCmd =
+ final CreateConnectorConnectionPoolCmd createCmd =
cmdFactory.createCreateConnectorConnectionPoolCmd(name,
- resourceAdapterName, connectionDefinitionName,
+ resourceAdapterName, connectionDefinitionName,
getOptional());
- final DeleteConnectorConnectionPoolCmd deleteCmd =
+ final DeleteConnectorConnectionPoolCmd deleteCmd =
cmdFactory.createDeleteConnectorConnectionPoolCmd(name);
final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
@@ -72,7 +72,7 @@
public static void main(String[] args) throws Exception
{
new ConnectorConnectionPoolTest(
- "admin", "password", "localhost", 8686,
+ "admin", "password", "localhost", 8686,
kName, kResourceAdapterName, kConnectionDefinitionName).
run();
}
@@ -80,7 +80,7 @@
private Map getOptional()
{
final Map optional = new HashMap();
- optional.put(ConnectorConnectionPoolConfigKeys.TRANSACTION_SUPPORT_KEY,
+ optional.put(ConnectorConnectionPoolConfigKeys.TRANSACTION_SUPPORT_KEY,
kTransactionSupport);
return optional;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectorResourceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectorResourceTest.java
index e37e1e3..b234809 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectorResourceTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ConnectorResourceTest.java
@@ -31,8 +31,8 @@
static final String kPoolName = "mypool";
static final String kObjectType = "user";
- public ConnectorResourceTest(final String user,
- final String password, final String host, final int port,
+ public ConnectorResourceTest(final String user,
+ final String password, final String host, final int port,
final String jndiName, final String poolName)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -40,11 +40,11 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateConnectorResourceCmd createCmd =
- cmdFactory.createCreateConnectorResourceCmd(jndiName,
+ final CreateConnectorResourceCmd createCmd =
+ cmdFactory.createCreateConnectorResourceCmd(jndiName,
poolName, getOptional());
- final DeleteConnectorResourceCmd deleteCmd =
+ final DeleteConnectorResourceCmd deleteCmd =
cmdFactory.createDeleteConnectorResourceCmd(jndiName);
final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
@@ -66,14 +66,14 @@
public static void main(String[] args) throws Exception
{
- new ConnectorResourceTest("admin", "password", "localhost", 8686,
- kJNDIName, kPoolName).run();
+ new ConnectorResourceTest("admin", "password", "localhost", 8686,
+ kJNDIName, kPoolName).run();
}
private Map getOptional()
{
final Map optional = new HashMap();
- //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
//kObjectType);
return optional;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Console.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Console.java
index 7ef733d..897f227 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Console.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Console.java
@@ -17,7 +17,7 @@
package com.sun.enterprise.admin.mbeanapi.deployment;
/**
- An easy interface to read numbers and strings from
+ An easy interface to read numbers and strings from
standard input
@version 1.10 10 Mar 1997
@@ -25,128 +25,128 @@
*/
public class Console
-{
- /** print a prompt on the console but don't print a newline
+{
+ /** print a prompt on the console but don't print a newline
@param prompt the prompt string to display
*/
- public static void printPrompt(String prompt)
- {
- System.out.print(prompt + " ");
- System.out.flush();
- }
+ public static void printPrompt(String prompt)
+ {
+ System.out.print(prompt + " ");
+ System.out.flush();
+ }
- /** read a string from the console. The string is
- terminated by a newline
- @return the input string (without the newline)
- */
+ /** read a string from the console. The string is
+ terminated by a newline
+ @return the input string (without the newline)
+ */
- public static String readLine()
- {
- int ch;
- String r = "";
- boolean done = false;
-
- while (!done)
- {
- try
- {
- ch = System.in.read();
- if (ch < 0 || (char)ch == '\n')
- done = true;
-
- else if ((char)ch != '\r') // weird--it used to do \r\n translation
- r = r + (char) ch;
- }
- catch(java.io.IOException e)
- {
- done = true;
- }
- }
-
- return r;
- }
+ public static String readLine()
+ {
+ int ch;
+ String r = "";
+ boolean done = false;
- /** read a string from the console. The string is
- terminated by a newline
- @param prompt the prompt string to display
- @return the input string (without the newline)
- */
+ while (!done)
+ {
+ try
+ {
+ ch = System.in.read();
+ if (ch < 0 || (char)ch == '\n')
+ done = true;
- public static char getKey(String prompt)
- {
- printPrompt(prompt);
- int ch = '\n';
-
- try
- {
- ch = System.in.read();
- }
- catch(java.io.IOException e)
- {
- }
- return (char)ch;
-
- }
-
- /** read a string from the console. The string is
- terminated by a newline
- @param prompt the prompt string to display
- @return the input string (without the newline)
- */
+ else if ((char)ch != '\r') // weird--it used to do \r\n translation
+ r = r + (char) ch;
+ }
+ catch(java.io.IOException e)
+ {
+ done = true;
+ }
+ }
- public static String readLine(String prompt)
- {
- printPrompt(prompt);
- return readLine();
- }
+ return r;
+ }
- /** read an integer from the console. The input is
- terminated by a newline
- @param prompt the prompt string to display
- @return the input value as an int
- @exception NumberFormatException if bad input
- */
+ /** read a string from the console. The string is
+ terminated by a newline
+ @param prompt the prompt string to display
+ @return the input string (without the newline)
+ */
- public static int readInt(String prompt)
- {
- while(true)
- {
- printPrompt(prompt);
-
- try
- {
- return Integer.valueOf
- (readLine().trim()).intValue();
- }
- catch(NumberFormatException e)
- {
- System.out.println("Not an integer. Please try again!");
- }
- }
- }
+ public static char getKey(String prompt)
+ {
+ printPrompt(prompt);
+ int ch = '\n';
- /** read a floating point number from the console.
- The input is terminated by a newline
- @param prompt the prompt string to display
- @return the input value as a double
- @exception NumberFormatException if bad input
- */
+ try
+ {
+ ch = System.in.read();
+ }
+ catch(java.io.IOException e)
+ {
+ }
+ return (char)ch;
- public static double readDouble(String prompt)
- {
- while(true)
- {
- printPrompt(prompt);
-
- try
- {
- return Double.parseDouble(readLine().trim());
- }
- catch(NumberFormatException e)
- {
- System.out.println("Not a floating point number. Please try again!");
- }
- }
- }
+ }
+
+ /** read a string from the console. The string is
+ terminated by a newline
+ @param prompt the prompt string to display
+ @return the input string (without the newline)
+ */
+
+ public static String readLine(String prompt)
+ {
+ printPrompt(prompt);
+ return readLine();
+ }
+
+ /** read an integer from the console. The input is
+ terminated by a newline
+ @param prompt the prompt string to display
+ @return the input value as an int
+ @exception NumberFormatException if bad input
+ */
+
+ public static int readInt(String prompt)
+ {
+ while(true)
+ {
+ printPrompt(prompt);
+
+ try
+ {
+ return Integer.valueOf
+ (readLine().trim()).intValue();
+ }
+ catch(NumberFormatException e)
+ {
+ System.out.println("Not an integer. Please try again!");
+ }
+ }
+ }
+
+ /** read a floating point number from the console.
+ The input is terminated by a newline
+ @param prompt the prompt string to display
+ @return the input value as a double
+ @exception NumberFormatException if bad input
+ */
+
+ public static double readDouble(String prompt)
+ {
+ while(true)
+ {
+ printPrompt(prompt);
+
+ try
+ {
+ return Double.parseDouble(readLine().trim());
+ }
+ catch(NumberFormatException e)
+ {
+ System.out.println("Not a floating point number. Please try again!");
+ }
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAppRefCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAppRefCmd.java
index 77118a4..3688497 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAppRefCmd.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAppRefCmd.java
@@ -38,8 +38,8 @@
assert isConnected();
return getDeployedItemRefConfigCR().
- createDeployedItemRefConfig(getEnabled(), getName(),
- getVirtualServers(), getLBEnabled(),
+ createDeployedItemRefConfig(getEnabled(), getName(),
+ getVirtualServers(), getLBEnabled(),
getDisableTimeoutInMinutes());
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAppRefTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAppRefTest.java
index 640c620..9fbe998 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAppRefTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateAppRefTest.java
@@ -28,9 +28,9 @@
{
private final Cmd target;
- public CreateAppRefTest(final String user,
- final String password, final String host, final int port,
- final String refName, final boolean enabled,
+ public CreateAppRefTest(final String user,
+ final String password, final String host, final int port,
+ final String refName, final boolean enabled,
final String virtualServers,final boolean lbEnabled,
final int disableTimeoutInMinutes, final String appservTarget)
{
@@ -39,9 +39,9 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateAppRefCmd createCmd =
- cmdFactory.createCreateAppRefCmd(refName, enabled,
- virtualServers, lbEnabled, disableTimeoutInMinutes,
+ final CreateAppRefCmd createCmd =
+ cmdFactory.createCreateAppRefCmd(refName, enabled,
+ virtualServers, lbEnabled, disableTimeoutInMinutes,
appservTarget);
final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
@@ -63,7 +63,7 @@
final String virtualServers = args.length == 3 ? args[2] : null;
new CreateAppRefTest(
- "admin", "password", "localhost", 8686,
+ "admin", "password", "localhost", 8686,
appRef, false, virtualServers, false, 160, target).run();
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusterTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusterTest.java
index 0ca258d..e9964d3 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusterTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusterTest.java
@@ -33,7 +33,7 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateClusterCmd createClusterCmd =
+ final CreateClusterCmd createClusterCmd =
cmdFactory.createCreateClusterCmd(
clusterName, configName, optional);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusteredInstanceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusteredInstanceCmd.java
index 4a49016..10efc9d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusteredInstanceCmd.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusteredInstanceCmd.java
@@ -31,7 +31,7 @@
{
assert isConnected();
- return (ClusteredServerConfig) getDomainConfig().createClusteredServerConfig(getInstanceName(),
+ return (ClusteredServerConfig) getDomainConfig().createClusteredServerConfig(getInstanceName(),
getClusterName(), getNodeAgentName(), getOptional());
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusteredInstanceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusteredInstanceTest.java
index a612c8b..a9965b0 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusteredInstanceTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateClusteredInstanceTest.java
@@ -26,7 +26,7 @@
public CreateClusteredInstanceTest(final String user, final String password,
final String host, final int port, final String instanceName,
- final String clusterName, final String nodeAgentName,
+ final String clusterName, final String nodeAgentName,
final Map optional)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -34,7 +34,7 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateClusteredInstanceCmd createClusteredInstanceCmd =
+ final CreateClusteredInstanceCmd createClusteredInstanceCmd =
cmdFactory.createCreateClusteredInstanceCmd(
instanceName, clusterName, nodeAgentName, optional);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateInstanceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateInstanceCmd.java
index 3c3690a..a302fc1 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateInstanceCmd.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateInstanceCmd.java
@@ -31,7 +31,7 @@
{
assert isConnected();
- return (StandaloneServerConfig) getDomainConfig().createStandaloneServerConfig(getInstanceName(),
+ return (StandaloneServerConfig) getDomainConfig().createStandaloneServerConfig(getInstanceName(),
getNodeAgentName(), getConfigName(), getOptional());
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateInstanceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateInstanceTest.java
index 410b8d5..f0a412e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateInstanceTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateInstanceTest.java
@@ -28,7 +28,7 @@
public CreateInstanceTest(final String user, final String password,
final String host, final int port, final String instanceName,
- final String nodeAgentName, final String configName,
+ final String nodeAgentName, final String configName,
final Map optional)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -37,7 +37,7 @@
user, password, host, port);
final CreateInstanceCmd createInstanceCmd = cmdFactory.
- createCreateInstanceCmd(instanceName, nodeAgentName,
+ createCreateInstanceCmd(instanceName, nodeAgentName,
configName, optional);
target = new PipeCmd(connectCmd, createInstanceCmd);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateJDBCConnectionPoolCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateJDBCConnectionPoolCmd.java
index 7a98e00..dd78818 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateJDBCConnectionPoolCmd.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateJDBCConnectionPoolCmd.java
@@ -38,8 +38,8 @@
assert isConnected();
final JDBCConnectionPoolConfig resource =
- getDomainConfig().createJDBCConnectionPoolConfig(
- getName(), getDatasourceClassname(), getOptional());
+ getDomainConfig().createJDBCConnectionPoolConfig(
+ getName(), getDatasourceClassname(), getOptional());
return resource;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreatePMFResourceCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreatePMFResourceCmd.java
index a4afa7d..6bcbaa8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreatePMFResourceCmd.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreatePMFResourceCmd.java
@@ -35,8 +35,8 @@
assert isConnected();
final PersistenceManagerFactoryResourceConfig resource =
- getDomainConfig().createPersistenceManagerFactoryResourceConfig(
- getJNDIName(), getOptional());
+ getDomainConfig().createPersistenceManagerFactoryResourceConfig(
+ getJNDIName(), getOptional());
return resource;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateVirtualServerTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateVirtualServerTest.java
index 80e8b35..ece7129 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateVirtualServerTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CreateVirtualServerTest.java
@@ -38,8 +38,8 @@
static final String kLogFile = "${com.sun.aas.instanceRoot}/logs/server.log";
static final String kHTTPListeners = "http-listener-1";
- public CreateVirtualServerTest(final String user,
- final String password, final String host, final int port,
+ public CreateVirtualServerTest(final String user,
+ final String password, final String host, final int port,
final String vsName, final String configName, final String hosts)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -47,7 +47,7 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final VirtualServerCmd createCmd =
+ final VirtualServerCmd createCmd =
cmdFactory.createVirtualServerCmd(vsName, configName,
hosts, getOptional(), VirtualServerCmd.kCreateMode);
@@ -66,7 +66,7 @@
public static void main(String[] args) throws Exception
{
new CreateVirtualServerTest(
- "admin", "password", "localhost", 8686,
+ "admin", "password", "localhost", 8686,
kName, kConfigName, kHosts).run();
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CustomResourceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CustomResourceTest.java
index e3a44b8..2c5ac45 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CustomResourceTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/CustomResourceTest.java
@@ -32,8 +32,8 @@
static final String kFactoryClass = "a.b.c";
static final String kObjectType = "user";
- public CustomResourceTest(final String user,
- final String password, final String host, final int port,
+ public CustomResourceTest(final String user,
+ final String password, final String host, final int port,
final String jndiName, final String resType, final String factoryClass)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -41,11 +41,11 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateCustomResourceCmd createCmd =
- cmdFactory.createCreateCustomResourceCmd(jndiName,
+ final CreateCustomResourceCmd createCmd =
+ cmdFactory.createCreateCustomResourceCmd(jndiName,
resType, factoryClass, getOptional());
- final DeleteCustomResourceCmd deleteCmd =
+ final DeleteCustomResourceCmd deleteCmd =
cmdFactory.createDeleteCustomResourceCmd(jndiName);
final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
@@ -67,14 +67,14 @@
public static void main(String[] args) throws Exception
{
- new CustomResourceTest("admin", "password", "localhost", 8686,
- kJNDIName, kResType, kFactoryClass).run();
+ new CustomResourceTest("admin", "password", "localhost", 8686,
+ kJNDIName, kResType, kFactoryClass).run();
}
private Map getOptional()
{
final Map optional = new HashMap();
- //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
//kObjectType);
return optional;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusteredInstanceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusteredInstanceTest.java
index 036c67d..b053473 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusteredInstanceTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeleteClusteredInstanceTest.java
@@ -30,7 +30,7 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final DeleteClusteredInstanceCmd deleteClusteredInstanceCmd =
+ final DeleteClusteredInstanceCmd deleteClusteredInstanceCmd =
cmdFactory.createDeleteClusteredInstanceCmd(instanceName);
target = new PipeCmd(connectCmd, deleteClusteredInstanceCmd);
@@ -43,7 +43,7 @@
public static void main(String[] args) throws Exception
{
- new DeleteClusteredInstanceTest("admin", "password", "localhost",
+ new DeleteClusteredInstanceTest("admin", "password", "localhost",
8686, args[0]).run();
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployCmd.java
index 0c3fe5e..20fe5e8 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployCmd.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployCmd.java
@@ -67,21 +67,21 @@
{
try
{
- final DeploymentMgr mgr = getDeploymentMgr();
- assert( mgr != null );
-
- final int totalSize = (int)fileSize;
- final int chunkSize = 32 * 1024;
-
- final Object uploadID = mgr.initiateFileUpload( totalSize );
- int remaining = totalSize;
- boolean done = false;
+ final DeploymentMgr mgr = getDeploymentMgr();
+ assert( mgr != null );
+
+ final int totalSize = (int)fileSize;
+ final int chunkSize = 32 * 1024;
+
+ final Object uploadID = mgr.initiateFileUpload( totalSize );
+ int remaining = totalSize;
+ boolean done = false;
while ( remaining != 0 )
{
- final int actual = remaining < chunkSize ?
+ final int actual = remaining < chunkSize ?
remaining : chunkSize;
-
- final byte[] bytes = new byte[ actual ];
+
+ final byte[] bytes = new byte[ actual ];
try
{
is.read(bytes);
@@ -91,11 +91,11 @@
done = true;
break;
}
- done = mgr.uploadBytes( uploadID, bytes );
- remaining -= actual;
+ done = mgr.uploadBytes( uploadID, bytes );
+ remaining -= actual;
}
assert( done );
-
+
return( uploadID );
}
finally
@@ -113,27 +113,27 @@
{
final File archive = getArchive();
mgr = getDeploymentMgr();
-
+
myListener = new DeployListener();
mgr.addNotificationListener(myListener, null, null);
final Object deployID = mgr.initDeploy( );
assert( deployID instanceof String );
-
- if(archive.isDirectory())
- {
- DeploymentSourceImpl dsi = new DeploymentSourceImpl(archive.getAbsolutePath(), true,
- new String[1], new String[1], new String[1], new HashMap());
- mgr.startDeploy( deployID, dsi.asMap(), null, getDeploymentOptions());
- }
- else
- {
- bis = new BufferedInputStream(new FileInputStream(archive));
- Object uploadID = upload(bis, archive.length());
- mgr.startDeploy( deployID, uploadID, null, getDeploymentOptions());
- }
-
+ if(archive.isDirectory())
+ {
+ DeploymentSourceImpl dsi = new DeploymentSourceImpl(archive.getAbsolutePath(), true,
+ new String[1], new String[1], new String[1], new HashMap());
+ mgr.startDeploy( deployID, dsi.asMap(), null, getDeploymentOptions());
+ }
+ else
+ {
+ bis = new BufferedInputStream(new FileInputStream(archive));
+ Object uploadID = upload(bis, archive.length());
+ mgr.startDeploy( deployID, uploadID, null, getDeploymentOptions());
+ }
+
+
while ( ! myListener.isCompleted() )
{
try
@@ -149,8 +149,8 @@
finally
{
if (bis != null) { bis.close(); }
-
- if(myListener != null && mgr != null)
+
+ if(myListener != null && mgr != null)
{
try
{
@@ -169,7 +169,7 @@
final String target = getTarget();
if (!DEFAULT_DEPLOY_TARGET.equals(target)) //not a "domain".
{
- final DeployedItemRefConfig refConfig =
+ final DeployedItemRefConfig refConfig =
getDeployedItemRefConfigCR(target).createDeployedItemRefConfig(getAppName());
assert refConfig != null;
}
@@ -181,32 +181,32 @@
final String target = getTarget();
if (!DEFAULT_DEPLOY_TARGET.equals(target)) //not a "domain".
{
- J2EELogicalServer server = getLogicalServer();
+ J2EELogicalServer server = getLogicalServer();
server.startApp(getAppName(), null);
}
}
-
+
protected void stopApp() throws Exception
{
final String target = getTarget();
if (!DEFAULT_DEPLOY_TARGET.equals(target)) //not a "domain".
{
- J2EELogicalServer server = getLogicalServer();
+ J2EELogicalServer server = getLogicalServer();
server.stopApp(getAppName(), null);
}
}
-
+
protected DeployedItemRefConfigCR getDeployedItemRefConfigCR()
throws Exception
{
- return getDeployedItemRefConfigCR(getTarget());
- }
-
+ return getDeployedItemRefConfigCR(getTarget());
+ }
+
protected DeployedItemRefConfigCR getDeployedItemRefConfigCR(String target)
throws Exception
{
- final AMXConfig clusterOrServer = getClusterOrServer(target);
+ final AMXConfig clusterOrServer = getClusterOrServer(target);
assert clusterOrServer != null;
DeployedItemRefConfigCR mgr = null;
if (clusterOrServer instanceof StandaloneServerConfig)
@@ -219,7 +219,7 @@
}
else
{
- throw new Exception("Invaid deployment target: " +
+ throw new Exception("Invaid deployment target: " +
"Target has to be a cluster or standalone server");
}
assert mgr != null;
@@ -229,25 +229,25 @@
protected AMXConfig getClusterOrServer(String target) throws Exception
{
final DomainConfig domainConfig = getDomainConfig();
- final Map standAloneServers = domainConfig.getStandaloneServerConfigMap();
- final Map clusters = domainConfig.getClusterConfigMap();
- final Map clusteredServers = domainConfig.getClusteredServerConfigMap();
+ final Map standAloneServers = domainConfig.getStandaloneServerConfigMap();
+ final Map clusters = domainConfig.getClusterConfigMap();
+ final Map clusteredServers = domainConfig.getClusteredServerConfigMap();
- AMXConfig proxy = null;
- if (standAloneServers.containsKey(target))
- {
+ AMXConfig proxy = null;
+ if (standAloneServers.containsKey(target))
+ {
proxy = (AMXConfig)standAloneServers.get(target);
- }
- else if (clusters.containsKey(target))
- {
+ }
+ else if (clusters.containsKey(target))
+ {
proxy = (AMXConfig)clusters.get(target);
- }
- else
- {
+ }
+ else
+ {
//assert !clusteredServers.containsKey(target);
proxy = (AMXConfig)clusteredServers.get(target);
- }
- return proxy;
+ }
+ return proxy;
}
protected DeploymentMgr getDeploymentMgr() throws Exception
@@ -296,22 +296,22 @@
return (Map)getCmdEnv().get(kDeployOptions);
}
- J2EELogicalServer getLogicalServer() throws Exception
+ J2EELogicalServer getLogicalServer() throws Exception
{
- J2EELogicalServer server = null;
- J2EEDomain domain = getJ2EEDomain();
- Map serverMap = domain.getServerMap();
- Map clusterMap = domain.getClusterMap();
- String target = getTarget();
-
- serverMap.putAll(clusterMap);
-
- if(!serverMap.containsKey(target))
+ J2EELogicalServer server = null;
+ J2EEDomain domain = getJ2EEDomain();
+ Map serverMap = domain.getServerMap();
+ Map clusterMap = domain.getClusterMap();
+ String target = getTarget();
+
+ serverMap.putAll(clusterMap);
+
+ if(!serverMap.containsKey(target))
{
- throw new RuntimeException("Can't find target: " + getTarget());
+ throw new RuntimeException("Can't find target: " + getTarget());
}
- return (J2EELogicalServer)serverMap.get(target);
+ return (J2EELogicalServer)serverMap.get(target);
}
public static Throwable checkForException(final DeploymentStatus s)
@@ -320,7 +320,7 @@
final Iterator it = s.getSubStages();
while ((ex == null) && (it.hasNext()))
{
- final DeploymentStatus subStage =
+ final DeploymentStatus subStage =
DeploymentSupport.mapToDeploymentStatus((Map)it.next());
ex = subStage.getThrowable();
}
@@ -329,7 +329,7 @@
public void checkFailed(final Throwable t) throws Exception
{
- if ( t != null )
+ if ( t != null )
{
if ( t instanceof Exception )
{
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployListener.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployListener.java
index eec3dfc..d7701a4 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployListener.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployListener.java
@@ -32,23 +32,23 @@
public class DeployListener implements NotificationListener
{
private Object mDeployID;
- private boolean mIsCompleted;
+ private boolean mIsCompleted;
private DeploymentStatus mFinalStatus;
public DeployListener()
{
- mDeployID = null;
- mIsCompleted = false;
+ mDeployID = null;
+ mIsCompleted = false;
}
-
+
public boolean isCompleted()
{
return( mIsCompleted );
}
-
+
public synchronized void handleNotification(
- final Notification notif,
- final Object handback)
+ final Notification notif,
+ final Object handback)
{
try
{
@@ -59,7 +59,7 @@
e.printStackTrace();
}
}
-
+
public synchronized DeploymentStatus getFinalStatus()
{
return mFinalStatus;
@@ -71,52 +71,52 @@
}
public void realHandleNotification(
- final Notification notif,
- final Object handback)
+ final Notification notif,
+ final Object handback)
{
- final String type = notif.getType();
- final Map m = (Map)notif.getUserData();
- final Object deployID = m.get(DeploymentMgr.NOTIF_DEPLOYMENT_ID_KEY);
+ final String type = notif.getType();
+ final Map m = (Map)notif.getUserData();
+ final Object deployID = m.get(DeploymentMgr.NOTIF_DEPLOYMENT_ID_KEY);
- System.err.println( deployID + ": received " + type );
-
- if ( type.equals( DeploymentMgr.DEPLOYMENT_STARTED_NOTIFICATION_TYPE ) )
- {
- assert( mDeployID == null );
- mDeployID = deployID;
- }
- else if ( deployID.equals( mDeployID ) )
- {
- assert( deployID != null && deployID.equals( mDeployID ) );
- System.err.println(
- "DeployCmd.handleNotification: " + deployID + ": " + type );
-
- if ( type.equals(
- DeploymentMgr.DEPLOYMENT_COMPLETED_NOTIFICATION_TYPE ) )
- {
- final Map statusData = (Map)
- m.get( DeploymentMgr.NOTIF_DEPLOYMENT_COMPLETED_STATUS_KEY );
-
- DeploymentStatus status =
- DeploymentSupport.mapToDeploymentStatus( statusData );
-
- assert( mDeployID.equals( deployID ) ) :
- "deploy ID mismatch: " + mDeployID + " != " + deployID;
-
+ System.err.println( deployID + ": received " + type );
+
+ if ( type.equals( DeploymentMgr.DEPLOYMENT_STARTED_NOTIFICATION_TYPE ) )
+ {
+ assert( mDeployID == null );
+ mDeployID = deployID;
+ }
+ else if ( deployID.equals( mDeployID ) )
+ {
+ assert( deployID != null && deployID.equals( mDeployID ) );
+ System.err.println(
+ "DeployCmd.handleNotification: " + deployID + ": " + type );
+
+ if ( type.equals(
+ DeploymentMgr.DEPLOYMENT_COMPLETED_NOTIFICATION_TYPE ) )
+ {
+ final Map statusData = (Map)
+ m.get( DeploymentMgr.NOTIF_DEPLOYMENT_COMPLETED_STATUS_KEY );
+
+ DeploymentStatus status =
+ DeploymentSupport.mapToDeploymentStatus( statusData );
+
+ assert( mDeployID.equals( deployID ) ) :
+ "deploy ID mismatch: " + mDeployID + " != " + deployID;
+
setFinalStatus(status);
- mIsCompleted = true;
- }
- else if ( type.equals(
- DeploymentMgr.DEPLOYMENT_ABORTED_NOTIFICATION_TYPE ) )
- {
- Throwable t = new Exception( deployID +
- ": aborted. Please check server log for details." );
+ mIsCompleted = true;
+ }
+ else if ( type.equals(
+ DeploymentMgr.DEPLOYMENT_ABORTED_NOTIFICATION_TYPE ) )
+ {
+ Throwable t = new Exception( deployID +
+ ": aborted. Please check server log for details." );
final Map statusData = new HashMap();
- statusData.put(DeploymentStatus.STAGE_STATUS_KEY,
+ statusData.put(DeploymentStatus.STAGE_STATUS_KEY,
new Integer(DeploymentStatus.STATUS_CODE_FAILURE));
- statusData.put(DeploymentStatus.STAGE_STATUS_MESSAGE_KEY,
+ statusData.put(DeploymentStatus.STAGE_STATUS_MESSAGE_KEY,
t.getMessage());
statusData.put(DeploymentStatus.STAGE_THROWABLE_KEY, t);
final DeploymentStatus status = DeploymentSupport.
@@ -124,25 +124,25 @@
setFinalStatus(status);
- mIsCompleted = true;
- }
- else if ( type.equals(
- DeploymentMgr.DEPLOYMENT_PROGRESS_NOTIFICATION_TYPE ) )
- {
- final Map progressData = (Map)
- m.get( DeploymentMgr.NOTIF_DEPLOYMENT_PROGRESS_KEY );
+ mIsCompleted = true;
+ }
+ else if ( type.equals(
+ DeploymentMgr.DEPLOYMENT_PROGRESS_NOTIFICATION_TYPE ) )
+ {
+ final Map progressData = (Map)
+ m.get( DeploymentMgr.NOTIF_DEPLOYMENT_PROGRESS_KEY );
- final DeploymentProgress progress =
- DeploymentSupport.mapToDeploymentProgress( progressData );
+ final DeploymentProgress progress =
+ DeploymentSupport.mapToDeploymentProgress( progressData );
- System.err.println(
- deployID + ": " + progress.getProgressPercent() + "%" );
- }
- else
- {
- assert( false ) :
- "Unknown deployment notification type: " + type;
- }
- }
+ System.err.println(
+ deployID + ": " + progress.getProgressPercent() + "%" );
+ }
+ else
+ {
+ assert( false ) :
+ "Unknown deployment notification type: " + type;
+ }
+ }
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployedAppInspector.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployedAppInspector.java
index 7f4c92c..b8b3525 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployedAppInspector.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeployedAppInspector.java
@@ -23,66 +23,66 @@
*/
class DeployedAppInspector
{
- DeployedAppInspector(ConnectCmd ccmd, String target)
- {
- CmdFactory cmdFactory = Env.getCmdFactory();
- ListDeployedAppsCmd cmd = cmdFactory.createListDeployedAppsCmd(target, "All");
- targetCmd = new PipeCmd(ccmd, cmd);
- }
+ DeployedAppInspector(ConnectCmd ccmd, String target)
+ {
+ CmdFactory cmdFactory = Env.getCmdFactory();
+ ListDeployedAppsCmd cmd = cmdFactory.createListDeployedAppsCmd(target, "All");
+ targetCmd = new PipeCmd(ccmd, cmd);
+ }
- ////////////////////////////////////////////////////////////////////////////
-
- DeployedAppInspector(String user, String password, String host,
- int port, String target)
- {
- CmdFactory cmdFactory = Env.getCmdFactory();
- ConnectCmd connectCmd = cmdFactory.createConnectCmd(user, password, host, port);
- ListDeployedAppsCmd cmd = cmdFactory.createListDeployedAppsCmd(target, "All");
- targetCmd = new PipeCmd(connectCmd, cmd);
- }
+ ////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////
-
- boolean isDeployed(String id) throws DeploymentTestsException
- {
- try
- {
- if(results == null)
- refresh();
-
- return results.contains(id);
- }
- catch(Exception e)
- {
- throw new DeploymentTestsException("Exception caught in DeployedAppInspector.isDeployed().", e);
- }
- }
+ DeployedAppInspector(String user, String password, String host,
+ int port, String target)
+ {
+ CmdFactory cmdFactory = Env.getCmdFactory();
+ ConnectCmd connectCmd = cmdFactory.createConnectCmd(user, password, host, port);
+ ListDeployedAppsCmd cmd = cmdFactory.createListDeployedAppsCmd(target, "All");
+ targetCmd = new PipeCmd(connectCmd, cmd);
+ }
- ////////////////////////////////////////////////////////////////////////////
-
- void refresh()
- {
- Set[] sets = null;
-
- try
- {
- sets = (Set[])targetCmd.execute();
- }
- catch(Exception e)
- {
- // note: the called method literally declares 'throws Exception' !!!
- throw new RuntimeException(e);
- }
-
- // get the intersection of the 2 sets
- if(sets.length > 1)
- sets[0].retainAll(sets[1]);
-
- results = sets[0];
- }
+ ////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////////////////
-
- private Set results;
- private Cmd targetCmd;
+ boolean isDeployed(String id) throws DeploymentTestsException
+ {
+ try
+ {
+ if(results == null)
+ refresh();
+
+ return results.contains(id);
+ }
+ catch(Exception e)
+ {
+ throw new DeploymentTestsException("Exception caught in DeployedAppInspector.isDeployed().", e);
+ }
+ }
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ void refresh()
+ {
+ Set[] sets = null;
+
+ try
+ {
+ sets = (Set[])targetCmd.execute();
+ }
+ catch(Exception e)
+ {
+ // note: the called method literally declares 'throws Exception' !!!
+ throw new RuntimeException(e);
+ }
+
+ // get the intersection of the 2 sets
+ if(sets.length > 1)
+ sets[0].retainAll(sets[1]);
+
+ results = sets[0];
+ }
+
+ ////////////////////////////////////////////////////////////////////////////
+
+ private Set results;
+ private Cmd targetCmd;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTest.java
index 733ce8a..d0fa9a8 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTest.java
@@ -24,16 +24,16 @@
public DeploymentTest(final String user, final String password,
final String host, final int port, final String archive,
- final String name, final String contextRoot,
+ final String name, final String contextRoot,
final boolean enable)
{
- this(user, password, host, port, archive, name, contextRoot, enable,
+ this(user, password, host, port, archive, name, contextRoot, enable,
"server");
- }
-
- public DeploymentTest(final String user, final String password,
+ }
+
+ public DeploymentTest(final String user, final String password,
final String host, final int port, final String archive,
- final String name, final String contextRoot,
+ final String name, final String contextRoot,
final boolean enable, String appservTarget)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -41,7 +41,7 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final DeployCmd deployCmd = cmdFactory.createDeployCmd(archive, name,
+ final DeployCmd deployCmd = cmdFactory.createDeployCmd(archive, name,
contextRoot, enable, appservTarget);
target = new PipeCmd(connectCmd, deployCmd);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsAuto.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsAuto.java
index d21c2f0..cb32b28 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsAuto.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsAuto.java
@@ -31,604 +31,604 @@
public class DeploymentTestsAuto
{
- public static void main(String[] args)
- {
- if(args.length > 0 && args[0].equals("ant"))
- calledFromAnt = true;
-
- bold("Deployment Tests Started", System.err);
- caller = System.getProperty("user.name");
-
- if(caller == null)
- caller = "unknown";
-
- DeploymentTestsAuto dta = null;
-
- try
- {
- dta = new DeploymentTestsAuto();
- dta.run();
- bold("RESULTS in " + dta.reportFile.getPath(), System.err);
- printErr("\n\n\n\n");
- }
- catch(Exception e)
- {
- e.printStackTrace();
- usage();
- }
- finally
- {
- Tee.stop();
- }
- System.exit(0);
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- public DeploymentTestsAuto() throws DeploymentTestsException
- {
- start = new Date();
- try
- {
- propertiesFile = Utils.safeGetCanonicalFile(new File(PROPERTIES_FILE));
-
- if(!propertiesFile.exists() && caller.equals("bnevins"))
- propertiesFile = Utils.safeGetCanonicalFile(new File("C:/jwsee/appserv-tests/devtests/ee/admin/mbeanapi/deployment/" + PROPERTIES_FILE));
-
- if(!propertiesFile.exists())
- throw new DeploymentTestsException("No properties file. Expected it here: " +
- propertiesFile.getPath());
-
- printErr("Properties File: " + propertiesFile.getPath());
- printErr("");
- load();
- setupTee();
- getConstantArgs();
- getTargetList();
- getSampleList();
- getTestList();
- getOptions();
- }
- catch(DeploymentTestsException dte)
- {
- throw dte;
- }
- catch(Exception e)
- {
- throw new DeploymentTestsException("Unknown Exception caught in DeploymentTestsAuto.DeploymentTestsAuto", e);
- }
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- public void run()
- {
- // note: NOW all exceptions are documented internally and
- // the run continues...
-
- for(Iterator it = tests.iterator(); it.hasNext(); )
- {
- Test test = (Test)it.next();
-
- try
- {
- DeployedAppInspector inspector = new DeployedAppInspector(
- test.target.ccmd, test.target.name);
+ public static void main(String[] args)
+ {
+ if(args.length > 0 && args[0].equals("ant"))
+ calledFromAnt = true;
- if(inspector.isDeployed(test.sample.name))
- {
- test.addComment("App was previously deployed before the test. Undeploying before testing.\n");
+ bold("Deployment Tests Started", System.err);
+ caller = System.getProperty("user.name");
- undeploy(test);
- inspector.refresh();
- if(inspector.isDeployed(test.sample.name))
- {
- test.addComment("Could not undeploy App. Aborted testing of this App.");
- break;
- }
- }
-
- deploy(test);
- inspector.refresh();
-
- if(!inspector.isDeployed(test.sample.name))
- {
- test.addComment("Inspector reported that App was not deployed.");
- break;
- }
-
- undeploy(test);
- inspector.refresh();
+ if(caller == null)
+ caller = "unknown";
- if(inspector.isDeployed(test.sample.name))
- {
- test.addComment("Inspector reported that App was not undeployed.");
- break;
- }
- test.addComment("Successfully deployed and undeployed app");
- test.passed = true;
- }
- catch(DeploymentTestsException dte)
- {
- test.add(dte);
- continue;
- }
- }
-
- report();
- }
-
- ///////////////////////////////////////////////////////////////////////////
+ DeploymentTestsAuto dta = null;
- private void report()
- {
- end = new Date();
- long msec = end.getTime() - start.getTime();
- double sec = (double)msec / 1000.0;
+ try
+ {
+ dta = new DeploymentTestsAuto();
+ dta.run();
+ bold("RESULTS in " + dta.reportFile.getPath(), System.err);
+ printErr("\n\n\n\n");
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ usage();
+ }
+ finally
+ {
+ Tee.stop();
+ }
+ System.exit(0);
+ }
-
- print(stars);
- bold("Test Results", System.out);
- print(stars);
- print("");
+ //////////////////////////////////////////////////////////////////////////
- print("Time Started: " + start);
- print("Time Ended: " + end);
- print("Total Time: " + sec + " seconds");
- print("");
-
- bold("Summary", System.out);
- print("");
-
- int numTests = tests.size();
- int numPassed = getNumPassed();
- int numFailed = numTests - numPassed;
- print("Total Tests: " + numTests);
- print("Passed: " + numPassed);
- print("Failed: " + numFailed);
- print("");
-
- bold("Details", System.out);
- print("");
+ public DeploymentTestsAuto() throws DeploymentTestsException
+ {
+ start = new Date();
+ try
+ {
+ propertiesFile = Utils.safeGetCanonicalFile(new File(PROPERTIES_FILE));
- int which = 1;
-
- for(Iterator it = tests.iterator(); it.hasNext(); ++which)
- {
- Test test = (Test)it.next();
-
- print("Test " + which);
- print("");
- print(test.toString());
- print(stars);
- print("");
- }
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private void deploy(Test test) throws DeploymentTestsException
- {
- bold("Deploy " + test.sample.name + " to " + test.target.name, System.err);
-
- ConnectCmd ccmd = test.target.ccmd;
- DeployCmd deployCmd = cmdFactory.createDeployCmd(
- test.sample.file.getPath(),
- test.sample.name,
- null, //context-root
- true, // enable
- test.target.name);
+ if(!propertiesFile.exists() && caller.equals("bnevins"))
+ propertiesFile = Utils.safeGetCanonicalFile(new File("C:/jwsee/appserv-tests/devtests/ee/admin/mbeanapi/deployment/" + PROPERTIES_FILE));
- Cmd pipe = new PipeCmd(ccmd, deployCmd);
-
- try
- {
- pipe.execute();
- }
- catch(Exception e)
- {
- throw new DeploymentTestsException("Error deploying.", e);
- }
-
- if(pauseAfterDeploy)
- {
- // if this program is called from Ant -- stdin won't work.
- // So use a dialog box...
- if(calledFromAnt)
- Utils.messageBox("Just deployed " + test.sample.name + "\nPress OK when ready to undeploy." , "Deployment Tests Pause");
- else
- Console.readLine(stars + "\n" +
- boldify("Pausing after Deploy. Hit Return to continue...") +
- "\n" + stars + "\n");
- }
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private void undeploy(Test test) throws DeploymentTestsException
- {
- bold("UnDeploy " + test.sample.name + " from " + test.target.name, System.err);
- ConnectCmd ccmd = test.target.ccmd;
- UndeployCmd undeployCmd = cmdFactory.createUndeployCmd(
- test.sample.name,
- test.target.name);
+ if(!propertiesFile.exists())
+ throw new DeploymentTestsException("No properties file. Expected it here: " +
+ propertiesFile.getPath());
- Cmd pipe = new PipeCmd(ccmd, undeployCmd);
-
- try
- {
- pipe.execute();
- }
- catch(Exception e)
- {
- throw new DeploymentTestsException("Error undeploying.", e);
- }
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private void getConstantArgs() throws DeploymentTestsException
- {
- phup = new Phup(props);
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private void getTargetList() throws DeploymentTestsException
- {
- String err = "No targets specified in properties file. Usage \"targets=foo,goo,hoo\"";
- String s = props.getProperty("targets");
-
- if(!Utils.ok(s))
- throw new DeploymentTestsException(err);
-
- String[] ss = s.split(",");
-
- if(ss == null || ss.length <= 0)
- throw new DeploymentTestsException(err);
-
- Set targetNames = new HashSet();
- //targetNames.add("server");
-
- for(int i = 0; i < ss.length; i++)
- targetNames.add(ss[i]);
-
- targets = new ArrayList();
-
- for(Iterator it = targetNames.iterator(); it.hasNext(); )
- {
- String targetName = (String)it.next();
- ConnectCmd ccmd = cmdFactory.createConnectCmd(phup);
- try
- {
- // note: it does NOT actually connect yet...
- ccmd.execute();
- }
- catch(Exception e)
- {
- throw new DeploymentTestsException("Couldn't connect to target: " + targetName, e);
- }
-
- targets.add(new Target(targetName, ccmd));
- }
-
- printErr("Targets:");
- int which = 1;
- for(Iterator it = targetNames.iterator(); it.hasNext(); ++which)
- printErr(" " + which + " " + it.next());
-
- printErr("");
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private void getSampleList() throws DeploymentTestsException
- {
- SampleGetter getter = new SampleGetter(props);
- samples = getter.getSampleList();
- printErr("Samples:");
-
- int which = 1;
- for(Iterator it = samples.iterator(); it.hasNext(); ++which)
- printErr(" " + which + " " + ((Utils.Sample)it.next()).name );
-
- printErr("");
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private void getTestList()// throws DeploymentTestsException
- {
- tests = new ArrayList();
-
- for(Iterator itt = targets.iterator(); itt.hasNext(); )
- {
- Target target = (Target)itt.next();
-
- for(Iterator its = samples.iterator(); its.hasNext(); )
- {
- Utils.Sample sample = (Utils.Sample)its.next();
- tests.add(new Test(sample, target));
- }
- }
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private void getOptions()
- {
- String s = props.getProperty("pauseAfterDeploy");
-
- if(Utils.ok(s) && s.toLowerCase().equals("true"))
- pauseAfterDeploy = true;
- }
+ printErr("Properties File: " + propertiesFile.getPath());
+ printErr("");
+ load();
+ setupTee();
+ getConstantArgs();
+ getTargetList();
+ getSampleList();
+ getTestList();
+ getOptions();
+ }
+ catch(DeploymentTestsException dte)
+ {
+ throw dte;
+ }
+ catch(Exception e)
+ {
+ throw new DeploymentTestsException("Unknown Exception caught in DeploymentTestsAuto.DeploymentTestsAuto", e);
+ }
+ }
- //////////////////////////////////////////////////////////////////////////
-
- private void load() throws IOException
- {
- InputStream in = new FileInputStream(propertiesFile);
- props.load(in);
- in.close();
- }
+ ///////////////////////////////////////////////////////////////////////////
- //////////////////////////////////////////////////////////////////////////
-
- private static void print(String s)
- {
- System.out.println(s);
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- private static void printErr(String s)
- {
- System.err.println(s);
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- private static void bold(String s, PrintStream out)
- {
- String message = boldify(s);
-
- out.println(stars);
- out.println(message);
- out.println(stars);
- }
-
-
- //////////////////////////////////////////////////////////////////////////
-
- private static String boldify(String s)
- {
- String message = s;
- int len = (s == null ? 0 : s.length());
-
- if(len < 60)
- {
- message = " " + message + " ";
- len += 10;
-
- if(len % 2 != 0)
- {
- message += " ";
- ++len;
- }
-
- int numStars = (80 - len) / 2;
- StringBuffer sb = new StringBuffer();
-
- for(int i = 0; i < numStars; i++)
- {
- sb.append('*');
- }
- message = sb.toString() + message + sb.toString();
- }
-
- return message;
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- private void setupTee() throws DeploymentTestsException
- {
- // where to save the report?
- // (1) in the properties file
-
- String fname = props.getProperty("report");
-
- if(!Utils.ok(fname))
- {
- // (2) -- the default
- fname = "./" + REPORT_FILE;
- }
-
- reportFile = Utils.safeGetCanonicalFile(new File(fname));
-
- try
- {
- Tee.start(reportFile.getPath());
- }
- catch(IOException e)
- {
- throw new DeploymentTestsException("Could not create report file: " + reportFile, e);
- }
- }
-
- //////////////////////////////////////////////////////////////////////////
+ public void run()
+ {
+ // note: NOW all exceptions are documented internally and
+ // the run continues...
- private int getNumPassed()
- {
- int numPassed = 0;
-
- for(Iterator it = tests.iterator(); it.hasNext(); )
- {
- Test test = (Test)it.next();
-
- if(test.passed)
- ++numPassed;
- }
-
- return numPassed;
- }
-
- //////////////////////////////////////////////////////////////////////////
+ for(Iterator it = tests.iterator(); it.hasNext(); )
+ {
+ Test test = (Test)it.next();
- private static void usage()
- {
- printErr("\n\n\n\n");
- bold("USAGE", System.err);
-
- for(int i = 0; i < help.length; i++)
- {
- printErr(help[i]);
- }
+ try
+ {
+ DeployedAppInspector inspector = new DeployedAppInspector(
+ test.target.ccmd, test.target.name);
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- private CmdFactory cmdFactory = Env.getCmdFactory();
- private File propertiesFile;
- private File reportFile;
- private Properties props = new Properties();
- private Phup phup;
- private List targets;
- private List samples;
- private List tests;
- private Date start;
- private Date end;
- private static String stars;
- private static final String PROPERTIES_FILE = "./DeploymentTests.properties";
- private static final String REPORT_FILE = "./DeploymentTests.out";
- private static String caller;
- private boolean pauseAfterDeploy = false;
- private static boolean calledFromAnt = false;
- private static final String[] help =
- {
- "java -cp <classpath> -ea com.sun.enterprise.admin.mbeanapi.deployment.DeploymentTestsAuto",
- "",
- "where <classpath> must include: mbeanapi.jar, jmxri.jar and jmxremote.jar",
- "",
- "You must put instructions in a file named \"DeploymentTests.properties\"",
- "At a minimum, you must setup the following properties (example values included",
- "",
- "user=admin",
- "port=8686",
- "password=adminadmin",
- "host=iasengsol6.red.iplanet.com",
- "sampledir=C:/jwsee/appserv-tests/devtests/ee/admin/mbeanapi/deployment/samples",
- "targets=qbert,foo",
- "",
- "The report file path defaults to \"DeploymentTests.out\" in the current directory.",
- "You can specify any path you want like so:",
- "",
- "report=c:/jwsee/appserv-tests/devtests/ee/admin/mbeanapi/deployment/DeploymentTests.out",
- "",
- "",
- "targets is a comma-delimited list of clusters and stand-alone instances.",
- "sampledir points to a directory that you have filled with samples to be deployed and undeployed.",
- "To make manual testing possible you can set a property that will cause the program to pause and",
- "wait for you to type in a carriage return after every deployment. This allows you to check the",
- "server, run the app, etc. Here is the syntax:",
- "",
- "pauseAfterDeploy=true",
- "",
- "",
- "",
- };
-
- static
- {
- // note -- there must be a better way to do this, but I can't find it!!
- StringBuffer sb = new StringBuffer();
+ if(inspector.isDeployed(test.sample.name))
+ {
+ test.addComment("App was previously deployed before the test. Undeploying before testing.\n");
- for(int i = 0; i < 80; i++)
- sb.append('*');
+ undeploy(test);
+ inspector.refresh();
+ if(inspector.isDeployed(test.sample.name))
+ {
+ test.addComment("Could not undeploy App. Aborted testing of this App.");
+ break;
+ }
+ }
- stars = sb.toString();
- }
+ deploy(test);
+ inspector.refresh();
- ///////////////////////////////////////////////////////////////////////////
- //////////////// nested classes ///////////////////////////////////////////////////////////
- ///////////////////////////////////////////////////////////////////////////
-
+ if(!inspector.isDeployed(test.sample.name))
+ {
+ test.addComment("Inspector reported that App was not deployed.");
+ break;
+ }
-
+ undeploy(test);
+ inspector.refresh();
-
- private static class Target
- {
- public String toString()
- {
- return "Target: " + name;
- }
- private Target(String name, ConnectCmd ccmd)
- {
- this.name = name;
- this.ccmd = ccmd;
- }
- private String name;
- private ConnectCmd ccmd;
- }
-
- private static class Test
- {
- public String toString()
- {
- StringBuffer sb = new StringBuffer();
-
- if(passed)
- sb.append("****** Passed").append('\n');
- else
- sb.append("****** Failed").append('\n');
-
- sb.append(sample).append('\n');
- sb.append(target).append('\n');
+ if(inspector.isDeployed(test.sample.name))
+ {
+ test.addComment("Inspector reported that App was not undeployed.");
+ break;
+ }
+ test.addComment("Successfully deployed and undeployed app");
+ test.passed = true;
+ }
+ catch(DeploymentTestsException dte)
+ {
+ test.add(dte);
+ continue;
+ }
+ }
- if(comments.length() > 0)
- sb.append(comments).append('\n');
-
- if(!passed)
- {
- sb.append("Exceptions:").append('\n');
- int which = 1;
- for(Iterator it = exceptions.iterator(); it.hasNext(); ++which)
- {
- Exception e = (Exception)it.next();
- sb.append("Exception # " + which).append('\n');
-
- StringWriter sw = new StringWriter();
- PrintWriter pw = new PrintWriter(sw, true);
- e.printStackTrace(pw);
- pw.close();
-
- sb.append(sw.toString());
- }
- }
- return sb.toString();
- }
-
- private Test(Utils.Sample sample, Target target)
- {
- this.sample = sample;
- this.target = target;
- }
- private void addComment(String s)
- {
- comments += s;
- }
+ report();
+ }
- private void add(DeploymentTestsException dte)
- {
- exceptions.add(dte);
- }
- Utils.Sample sample;
- Target target;
- String comments = new String();
- List exceptions = new ArrayList();
- boolean passed = false;
- }
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void report()
+ {
+ end = new Date();
+ long msec = end.getTime() - start.getTime();
+ double sec = (double)msec / 1000.0;
+
+
+ print(stars);
+ bold("Test Results", System.out);
+ print(stars);
+ print("");
+
+ print("Time Started: " + start);
+ print("Time Ended: " + end);
+ print("Total Time: " + sec + " seconds");
+ print("");
+
+ bold("Summary", System.out);
+ print("");
+
+ int numTests = tests.size();
+ int numPassed = getNumPassed();
+ int numFailed = numTests - numPassed;
+ print("Total Tests: " + numTests);
+ print("Passed: " + numPassed);
+ print("Failed: " + numFailed);
+ print("");
+
+ bold("Details", System.out);
+ print("");
+
+ int which = 1;
+
+ for(Iterator it = tests.iterator(); it.hasNext(); ++which)
+ {
+ Test test = (Test)it.next();
+
+ print("Test " + which);
+ print("");
+ print(test.toString());
+ print(stars);
+ print("");
+ }
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void deploy(Test test) throws DeploymentTestsException
+ {
+ bold("Deploy " + test.sample.name + " to " + test.target.name, System.err);
+
+ ConnectCmd ccmd = test.target.ccmd;
+ DeployCmd deployCmd = cmdFactory.createDeployCmd(
+ test.sample.file.getPath(),
+ test.sample.name,
+ null, //context-root
+ true, // enable
+ test.target.name);
+
+ Cmd pipe = new PipeCmd(ccmd, deployCmd);
+
+ try
+ {
+ pipe.execute();
+ }
+ catch(Exception e)
+ {
+ throw new DeploymentTestsException("Error deploying.", e);
+ }
+
+ if(pauseAfterDeploy)
+ {
+ // if this program is called from Ant -- stdin won't work.
+ // So use a dialog box...
+ if(calledFromAnt)
+ Utils.messageBox("Just deployed " + test.sample.name + "\nPress OK when ready to undeploy." , "Deployment Tests Pause");
+ else
+ Console.readLine(stars + "\n" +
+ boldify("Pausing after Deploy. Hit Return to continue...") +
+ "\n" + stars + "\n");
+ }
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void undeploy(Test test) throws DeploymentTestsException
+ {
+ bold("UnDeploy " + test.sample.name + " from " + test.target.name, System.err);
+ ConnectCmd ccmd = test.target.ccmd;
+ UndeployCmd undeployCmd = cmdFactory.createUndeployCmd(
+ test.sample.name,
+ test.target.name);
+
+ Cmd pipe = new PipeCmd(ccmd, undeployCmd);
+
+ try
+ {
+ pipe.execute();
+ }
+ catch(Exception e)
+ {
+ throw new DeploymentTestsException("Error undeploying.", e);
+ }
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void getConstantArgs() throws DeploymentTestsException
+ {
+ phup = new Phup(props);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void getTargetList() throws DeploymentTestsException
+ {
+ String err = "No targets specified in properties file. Usage \"targets=foo,goo,hoo\"";
+ String s = props.getProperty("targets");
+
+ if(!Utils.ok(s))
+ throw new DeploymentTestsException(err);
+
+ String[] ss = s.split(",");
+
+ if(ss == null || ss.length <= 0)
+ throw new DeploymentTestsException(err);
+
+ Set targetNames = new HashSet();
+ //targetNames.add("server");
+
+ for(int i = 0; i < ss.length; i++)
+ targetNames.add(ss[i]);
+
+ targets = new ArrayList();
+
+ for(Iterator it = targetNames.iterator(); it.hasNext(); )
+ {
+ String targetName = (String)it.next();
+ ConnectCmd ccmd = cmdFactory.createConnectCmd(phup);
+ try
+ {
+ // note: it does NOT actually connect yet...
+ ccmd.execute();
+ }
+ catch(Exception e)
+ {
+ throw new DeploymentTestsException("Couldn't connect to target: " + targetName, e);
+ }
+
+ targets.add(new Target(targetName, ccmd));
+ }
+
+ printErr("Targets:");
+ int which = 1;
+ for(Iterator it = targetNames.iterator(); it.hasNext(); ++which)
+ printErr(" " + which + " " + it.next());
+
+ printErr("");
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void getSampleList() throws DeploymentTestsException
+ {
+ SampleGetter getter = new SampleGetter(props);
+ samples = getter.getSampleList();
+ printErr("Samples:");
+
+ int which = 1;
+ for(Iterator it = samples.iterator(); it.hasNext(); ++which)
+ printErr(" " + which + " " + ((Utils.Sample)it.next()).name );
+
+ printErr("");
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void getTestList()// throws DeploymentTestsException
+ {
+ tests = new ArrayList();
+
+ for(Iterator itt = targets.iterator(); itt.hasNext(); )
+ {
+ Target target = (Target)itt.next();
+
+ for(Iterator its = samples.iterator(); its.hasNext(); )
+ {
+ Utils.Sample sample = (Utils.Sample)its.next();
+ tests.add(new Test(sample, target));
+ }
+ }
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void getOptions()
+ {
+ String s = props.getProperty("pauseAfterDeploy");
+
+ if(Utils.ok(s) && s.toLowerCase().equals("true"))
+ pauseAfterDeploy = true;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private void load() throws IOException
+ {
+ InputStream in = new FileInputStream(propertiesFile);
+ props.load(in);
+ in.close();
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private static void print(String s)
+ {
+ System.out.println(s);
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private static void printErr(String s)
+ {
+ System.err.println(s);
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private static void bold(String s, PrintStream out)
+ {
+ String message = boldify(s);
+
+ out.println(stars);
+ out.println(message);
+ out.println(stars);
+ }
+
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private static String boldify(String s)
+ {
+ String message = s;
+ int len = (s == null ? 0 : s.length());
+
+ if(len < 60)
+ {
+ message = " " + message + " ";
+ len += 10;
+
+ if(len % 2 != 0)
+ {
+ message += " ";
+ ++len;
+ }
+
+ int numStars = (80 - len) / 2;
+ StringBuffer sb = new StringBuffer();
+
+ for(int i = 0; i < numStars; i++)
+ {
+ sb.append('*');
+ }
+ message = sb.toString() + message + sb.toString();
+ }
+
+ return message;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private void setupTee() throws DeploymentTestsException
+ {
+ // where to save the report?
+ // (1) in the properties file
+
+ String fname = props.getProperty("report");
+
+ if(!Utils.ok(fname))
+ {
+ // (2) -- the default
+ fname = "./" + REPORT_FILE;
+ }
+
+ reportFile = Utils.safeGetCanonicalFile(new File(fname));
+
+ try
+ {
+ Tee.start(reportFile.getPath());
+ }
+ catch(IOException e)
+ {
+ throw new DeploymentTestsException("Could not create report file: " + reportFile, e);
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private int getNumPassed()
+ {
+ int numPassed = 0;
+
+ for(Iterator it = tests.iterator(); it.hasNext(); )
+ {
+ Test test = (Test)it.next();
+
+ if(test.passed)
+ ++numPassed;
+ }
+
+ return numPassed;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private static void usage()
+ {
+ printErr("\n\n\n\n");
+ bold("USAGE", System.err);
+
+ for(int i = 0; i < help.length; i++)
+ {
+ printErr(help[i]);
+ }
+
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private CmdFactory cmdFactory = Env.getCmdFactory();
+ private File propertiesFile;
+ private File reportFile;
+ private Properties props = new Properties();
+ private Phup phup;
+ private List targets;
+ private List samples;
+ private List tests;
+ private Date start;
+ private Date end;
+ private static String stars;
+ private static final String PROPERTIES_FILE = "./DeploymentTests.properties";
+ private static final String REPORT_FILE = "./DeploymentTests.out";
+ private static String caller;
+ private boolean pauseAfterDeploy = false;
+ private static boolean calledFromAnt = false;
+ private static final String[] help =
+ {
+ "java -cp <classpath> -ea com.sun.enterprise.admin.mbeanapi.deployment.DeploymentTestsAuto",
+ "",
+ "where <classpath> must include: mbeanapi.jar, jmxri.jar and jmxremote.jar",
+ "",
+ "You must put instructions in a file named \"DeploymentTests.properties\"",
+ "At a minimum, you must setup the following properties (example values included",
+ "",
+ "user=admin",
+ "port=8686",
+ "password=adminadmin",
+ "host=iasengsol6.red.iplanet.com",
+ "sampledir=C:/jwsee/appserv-tests/devtests/ee/admin/mbeanapi/deployment/samples",
+ "targets=qbert,foo",
+ "",
+ "The report file path defaults to \"DeploymentTests.out\" in the current directory.",
+ "You can specify any path you want like so:",
+ "",
+ "report=c:/jwsee/appserv-tests/devtests/ee/admin/mbeanapi/deployment/DeploymentTests.out",
+ "",
+ "",
+ "targets is a comma-delimited list of clusters and stand-alone instances.",
+ "sampledir points to a directory that you have filled with samples to be deployed and undeployed.",
+ "To make manual testing possible you can set a property that will cause the program to pause and",
+ "wait for you to type in a carriage return after every deployment. This allows you to check the",
+ "server, run the app, etc. Here is the syntax:",
+ "",
+ "pauseAfterDeploy=true",
+ "",
+ "",
+ "",
+ };
+
+ static
+ {
+ // note -- there must be a better way to do this, but I can't find it!!
+ StringBuffer sb = new StringBuffer();
+
+ for(int i = 0; i < 80; i++)
+ sb.append('*');
+
+ stars = sb.toString();
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+ //////////////// nested classes ///////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////
+
+
+
+
+
+ private static class Target
+ {
+ public String toString()
+ {
+ return "Target: " + name;
+ }
+ private Target(String name, ConnectCmd ccmd)
+ {
+ this.name = name;
+ this.ccmd = ccmd;
+ }
+ private String name;
+ private ConnectCmd ccmd;
+ }
+
+ private static class Test
+ {
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer();
+
+ if(passed)
+ sb.append("****** Passed").append('\n');
+ else
+ sb.append("****** Failed").append('\n');
+
+ sb.append(sample).append('\n');
+ sb.append(target).append('\n');
+
+ if(comments.length() > 0)
+ sb.append(comments).append('\n');
+
+ if(!passed)
+ {
+ sb.append("Exceptions:").append('\n');
+ int which = 1;
+ for(Iterator it = exceptions.iterator(); it.hasNext(); ++which)
+ {
+ Exception e = (Exception)it.next();
+ sb.append("Exception # " + which).append('\n');
+
+ StringWriter sw = new StringWriter();
+ PrintWriter pw = new PrintWriter(sw, true);
+ e.printStackTrace(pw);
+ pw.close();
+
+ sb.append(sw.toString());
+ }
+ }
+ return sb.toString();
+ }
+
+ private Test(Utils.Sample sample, Target target)
+ {
+ this.sample = sample;
+ this.target = target;
+ }
+ private void addComment(String s)
+ {
+ comments += s;
+ }
+
+ private void add(DeploymentTestsException dte)
+ {
+ exceptions.add(dte);
+ }
+ Utils.Sample sample;
+ Target target;
+ String comments = new String();
+ List exceptions = new ArrayList();
+ boolean passed = false;
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsException.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsException.java
index aab14c4..209e0e2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsException.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsException.java
@@ -28,19 +28,19 @@
*/
public class DeploymentTestsException extends Exception
{
- public DeploymentTestsException(String s)
- {
- super(s);
- }
+ public DeploymentTestsException(String s)
+ {
+ super(s);
+ }
- public DeploymentTestsException(Throwable t)
- {
- super(t);
- }
+ public DeploymentTestsException(Throwable t)
+ {
+ super(t);
+ }
- public DeploymentTestsException(String s, Throwable t)
- {
- super(s, t);
- }
-
+ public DeploymentTestsException(String s, Throwable t)
+ {
+ super(s, t);
+ }
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsUI.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsUI.java
index 2f5bcae..da2fadf 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsUI.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/DeploymentTestsUI.java
@@ -26,269 +26,269 @@
public class DeploymentTestsUI
{
- public DeploymentTestsUI()
- {
- System.setProperty(Env.USE_TLS_SYSTEM_PROPERTY, "true");
-
- File f = getPersistenceFile();
-
- if(f != null)
- persist = new SimplePersistence(f, true);
- else
- persist = new SimplePersistence(this);
- getArgs();
- setPort();
- getSamplesDir();
- getSamples();
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- public void deployAll()
- {
- for(int i = 0; i < archives.length; i++)
- {
- File f = archives[i];
- setName(f);
- print("Deploying " + name + " (" + f + ")");
-
- if(!deployOne(f))
- return;
- }
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private boolean deployOne(File f)
- {
- // return true to continue, false to abort...
- try
- {
- DeploymentTest test = new DeploymentTest(user.value, password.value,
- host.value, portInt, f.getAbsolutePath(), name, contextRoot, enable, appservTarget.value);
+ public DeploymentTestsUI()
+ {
+ System.setProperty(Env.USE_TLS_SYSTEM_PROPERTY, "true");
- System.out.println("################################################");
- System.out.println("######### Deploying " + name + " ##########");
- System.out.println("################################################");
- test.run();
-
- }
- catch(Exception e)
- {
- e.printStackTrace();
- }
-
- DeployedAppInspector list = null;
-
- try
- {
- list = new DeployedAppInspector(user.value, password.value,
- host.value, portInt, appservTarget.value);
+ File f = getPersistenceFile();
- System.out.println("################################################");
- System.out.println("######### AppList: ");
- System.out.println("################################################");
- //list.run();
- //String[] results = list.getResults();
-
- //for(int i = 0; i < results.length; i++)
- //System.out.println("" + i + ": " + results[i]);
-
- System.out.println("isDeployed(): " + list.isDeployed(name));
- }
- catch(Exception e)
- {
- e.printStackTrace();
- }
-
- String response = "";
-
- try
- {
- response = Console.readLine("Go check on deployed App. Press <return> when ready to undeploy it. 'q' to quit");
- UndeploymentTest test = new UndeploymentTest(user.value, password.value,
- host.value, portInt, name, appservTarget.value);
+ if(f != null)
+ persist = new SimplePersistence(f, true);
+ else
+ persist = new SimplePersistence(this);
+ getArgs();
+ setPort();
+ getSamplesDir();
+ getSamples();
+ }
- System.out.println("################################################");
- System.out.println("######### Un-Deploying " + name + " ##########");
- System.out.println("################################################");
- test.run();
-
- }
- catch(Exception e)
- {
- e.printStackTrace();
- }
- try
- {
- System.out.println("################################################");
- System.out.println("######### AppList: ");
- System.out.println("################################################");
- //list.run();
- //String[] results = list.getResults();
-
- //for(int i = 0; i < results.length; i++)
- //System.out.println("" + i + ": " + results[i]);
-
- System.out.println("isDeployed(): " + list.isDeployed(name));
- }
- catch(Exception e)
- {
- e.printStackTrace();
- }
-
- return !response.toLowerCase().startsWith("q");
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private void getArgs()
- {
- getArg(user);
- getArg(password);
- getArg(host);
- getArg(port);
- getArg(appservTarget);
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private void getArg(NameValue nv)
- {
- nv.value = persist.getProperty(nv.name);
-
- if(!ok(nv.value))
- nv.value = null;
-
- String prompt = nv.name + ": ";
+ ///////////////////////////////////////////////////////////////////////////
- if(ok(nv.value))
- prompt += "[" + nv.value + "]";
-
- String reply = Console.readLine(prompt);
-
- if(ok(reply))
- {
-
- nv.value = reply;
- persist.setProperty(nv.name, nv.value);
- }
- else if(!ok(nv.value))
- throw new IllegalArgumentException("No arg supplied for: " + nv.name);
- // else -- it is already set...
- }
-
- ///////////////////////////////////////////////////////////////////////////
+ public void deployAll()
+ {
+ for(int i = 0; i < archives.length; i++)
+ {
+ File f = archives[i];
+ setName(f);
+ print("Deploying " + name + " (" + f + ")");
- boolean ok(String s)
- {
- return s != null && s.length() > 0;
- }
-
- ///////////////////////////////////////////////////////////////////////////
+ if(!deployOne(f))
+ return;
+ }
+ }
- private void getSamplesDir()
- {
- Class clazz = getClass();
- URL url = clazz.getResource("samples");
- String filename = url.getPath();
- samplesDir = new File(filename);
- System.out.println("Samples Dir: " + filename);
- }
-
- ///////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////
- private void getSamples()
- {
- archives = samplesDir.listFiles(new ArchiveFilter());
- }
-
- ///////////////////////////////////////////////////////////////////////////
+ private boolean deployOne(File f)
+ {
+ // return true to continue, false to abort...
+ try
+ {
+ DeploymentTest test = new DeploymentTest(user.value, password.value,
+ host.value, portInt, f.getAbsolutePath(), name, contextRoot, enable, appservTarget.value);
- private void setName(File f)
- {
- // note that ArchiveFilter guarantees that there will be a 4-character extension...
- name = f.getName();
- name = name.substring(0, name.length() - 4);
- }
-
- ///////////////////////////////////////////////////////////////////////////
+ System.out.println("################################################");
+ System.out.println("######### Deploying " + name + " ##########");
+ System.out.println("################################################");
+ test.run();
- private void setPort()
- {
- try
- {
- portInt = Integer.parseInt(port.value);
- }
- catch(NumberFormatException nfe)
- {
- throw new IllegalArgumentException("Bad port number: " + port.value);
- }
- }
-
- ///////////////////////////////////////////////////////////////////////////
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ }
- private void print(String s)
- {
- System.out.println(s);
- }
-
- ///////////////////////////////////////////////////////////////////////////
+ DeployedAppInspector list = null;
- public static void main(String[] args) throws Exception
- {
- DeploymentTestsUI tests = new DeploymentTestsUI();
- tests.deployAll();
- }
+ try
+ {
+ list = new DeployedAppInspector(user.value, password.value,
+ host.value, portInt, appservTarget.value);
- ///////////////////////////////////////////////////////////////////////////
+ System.out.println("################################################");
+ System.out.println("######### AppList: ");
+ System.out.println("################################################");
+ //list.run();
+ //String[] results = list.getResults();
- private File[] archives;
- private Cmd target;
- private SimplePersistence persist;
- private File archive;
- private String name;
- private String contextRoot;
- private boolean enable = true;
- private File samplesDir;
- private int portInt = -1;
- private NameValue user = new NameValue("user");
- private NameValue password = new NameValue("password");
- private NameValue host = new NameValue("host");
- private NameValue port = new NameValue("port");
- private NameValue appservTarget= new NameValue("target");
+ //for(int i = 0; i < results.length; i++)
+ //System.out.println("" + i + ": " + results[i]);
- ///////////////////////////////////////////////////////////////////////////
-
- private static class NameValue
- {
- private NameValue(String name)
- {
- this.name = name;
- }
- private final String name;
- private String value;
- }
-
- private static class ArchiveFilter implements FileFilter
- {
- public boolean accept(File f)
- {
- // must end in .jar/.war/.rar/.ear
-
- String name = f.getName();
-
- return name.endsWith(".ear") || name.endsWith(".jar") || name.endsWith(".rar") || name.endsWith(".war");
- }
- }
- private File getPersistenceFile()
- {
- String s = System.getProperty("user.name");
-
- if(s != null && s.equals("bnevins"))
- return new File("C:/tmp/DeploymentTestsUI.persist.properties");
-
- return null;
- }
+ System.out.println("isDeployed(): " + list.isDeployed(name));
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ String response = "";
+
+ try
+ {
+ response = Console.readLine("Go check on deployed App. Press <return> when ready to undeploy it. 'q' to quit");
+ UndeploymentTest test = new UndeploymentTest(user.value, password.value,
+ host.value, portInt, name, appservTarget.value);
+
+ System.out.println("################################################");
+ System.out.println("######### Un-Deploying " + name + " ##########");
+ System.out.println("################################################");
+ test.run();
+
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ }
+ try
+ {
+ System.out.println("################################################");
+ System.out.println("######### AppList: ");
+ System.out.println("################################################");
+ //list.run();
+ //String[] results = list.getResults();
+
+ //for(int i = 0; i < results.length; i++)
+ //System.out.println("" + i + ": " + results[i]);
+
+ System.out.println("isDeployed(): " + list.isDeployed(name));
+ }
+ catch(Exception e)
+ {
+ e.printStackTrace();
+ }
+
+ return !response.toLowerCase().startsWith("q");
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void getArgs()
+ {
+ getArg(user);
+ getArg(password);
+ getArg(host);
+ getArg(port);
+ getArg(appservTarget);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void getArg(NameValue nv)
+ {
+ nv.value = persist.getProperty(nv.name);
+
+ if(!ok(nv.value))
+ nv.value = null;
+
+ String prompt = nv.name + ": ";
+
+ if(ok(nv.value))
+ prompt += "[" + nv.value + "]";
+
+ String reply = Console.readLine(prompt);
+
+ if(ok(reply))
+ {
+
+ nv.value = reply;
+ persist.setProperty(nv.name, nv.value);
+ }
+ else if(!ok(nv.value))
+ throw new IllegalArgumentException("No arg supplied for: " + nv.name);
+ // else -- it is already set...
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ boolean ok(String s)
+ {
+ return s != null && s.length() > 0;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void getSamplesDir()
+ {
+ Class clazz = getClass();
+ URL url = clazz.getResource("samples");
+ String filename = url.getPath();
+ samplesDir = new File(filename);
+ System.out.println("Samples Dir: " + filename);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void getSamples()
+ {
+ archives = samplesDir.listFiles(new ArchiveFilter());
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void setName(File f)
+ {
+ // note that ArchiveFilter guarantees that there will be a 4-character extension...
+ name = f.getName();
+ name = name.substring(0, name.length() - 4);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void setPort()
+ {
+ try
+ {
+ portInt = Integer.parseInt(port.value);
+ }
+ catch(NumberFormatException nfe)
+ {
+ throw new IllegalArgumentException("Bad port number: " + port.value);
+ }
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private void print(String s)
+ {
+ System.out.println(s);
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ public static void main(String[] args) throws Exception
+ {
+ DeploymentTestsUI tests = new DeploymentTestsUI();
+ tests.deployAll();
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private File[] archives;
+ private Cmd target;
+ private SimplePersistence persist;
+ private File archive;
+ private String name;
+ private String contextRoot;
+ private boolean enable = true;
+ private File samplesDir;
+ private int portInt = -1;
+ private NameValue user = new NameValue("user");
+ private NameValue password = new NameValue("password");
+ private NameValue host = new NameValue("host");
+ private NameValue port = new NameValue("port");
+ private NameValue appservTarget= new NameValue("target");
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private static class NameValue
+ {
+ private NameValue(String name)
+ {
+ this.name = name;
+ }
+ private final String name;
+ private String value;
+ }
+
+ private static class ArchiveFilter implements FileFilter
+ {
+ public boolean accept(File f)
+ {
+ // must end in .jar/.war/.rar/.ear
+
+ String name = f.getName();
+
+ return name.endsWith(".ear") || name.endsWith(".jar") || name.endsWith(".rar") || name.endsWith(".war");
+ }
+ }
+ private File getPersistenceFile()
+ {
+ String s = System.getProperty("user.name");
+
+ if(s != null && s.equals("bnevins"))
+ return new File("C:/tmp/DeploymentTestsUI.persist.properties");
+
+ return null;
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Env.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Env.java
index 56239c4..4c9c786 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Env.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Env.java
@@ -44,32 +44,32 @@
{
final TrustStoreTrustManager trustMgr = TrustStoreTrustManager.
getSystemInstance();
-
- // WBN -- NPE below if this is null, which is very likely if the System Props aren't
- //setup
-
-
- final HandshakeCompletedListenerImpl handshakeCompletedListener =
+
+ // WBN -- NPE below if this is null, which is very likely if the System Props aren't
+ //setup
+
+
+ final HandshakeCompletedListenerImpl handshakeCompletedListener =
new HandshakeCompletedListenerImpl();
- if(trustMgr == null)
- {
- javax.net.ssl.X509TrustManager tm = TrustAnyTrustManager.getInstance();
- return new TLSParams(tm, handshakeCompletedListener);
- }
+ if(trustMgr == null)
+ {
+ javax.net.ssl.X509TrustManager tm = TrustAnyTrustManager.getInstance();
+ return new TLSParams(tm, handshakeCompletedListener);
+ }
-
- trustMgr.setPrompt(true);
+
+ trustMgr.setPrompt(true);
return new TLSParams(trustMgr, handshakeCompletedListener);
}
public static boolean useTLS()
{
- // WBN -- if useTLS return false -- deployments fail 100% of the time.
- // so I'm switching this to always return true...
- return true;
+ // WBN -- if useTLS return false -- deployments fail 100% of the time.
+ // so I'm switching this to always return true...
+ return true;
//final String useTLS = System.getProperty(USE_TLS_SYSTEM_PROPERTY);
- //return ((useTLS != null) &&
+ //return ((useTLS != null) &&
//(useTLS.equals("true") || useTLS.equals("TRUE")));
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/InstanceLifecycleTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/InstanceLifecycleTest.java
index 0b29ec0..33fca5e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/InstanceLifecycleTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/InstanceLifecycleTest.java
@@ -28,7 +28,7 @@
public InstanceLifecycleTest(final String user, final String password,
final String host, final int port, final String instanceName,
- final String nodeAgentName, final String configName,
+ final String nodeAgentName, final String configName,
final Map optional)
{
final CmdChainCmd chain = new CmdChainCmd();
@@ -38,7 +38,7 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
final CreateInstanceCmd createInstanceCmd = cmdFactory.
- createCreateInstanceCmd(instanceName, nodeAgentName,
+ createCreateInstanceCmd(instanceName, nodeAgentName,
configName, optional);
final StartInstanceCmd startInstanceCmd = cmdFactory.
createStartInstanceCmd(instanceName);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JDBCConnectionPoolTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JDBCConnectionPoolTest.java
index e4f76de..2839349 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JDBCConnectionPoolTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JDBCConnectionPoolTest.java
@@ -35,20 +35,20 @@
static final String kTransactionIsolationLevel = "repeatable-read";
static final String kValidationTableName = "tab1";
- public JDBCConnectionPoolTest(final String user,
- final String password, final String host, final int port,
- final String name, final String datasourceClassname)
+ public JDBCConnectionPoolTest(final String user,
+ final String password, final String host, final int port,
+ final String name, final String datasourceClassname)
{
final CmdFactory cmdFactory = getCmdFactory();
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateJDBCConnectionPoolCmd createCmd =
+ final CreateJDBCConnectionPoolCmd createCmd =
cmdFactory.createCreateJDBCConnectionPoolCmd(name,
datasourceClassname, getOptional());
- final DeleteJDBCConnectionPoolCmd deleteCmd =
+ final DeleteJDBCConnectionPoolCmd deleteCmd =
cmdFactory.createDeleteJDBCConnectionPoolCmd(name);
final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
@@ -71,7 +71,7 @@
public static void main(String[] args) throws Exception
{
new JDBCConnectionPoolTest(
- "admin", "password", "localhost", 8686, kName,
+ "admin", "password", "localhost", 8686, kName,
kDatasourceClassname).run();
}
@@ -102,7 +102,7 @@
public Object execute() throws Exception
{
System.out.println("Name="+res.getName());
- System.out.println("DatasourceClassname="+
+ System.out.println("DatasourceClassname="+
res.getDatasourceClassname());
System.out.println("ResType="+ res.getResType());
System.out.println("SteadyPoolSize="+res.getSteadyPoolSize());
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JDBCResourceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JDBCResourceTest.java
index 7678054..476ed7b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JDBCResourceTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JDBCResourceTest.java
@@ -31,8 +31,8 @@
static final String kPoolName = "__TimerPool";
static final String kObjectType = "user";
- public JDBCResourceTest(final String user,
- final String password, final String host, final int port,
+ public JDBCResourceTest(final String user,
+ final String password, final String host, final int port,
final String jndiName, final String poolName)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -40,11 +40,11 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateJDBCResourceCmd createCmd =
- cmdFactory.createCreateJDBCResourceCmd(jndiName,
+ final CreateJDBCResourceCmd createCmd =
+ cmdFactory.createCreateJDBCResourceCmd(jndiName,
poolName, getOptional());
- final DeleteJDBCResourceCmd deleteCmd =
+ final DeleteJDBCResourceCmd deleteCmd =
cmdFactory.createDeleteJDBCResourceCmd(jndiName);
final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
@@ -66,14 +66,14 @@
public static void main(String[] args) throws Exception
{
- new JDBCResourceTest("admin", "password", "localhost", 8686,
- kJNDIName, kPoolName).run();
+ new JDBCResourceTest("admin", "password", "localhost", 8686,
+ kJNDIName, kPoolName).run();
}
private Map getOptional()
{
final Map optional = new HashMap();
- //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
//kObjectType);
return optional;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JNDIResourceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JNDIResourceTest.java
index fc341ac..7f04324 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JNDIResourceTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/JNDIResourceTest.java
@@ -34,9 +34,9 @@
static final String kFactoryClass = "a.b.c";
static final String kObjectType = "user";
- public JNDIResourceTest(final String user,
- final String password, final String host, final int port,
- final String jndiName, final String jndiLookupName,
+ public JNDIResourceTest(final String user,
+ final String password, final String host, final int port,
+ final String jndiName, final String jndiLookupName,
final String resType, final String factoryClass)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -44,11 +44,11 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateJNDIResourceCmd createCmd =
+ final CreateJNDIResourceCmd createCmd =
cmdFactory.createCreateJNDIResourceCmd(jndiName,
jndiLookupName, resType, factoryClass, getOptional());
- final DeleteJNDIResourceCmd deleteCmd =
+ final DeleteJNDIResourceCmd deleteCmd =
cmdFactory.createDeleteJNDIResourceCmd(jndiName);
final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
@@ -71,14 +71,14 @@
public static void main(String[] args) throws Exception
{
new JNDIResourceTest(
- "admin", "adminadmin", "localhost", 8686,
+ "admin", "adminadmin", "localhost", 8686,
kJNDIName, kJNDILookupName, kResType, kFactoryClass).run();
}
private Map getOptional()
{
final Map optional = new HashMap();
- //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
//kObjectType);
return optional;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListDeployedAppsCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListDeployedAppsCmd.java
index dae097f..96a2659 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListDeployedAppsCmd.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListDeployedAppsCmd.java
@@ -60,10 +60,10 @@
final Set s2 = getDeployedItemRefs(target);
- Set[] sets = new Set[] { s1, s2};
-
- return sets;
- //return intersect(s1, s2);
+ Set[] sets = new Set[] { s1, s2};
+
+ return sets;
+ //return intersect(s1, s2);
}
@@ -84,22 +84,22 @@
private Set getDeployedItemRefs(final String target) throws Exception
{
- Object o = getClusterOrServer(target);
-
- if(o == null)
- throw new Exception("Can't find config for this target.");
-
- if(o instanceof ServerConfig)
- return ((ServerConfig)o).getDeployedItemRefConfigMap().keySet();
+ Object o = getClusterOrServer(target);
- if(o instanceof ClusterConfig)
- return ((ClusterConfig)o).getDeployedItemRefConfigMap().keySet();
+ if(o == null)
+ throw new Exception("Can't find config for this target.");
- if(o instanceof ClusteredServerConfig)
- return ((ClusteredServerConfig)o).getDeployedItemRefConfigMap().keySet();
-
- throw new RuntimeException("???");
- }
+ if(o instanceof ServerConfig)
+ return ((ServerConfig)o).getDeployedItemRefConfigMap().keySet();
+
+ if(o instanceof ClusterConfig)
+ return ((ClusterConfig)o).getDeployedItemRefConfigMap().keySet();
+
+ if(o instanceof ClusteredServerConfig)
+ return ((ClusteredServerConfig)o).getDeployedItemRefConfigMap().keySet();
+
+ throw new RuntimeException("???");
+ }
private String getAppType()
{
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListDeployedAppsTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListDeployedAppsTest.java
index 1fa3d00..1359662 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListDeployedAppsTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ListDeployedAppsTest.java
@@ -44,25 +44,25 @@
{
Set[] sets = (Set[])targetCmd.execute();
- //System.out.println("Set1: " + sets[0]);
- //System.out.println("Set2: " + sets[1]);
-
- if(sets.length > 1)
- sets[0].retainAll(sets[1]);
-
- results = new String[sets[0].size()];
- sets[0].toArray(results);
+ //System.out.println("Set1: " + sets[0]);
+ //System.out.println("Set2: " + sets[1]);
+
+ if(sets.length > 1)
+ sets[0].retainAll(sets[1]);
+
+ results = new String[sets[0].size()];
+ sets[0].toArray(results);
}
- String[] getResults()
- {
- return results;
- }
+ String[] getResults()
+ {
+ return results;
+ }
public static void main(String[] args) throws Exception
{
- new ListDeployedAppsTest("admin", "password", "localhost", 8686,
+ new ListDeployedAppsTest("admin", "password", "localhost", 8686,
args[0], args[1]).run();
}
-
- private String[] results;
+
+ private String[] results;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/MailResourceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/MailResourceTest.java
index 5ff8e16..b51217f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/MailResourceTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/MailResourceTest.java
@@ -40,9 +40,9 @@
static final String kTransportProtocol = "smtp";
static final String kTransportProtocolClass = "com.sun.mail.smtp.SMTPTransport";
- public MailResourceTest(final String user,
- final String password, final String host, final int port,
- final String jndiName, final String rHost,
+ public MailResourceTest(final String user,
+ final String password, final String host, final int port,
+ final String jndiName, final String rHost,
final String rUser, final String rFrom)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -50,11 +50,11 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateMailResourceCmd createCmd =
+ final CreateMailResourceCmd createCmd =
cmdFactory.createCreateMailResourceCmd(jndiName,
rHost, rUser, rFrom, getOptional());
- final DeleteMailResourceCmd deleteCmd =
+ final DeleteMailResourceCmd deleteCmd =
cmdFactory.createDeleteMailResourceCmd(jndiName);
final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
@@ -77,14 +77,14 @@
public static void main(String[] args) throws Exception
{
new MailResourceTest(
- "admin", "password", "localhost", 8686,
+ "admin", "password", "localhost", 8686,
kJNDIName, kHost, kUser, kFrom).run();
}
private Map getOptional()
{
final Map optional = new HashMap();
- //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
//kObjectType);
optional.put(MailResourceConfigKeys.DEBUG_KEY, kDebug);
return optional;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/PMFResourceTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/PMFResourceTest.java
index 7a003d4..8329d2e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/PMFResourceTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/PMFResourceTest.java
@@ -34,8 +34,8 @@
static final String kFactoryClass = "a.b.c";
static final String kObjectType = "user";
- public PMFResourceTest(final String user,
- final String password, final String host, final int port,
+ public PMFResourceTest(final String user,
+ final String password, final String host, final int port,
final String jndiName)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -43,10 +43,10 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreatePMFResourceCmd createCmd =
+ final CreatePMFResourceCmd createCmd =
cmdFactory.createCreatePMFResourceCmd(jndiName, getOptional());
- final DeletePMFResourceCmd deleteCmd =
+ final DeletePMFResourceCmd deleteCmd =
cmdFactory.createDeletePMFResourceCmd(jndiName);
final PipeCmd p1 = new PipeCmd(connectCmd, createCmd);
@@ -68,18 +68,18 @@
public static void main(String[] args) throws Exception
{
- new PMFResourceTest("admin", "password", "localhost", 8686,
- kJNDIName).run();
+ new PMFResourceTest("admin", "password", "localhost", 8686,
+ kJNDIName).run();
}
private Map getOptional()
{
final Map optional = new HashMap();
- //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
//kObjectType);
- optional.put(PersistenceManagerFactoryResourceConfigKeys.JDBC_RESOURCE_JNDI_NAME_KEY,
+ optional.put(PersistenceManagerFactoryResourceConfigKeys.JDBC_RESOURCE_JNDI_NAME_KEY,
kJDBCResourceJNDIName);
- optional.put(PersistenceManagerFactoryResourceConfigKeys.FACTORY_CLASS_KEY,
+ optional.put(PersistenceManagerFactoryResourceConfigKeys.FACTORY_CLASS_KEY,
kFactoryClass);
return optional;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Phup.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Phup.java
index c5bd3b9..c17c284 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Phup.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Phup.java
@@ -32,63 +32,63 @@
*/
class Phup
{
- Phup(int port, String host, String user, String password)
- {
- this.port = port;
- this.host = host;
- this.user = user;
- this.password = password;
- }
-
- ///////////////////////////////////////////////////////////////////////////
+ Phup(int port, String host, String user, String password)
+ {
+ this.port = port;
+ this.host = host;
+ this.user = user;
+ this.password = password;
+ }
- Phup(String port, String host, String user, String password) throws DeploymentTestsException
- {
- this.port = string2int(port);
- this.host = host;
- this.user = user;
- this.password = password;
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- Phup(Properties props) throws DeploymentTestsException
- {
- user = props.getProperty("user");
- password = props.getProperty("password");
- host = props.getProperty("host");
-
- if(user == null || password == null || host == null)
- throw new DeploymentTestsException("Can't find user and/or password and/or host in Properties file.");
+ ///////////////////////////////////////////////////////////////////////////
- // string2int validates...
- port = string2int(props.getProperty("port"));
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- private static int string2int(String s) throws DeploymentTestsException
- {
- try
- {
- int i = Integer.parseInt(s);
-
- if(i <= 0 || i > 65535)
- throw new NumberFormatException();
-
- return i;
- }
- catch(NumberFormatException nfe)
- {
- throw new DeploymentTestsException("Bad port number: " + s);
- }
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- // note that these have default scope...
- String user;
- String password;
- String host;
- int port;
+ Phup(String port, String host, String user, String password) throws DeploymentTestsException
+ {
+ this.port = string2int(port);
+ this.host = host;
+ this.user = user;
+ this.password = password;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ Phup(Properties props) throws DeploymentTestsException
+ {
+ user = props.getProperty("user");
+ password = props.getProperty("password");
+ host = props.getProperty("host");
+
+ if(user == null || password == null || host == null)
+ throw new DeploymentTestsException("Can't find user and/or password and/or host in Properties file.");
+
+ // string2int validates...
+ port = string2int(props.getProperty("port"));
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private static int string2int(String s) throws DeploymentTestsException
+ {
+ try
+ {
+ int i = Integer.parseInt(s);
+
+ if(i <= 0 || i > 65535)
+ throw new NumberFormatException();
+
+ return i;
+ }
+ catch(NumberFormatException nfe)
+ {
+ throw new DeploymentTestsException("Bad port number: " + s);
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ // note that these have default scope...
+ String user;
+ String password;
+ String host;
+ int port;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ResourceAdapterConfigTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ResourceAdapterConfigTest.java
index 7d49060..0085247 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ResourceAdapterConfigTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/ResourceAdapterConfigTest.java
@@ -34,8 +34,8 @@
static final String kName = "someName";
static final String kRACName = "myResourceAdapter";
- public ResourceAdapterConfigTest(final String user,
- final String password, final String host, final int port,
+ public ResourceAdapterConfigTest(final String user,
+ final String password, final String host, final int port,
final String racName)
{
final CmdFactory cmdFactory = getCmdFactory();
@@ -43,11 +43,11 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final CreateResourceAdapterConfigCmd createRACCmd =
+ final CreateResourceAdapterConfigCmd createRACCmd =
cmdFactory.createCreateResourceAdapterConfigCmd(racName,
getOptional());
- final DeleteResourceAdapterConfigCmd deleteRACCmd =
+ final DeleteResourceAdapterConfigCmd deleteRACCmd =
cmdFactory.createDeleteResourceAdapterConfigCmd(racName);
final PipeCmd p1 = new PipeCmd(connectCmd, createRACCmd);
@@ -77,9 +77,9 @@
{
final Map optional = new HashMap(3);
- optional.put(ResourceAdapterConfigKeys.THREAD_POOL_IDS_KEY,
+ optional.put(ResourceAdapterConfigKeys.THREAD_POOL_IDS_KEY,
kThreadPoolIDs);
- //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
+ //optional.put(CreateResourceKeys.RESOURCE_OBJECT_TYPE_KEY,
//kObjectType);
System.out.println("Remove hard coded Name");
optional.put("Name", kName);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SampleGetter.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SampleGetter.java
index 835676b..ee1fc41 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SampleGetter.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SampleGetter.java
@@ -31,75 +31,75 @@
*/
class SampleGetter
{
- SampleGetter(Properties p)
- {
- props = p;
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- List getSampleList() throws DeploymentTestsException
- {
- String sampleDir = props.getProperty("sampledir");
+ SampleGetter(Properties p)
+ {
+ props = p;
+ }
- if(sampleDir != null && sampleDir.length() > 0)
- return getSampleListFromDir(sampleDir);
- else
- return getSampleListFromProps();
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private List getSampleListFromDir(String dirName) throws DeploymentTestsException
- {
- // sampledir has a value in the properties file. We are committed. If
- // there are any problems, it is an error and we don't try to get explicit
- // samples from the props file.
-
- String usage = "Put some sample files in a directory" +
- " and specify it in the properties file like so: \"sampledir=./samples\"";
-
- File samplesDir = Utils.safeGetCanonicalFile(new File(dirName));
+ ///////////////////////////////////////////////////////////////////////////
- // does the directory exist?
- if(! (samplesDir.exists() && samplesDir.isDirectory()))
- throw new DeploymentTestsException("samples dir doesn't exist or is not a directory (" +
- samplesDir + ").\n" + usage);
+ List getSampleList() throws DeploymentTestsException
+ {
+ String sampleDir = props.getProperty("sampledir");
- List samples = new ArrayList();
+ if(sampleDir != null && sampleDir.length() > 0)
+ return getSampleListFromDir(sampleDir);
+ else
+ return getSampleListFromProps();
+ }
- // does the directory have sample archive files in it?
- File[] sampleFiles = samplesDir.listFiles(new Utils.ArchiveFilter());
+ ///////////////////////////////////////////////////////////////////////////
- for(int i = 0; sampleFiles != null && i < sampleFiles.length; i++)
- {
- samples.add(new Utils.Sample(sampleFiles[i]));
- }
-
- // now look for dir-deploys...
- sampleFiles = samplesDir.listFiles(new Utils.DirDeployFilter());
-
- for(int i = 0; sampleFiles != null && i < sampleFiles.length; i++)
- {
- samples.add(new Utils.Sample(sampleFiles[i]));
- //System.err.println("ZZZZZZ dir-deploy: " + sampleFiles[i]);
- //System.exit(1);
- }
+ private List getSampleListFromDir(String dirName) throws DeploymentTestsException
+ {
+ // sampledir has a value in the properties file. We are committed. If
+ // there are any problems, it is an error and we don't try to get explicit
+ // samples from the props file.
- if(samples.size() <= 0)
- throw new DeploymentTestsException("No samples in " + samplesDir + ".\n" + usage);
+ String usage = "Put some sample files in a directory" +
+ " and specify it in the properties file like so: \"sampledir=./samples\"";
- return samples;
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private List getSampleListFromProps() throws DeploymentTestsException
- {
- throw new DeploymentTestsException("Not Implemented Yet!");
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- private Properties props;
+ File samplesDir = Utils.safeGetCanonicalFile(new File(dirName));
+
+ // does the directory exist?
+ if(! (samplesDir.exists() && samplesDir.isDirectory()))
+ throw new DeploymentTestsException("samples dir doesn't exist or is not a directory (" +
+ samplesDir + ").\n" + usage);
+
+ List samples = new ArrayList();
+
+ // does the directory have sample archive files in it?
+ File[] sampleFiles = samplesDir.listFiles(new Utils.ArchiveFilter());
+
+ for(int i = 0; sampleFiles != null && i < sampleFiles.length; i++)
+ {
+ samples.add(new Utils.Sample(sampleFiles[i]));
+ }
+
+ // now look for dir-deploys...
+ sampleFiles = samplesDir.listFiles(new Utils.DirDeployFilter());
+
+ for(int i = 0; sampleFiles != null && i < sampleFiles.length; i++)
+ {
+ samples.add(new Utils.Sample(sampleFiles[i]));
+ //System.err.println("ZZZZZZ dir-deploy: " + sampleFiles[i]);
+ //System.exit(1);
+ }
+
+ if(samples.size() <= 0)
+ throw new DeploymentTestsException("No samples in " + samplesDir + ".\n" + usage);
+
+ return samples;
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private List getSampleListFromProps() throws DeploymentTestsException
+ {
+ throw new DeploymentTestsException("Not Implemented Yet!");
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ private Properties props;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SimplePersistence.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SimplePersistence.java
index b6fcd83..b900d12 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SimplePersistence.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/SimplePersistence.java
@@ -33,203 +33,203 @@
public class SimplePersistence
{
- public SimplePersistence(Object o)
- {
- this(o, null, true);
- }
+ public SimplePersistence(Object o)
+ {
+ this(o, null, true);
+ }
- //////////////////////////////////////////////////////////////////////////
-
- public SimplePersistence(Object o, boolean autoFlush)
- {
- this(o, null, autoFlush);
- }
+ //////////////////////////////////////////////////////////////////////////
- //////////////////////////////////////////////////////////////////////////
-
- public SimplePersistence(Object o, String fname)
- {
- this(o, fname, true);
- }
+ public SimplePersistence(Object o, boolean autoFlush)
+ {
+ this(o, null, autoFlush);
+ }
- //////////////////////////////////////////////////////////////////////////
-
- public SimplePersistence(Object o, String fname, boolean autoFlush)
- {
- persistenceFileRootName = fname;
- this.autoFlush = autoFlush;
- init(o);
- load();
- }
+ //////////////////////////////////////////////////////////////////////////
- //////////////////////////////////////////////////////////////////////////
-
- public SimplePersistence(File f)
- {
- this(f, true);
- }
+ public SimplePersistence(Object o, String fname)
+ {
+ this(o, fname, true);
+ }
- //////////////////////////////////////////////////////////////////////////
-
- public SimplePersistence(File f, boolean autoFlush)
- {
- persistenceFile =f;
- this.autoFlush = autoFlush;
-
- if(!persistenceFile.exists())
- store();
+ //////////////////////////////////////////////////////////////////////////
- load();
- }
+ public SimplePersistence(Object o, String fname, boolean autoFlush)
+ {
+ persistenceFileRootName = fname;
+ this.autoFlush = autoFlush;
+ init(o);
+ load();
+ }
- //////////////////////////////////////////////////////////////////////////
-
- public String getProperty(String key)
- {
- return props.getProperty(key);
- }
+ //////////////////////////////////////////////////////////////////////////
- //////////////////////////////////////////////////////////////////////////
-
- public Properties getProperties()
- {
- return props;
- }
+ public SimplePersistence(File f)
+ {
+ this(f, true);
+ }
- //////////////////////////////////////////////////////////////////////////
-
- public void setProperty(String key, String value)
- {
- props.setProperty(key, value);
-
- if(autoFlush)
- store();
- }
-
- //////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////
- public void store()
- {
- try
- {
- OutputStream os = new FileOutputStream(persistenceFile);
- props.store(os, "Simple Persistence Properties");
- os.close();
- }
- catch(IOException e)
- {
- e.printStackTrace();
- }
- }
-
- //////////////////////////////////////////////////////////////////////////
+ public SimplePersistence(File f, boolean autoFlush)
+ {
+ persistenceFile =f;
+ this.autoFlush = autoFlush;
- public final void clear()
- {
- props.clear();
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- private void init(Object o)
- {
- Class clazz = o.getClass();
- Package pkg = clazz.getPackage();
-
- // we need the name of a file in the caller's package. ANY file will do!
- // so we use the caller's .class file
-
- final String classFileName = clazz.getName().substring(pkg.getName().length() + 1) + ".class";
-
- URL url = clazz.getResource(classFileName);
- String filename = url.getPath();
-
- if(canWrite(filename))
- {
- // make the properties filename simple
- if(persistenceFileRootName == null)
- persistenceFileRootName = "persist.properties";
-
- filename = filename.substring(0, filename.indexOf(classFileName));
- filename += persistenceFileRootName;
- persistenceFile = new File(filename);
- }
- else
- {
- // make the properties filename equal to the package name
- // to avoid conflicts with other callers.
- if(persistenceFileRootName == null)
- persistenceFileRootName = pkg.getName() + ".properties";
-
- // most likely -- we are running from a jar!
- persistenceFile = new File(System.getProperty("java.io.tmpdir"));
- persistenceFile = new File(persistenceFile, persistenceFileRootName);
- }
+ if(!persistenceFile.exists())
+ store();
- if(!persistenceFile.exists())
- {
- // write an empty file...
- store();
- }
-
- System.out.println("Persistence File: " + persistenceFile.getAbsolutePath());
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- private void load()
- {
- try
- {
- InputStream in = new FileInputStream(persistenceFile);
- props.load(in);
- in.close();
- System.out.println(props);
- }
- catch(IOException e)
- {
- e.printStackTrace();
- }
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- private boolean canWrite(String fname)
- {
- File f = new File(fname);
-
- if(f.exists())
- {
- return f.canWrite();
- }
-
- try
- {
- return f.createNewFile();
- }
- catch(IOException e)
- {
- return false;
- }
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- private Properties props = new Properties();
- private File persistenceFile;
- private Class caller;
- private String persistenceFileRootName;
- private boolean autoFlush;
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args)
- {
- class foo {}
- SimplePersistence sp = new SimplePersistence(new foo(), true);
- sp.setProperty("foo", "goo");
- //m.getProps();
- }
-
+ load();
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ public String getProperty(String key)
+ {
+ return props.getProperty(key);
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ public Properties getProperties()
+ {
+ return props;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ public void setProperty(String key, String value)
+ {
+ props.setProperty(key, value);
+
+ if(autoFlush)
+ store();
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ public void store()
+ {
+ try
+ {
+ OutputStream os = new FileOutputStream(persistenceFile);
+ props.store(os, "Simple Persistence Properties");
+ os.close();
+ }
+ catch(IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ public final void clear()
+ {
+ props.clear();
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private void init(Object o)
+ {
+ Class clazz = o.getClass();
+ Package pkg = clazz.getPackage();
+
+ // we need the name of a file in the caller's package. ANY file will do!
+ // so we use the caller's .class file
+
+ final String classFileName = clazz.getName().substring(pkg.getName().length() + 1) + ".class";
+
+ URL url = clazz.getResource(classFileName);
+ String filename = url.getPath();
+
+ if(canWrite(filename))
+ {
+ // make the properties filename simple
+ if(persistenceFileRootName == null)
+ persistenceFileRootName = "persist.properties";
+
+ filename = filename.substring(0, filename.indexOf(classFileName));
+ filename += persistenceFileRootName;
+ persistenceFile = new File(filename);
+ }
+ else
+ {
+ // make the properties filename equal to the package name
+ // to avoid conflicts with other callers.
+ if(persistenceFileRootName == null)
+ persistenceFileRootName = pkg.getName() + ".properties";
+
+ // most likely -- we are running from a jar!
+ persistenceFile = new File(System.getProperty("java.io.tmpdir"));
+ persistenceFile = new File(persistenceFile, persistenceFileRootName);
+ }
+
+ if(!persistenceFile.exists())
+ {
+ // write an empty file...
+ store();
+ }
+
+ System.out.println("Persistence File: " + persistenceFile.getAbsolutePath());
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private void load()
+ {
+ try
+ {
+ InputStream in = new FileInputStream(persistenceFile);
+ props.load(in);
+ in.close();
+ System.out.println(props);
+ }
+ catch(IOException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private boolean canWrite(String fname)
+ {
+ File f = new File(fname);
+
+ if(f.exists())
+ {
+ return f.canWrite();
+ }
+
+ try
+ {
+ return f.createNewFile();
+ }
+ catch(IOException e)
+ {
+ return false;
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ private Properties props = new Properties();
+ private File persistenceFile;
+ private Class caller;
+ private String persistenceFileRootName;
+ private boolean autoFlush;
+ /**
+ * @param args the command line arguments
+ */
+ public static void main(String[] args)
+ {
+ class foo {}
+ SimplePersistence sp = new SimplePersistence(new foo(), true);
+ sp.setProperty("foo", "goo");
+ //m.getProps();
+ }
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopClusterTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopClusterTest.java
index 1f4ec37..590ac5d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopClusterTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/StopClusterTest.java
@@ -30,7 +30,7 @@
final ConnectCmd connectCmd = cmdFactory.createConnectCmd(
user, password, host, port);
- final StopClusterCmd stopClusterCmd =
+ final StopClusterCmd stopClusterCmd =
cmdFactory.createStopClusterCmd(clusterName);
target = new PipeCmd(connectCmd, stopClusterCmd);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Tee.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Tee.java
index 052db04..1ca2b38 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Tee.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Tee.java
@@ -24,124 +24,124 @@
import java.io.*;
-public class Tee extends PrintStream
+public class Tee extends PrintStream
{
- /////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
- private Tee(PrintStream ps)
- {
- super(ps);
- }
+ private Tee(PrintStream ps)
+ {
+ super(ps);
+ }
- /////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
- // Starts copying stdout and
- //stderr to the file f.
- public static void start(String f) throws IOException
- {
- // Save old settings.
- oldStdout = System.out;
- //oldStderr = System.err;
+ // Starts copying stdout and
+ //stderr to the file f.
+ public static void start(String f) throws IOException
+ {
+ // Save old settings.
+ oldStdout = System.out;
+ //oldStderr = System.err;
- // Create/Open logfile.
- logfile = new PrintStream(new BufferedOutputStream(new FileOutputStream(f)));
+ // Create/Open logfile.
+ logfile = new PrintStream(new BufferedOutputStream(new FileOutputStream(f)));
- // Start redirecting the output.
- System.setOut(new Tee(System.out));
- //System.setErr(new Tee(System.err));
- }
+ // Start redirecting the output.
+ System.setOut(new Tee(System.out));
+ //System.setErr(new Tee(System.err));
+ }
- /////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
- // Restores the original settings.
- public static void stop()
- {
- System.setOut(oldStdout);
- //System.setErr(oldStderr);
-
- try
- {
- logfile.close();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
+ // Restores the original settings.
+ public static void stop()
+ {
+ System.setOut(oldStdout);
+ //System.setErr(oldStderr);
+
+ try
+ {
+ logfile.close();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
- /////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
- // PrintStream override.
- public void write(int b)
- {
- try
- {
- logfile.write(b);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- setError();
- }
- super.write(b);
- }
+ // PrintStream override.
+ public void write(int b)
+ {
+ try
+ {
+ logfile.write(b);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ setError();
+ }
+ super.write(b);
+ }
- /////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
- // PrintStream override.
- public void write(byte buf[], int off, int len)
- {
- try
- {
- logfile.write(buf, off, len);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- setError();
- }
- super.write(buf, off, len);
- }
+ // PrintStream override.
+ public void write(byte buf[], int off, int len)
+ {
+ try
+ {
+ logfile.write(buf, off, len);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ setError();
+ }
+ super.write(buf, off, len);
+ }
- /////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
- static OutputStream logfile;
- static PrintStream oldStdout;
- //static PrintStream oldStderr;
+ static OutputStream logfile;
+ static PrintStream oldStdout;
+ //static PrintStream oldStderr;
- /////////////////////////////////////////////////////////////////
+ /////////////////////////////////////////////////////////////////
- public static void main(String[] args)
- {
- try
- {
- // Start capturing characters
- //into the log file.
- Tee.start("log.txt");
+ public static void main(String[] args)
+ {
+ try
+ {
+ // Start capturing characters
+ //into the log file.
+ Tee.start("log.txt");
- // Test it.
- System.out.println(
- "Here's is some stuff to stdout.");
- System.err.println(
- "Here's is some stuff to stderr.");
- System.out.println(
- "Let's throw an exception...");
- new Exception().printStackTrace();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- finally
- {
- // Stop capturing characters
- //into the log file
- // and restore old setup.
- Tee.stop();
- }
- }
+ // Test it.
+ System.out.println(
+ "Here's is some stuff to stdout.");
+ System.err.println(
+ "Here's is some stuff to stderr.");
+ System.out.println(
+ "Let's throw an exception...");
+ new Exception().printStackTrace();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ finally
+ {
+ // Stop capturing characters
+ //into the log file
+ // and restore old setup.
+ Tee.stop();
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/UndeployCmd.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/UndeployCmd.java
index 6caa7f0..133ff2a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/UndeployCmd.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/UndeployCmd.java
@@ -42,19 +42,19 @@
protected void undeploy() throws Exception
{
- final String appName = getAppName();
- final DeploymentMgr deployMgr = getDeploymentMgr();
+ final String appName = getAppName();
+ final DeploymentMgr deployMgr = getDeploymentMgr();
if (!DEFAULT_DEPLOY_TARGET.equals(getTarget()))
{
- final DeployedItemRefConfigCR refMgr =
+ final DeployedItemRefConfigCR refMgr =
getDeployedItemRefConfigCR();
stopApp();
refMgr.removeDeployedItemRefConfig(appName);
}
final Map statusData = deployMgr.undeploy(appName, null);
- final DeploymentStatus status =
+ final DeploymentStatus status =
DeploymentSupport.mapToDeploymentStatus( statusData );
checkFailed(checkForException(status));
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/UndeploymentTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/UndeploymentTest.java
index e34db58..547f5d2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/UndeploymentTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/UndeploymentTest.java
@@ -22,7 +22,7 @@
{
private Cmd cmd;
- public UndeploymentTest(String user, String password, String host,
+ public UndeploymentTest(String user, String password, String host,
int port, String name, String target)
{
CmdFactory cmdFactory = getCmdFactory();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Utils.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Utils.java
index 10c9ef0..df17b28 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Utils.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/Utils.java
@@ -31,81 +31,81 @@
*/
class Utils
{
- private Utils()
- {
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- static boolean ok(String s)
- {
- return s != null && s.length() > 0;
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- static File safeGetCanonicalFile(File f)
- {
- try
- {
- return f.getCanonicalFile();
- }
- catch(IOException ioe)
- {
- return f.getAbsoluteFile();
- }
- }
-
- ///////////////////////////////////////////////////////////////////////////
-
- public static void messageBox(String msg, String title)
- {
- JOptionPane.showMessageDialog(null, msg, title, JOptionPane.INFORMATION_MESSAGE);
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- static class ArchiveFilter implements FileFilter
- {
- public boolean accept(File f)
- {
- // must end in .jar/.war/.rar/.ear
-
- String name = f.getName();
-
- return name.endsWith(".ear") || name.endsWith(".jar") || name.endsWith(".rar") || name.endsWith(".war");
- }
- }
-
- //////////////////////////////////////////////////////////////////////////
-
- static class DirDeployFilter implements FileFilter
- {
- public boolean accept(File f)
- {
- String name = f.getName().toLowerCase();
-
- if(name.startsWith("meta-inf"))
- return false;
-
- return f.isDirectory();
- }
- }
- public static class Sample
- {
- public String toString()
- {
- return "Sample: name = " + name + ", path= " + file;
- }
- public Sample(File f)
- {
- file = f;
- name = f.getName();
-
- if(!f.isDirectory())
- name = name.substring(0, name.length() - 4);
- }
- String name;
- File file;
- }
+ private Utils()
+ {
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ static boolean ok(String s)
+ {
+ return s != null && s.length() > 0;
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ static File safeGetCanonicalFile(File f)
+ {
+ try
+ {
+ return f.getCanonicalFile();
+ }
+ catch(IOException ioe)
+ {
+ return f.getAbsoluteFile();
+ }
+ }
+
+ ///////////////////////////////////////////////////////////////////////////
+
+ public static void messageBox(String msg, String title)
+ {
+ JOptionPane.showMessageDialog(null, msg, title, JOptionPane.INFORMATION_MESSAGE);
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ static class ArchiveFilter implements FileFilter
+ {
+ public boolean accept(File f)
+ {
+ // must end in .jar/.war/.rar/.ear
+
+ String name = f.getName();
+
+ return name.endsWith(".ear") || name.endsWith(".jar") || name.endsWith(".rar") || name.endsWith(".war");
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////////////
+
+ static class DirDeployFilter implements FileFilter
+ {
+ public boolean accept(File f)
+ {
+ String name = f.getName().toLowerCase();
+
+ if(name.startsWith("meta-inf"))
+ return false;
+
+ return f.isDirectory();
+ }
+ }
+ public static class Sample
+ {
+ public String toString()
+ {
+ return "Sample: name = " + name + ", path= " + file;
+ }
+ public Sample(File f)
+ {
+ file = f;
+ name = f.getName();
+
+ if(!f.isDirectory())
+ name = name.substring(0, name.length() - 4);
+ }
+ String name;
+ File file;
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/build.xml
index 6a289b2..9d76d04 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/build.xml
@@ -21,67 +21,67 @@
<property name="sample.home" value="../../../../"/>
<!-- ======================================================= -->
- <!-- App name-dependent settings. -->
+ <!-- App name-dependent settings. -->
<!-- ======================================================= -->
<property name="binary.name" value="SOAPtoJMSMessageSample"/>
-
+
<!-- ======================================================= -->
- <!-- Package directory structures of interest. -->
+ <!-- Package directory structures of interest. -->
<!-- ======================================================= -->
- <property name="app.pkg" value="samples/jms/soaptojms"/>
-
+ <property name="app.pkg" value="samples/jms/soaptojms"/>
+
<!-- ======================================================= -->
- <!-- Java Doc properties. -->
- <!-- ======================================================= -->
+ <!-- Java Doc properties. -->
+ <!-- ======================================================= -->
<property name="sample.name" value="simple"/>
<property name="javadoc.pkgnames" value="samples.jms.soaptojms.*" />
<!-- ======================================================= -->
- <!-- Include common.xml -->
+ <!-- Include common.xml -->
<!-- ======================================================= -->
-
+
&include;
-
+
<!-- ======================================================= -->
- <!-- Used by copy_binary target in common-ant.xml -->
- <!-- ======================================================= -->
+ <!-- Used by copy_binary target in common-ant.xml -->
+ <!-- ======================================================= -->
<property name="specificjar.dir" value="${sample.name}${appclient-dir-suffix}/${assemble.clientjar}/"/>
<property name="specificjar.name" value="${clientjar}"/>
-
+
<!-- ============================================================== -->
<!-- Resource specific properties. -->
<!-- ============================================================== -->
<property name="queue.factory.type" value="jakarta.jms.TopicConnectionFactory" />
- <property name="queue.factory.jndi.name" value="jms/TopicConnectionFactory" />
+ <property name="queue.factory.jndi.name" value="jms/TopicConnectionFactory" />
<property name="queue.type" value="jakarta.jms.Topic" />
<property name="queue.jndi.name" value="jms/TestTopic" />
<property name="queue.property.name" value="imqDestinationName" />
<property name="queue.property.value" value="TestTopic" />
-
-
-
+
+
+
<!-- ======================================================= -->
<!-- Tagets to run sample application -->
<!-- ======================================================= -->
- <target name="clean" depends="clean_all_common"/>
- <target name="init" depends="init_common"/>
- <target name="compile" depends="compile_common" />
-
+ <target name="clean" depends="clean_all_common"/>
+ <target name="init" depends="init_common"/>
+ <target name="compile" depends="compile_common" />
+
<target name="clientjar" depends="core_all_common"/>
-
-
- <target name="setup" depends=" init, deploy-jms-resource_common"/>
- <target name="unsetup" depends="init, undeploy-jms-resource_common"/>
-
- <target name="javadocs" depends="javadocs_all_common"/>
-
+
+
+ <target name="setup" depends=" init, deploy-jms-resource_common"/>
+ <target name="unsetup" depends="init, undeploy-jms-resource_common"/>
+
+ <target name="javadocs" depends="javadocs_all_common"/>
+
<target name="deploy" depends="setup"/>
<target name="all" depends="core,javadocs"/>
<target name="undeploy" depends="unsetup"/>
-
+
<target name="core" depends="clientjar" />
-
- <target name="verify" depends="verify_noop_common"/>
-
+
+ <target name="verify" depends="verify_noop_common"/>
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/build.xml
index 519827e..b430d36 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/build.xml
@@ -21,31 +21,31 @@
<property name="sample.home" value="../../../../../"/>
<!-- ======================================================= -->
- <!-- App name-dependent settings. -->
- <!-- ======================================================= -->
-
- <!-- ======================================================= -->
- <!-- Package directory structures of interest. -->
+ <!-- App name-dependent settings. -->
<!-- ======================================================= -->
- <property name="app.pkg" value="samples/jms/soaptojms"/>
+ <!-- ======================================================= -->
+ <!-- Package directory structures of interest. -->
+ <!-- ======================================================= -->
+
+ <property name="app.pkg" value="samples/jms/soaptojms"/>
<property name="clientjar.file" value="../${appname}Client.jar"/>
-
+
<!-- ======================================================= -->
- <!-- Java Doc properties. -->
- <!-- ======================================================= -->
+ <!-- Java Doc properties. -->
+ <!-- ======================================================= -->
<property name="javadoc.pkgnames" value="samples.jms.soaptojms.*" />
<!-- ======================================================= -->
- <!-- Xml files properties. -->
- <!-- ======================================================= -->
-
+ <!-- Xml files properties. -->
<!-- ======================================================= -->
- <!-- Include common.xml -->
+
<!-- ======================================================= -->
-
+ <!-- Include common.xml -->
+ <!-- ======================================================= -->
+
&include;
-
+
<!-- ======================================================= -->
<!-- Assemble CLIENT JAR module. -->
<!-- ======================================================= -->
@@ -53,7 +53,7 @@
<copy file="${basedir}/soaptojms.properties" toDir="${build.classesdir}/${app.pkg}/" />
<mkdir dir="${assemble.clientjar}"/>
<jar destfile="${assemble.clientjar}/${clientjar}" manifest="${src.conf}/MANIFEST.MF">
- <zipfileset dir="${build.classesdir}/${app.pkg}/"
+ <zipfileset dir="${build.classesdir}/${app.pkg}/"
includes="**/*.class, **/soaptojms.properties" excludes="**/servlet/"
prefix="${app.pkg}"/>
<metainf dir="${clientDD.dir}" includes="${clientDD}"/>
@@ -64,15 +64,15 @@
<!-- ======================================================= -->
<!-- Tagets to run sample application -->
<!-- ======================================================= -->
- <target name="clean" depends="clean_common"/>
- <target name="compile" depends="compile_common" />
+ <target name="clean" depends="clean_common"/>
+ <target name="compile" depends="compile_common" />
<target name="javadocs" depends="javadocs_common" />
<target name="clientjar" depends="init_common, clientjar_local"/>
- <target name="core" depends="compile, clientjar" />
- <target name="all" depends="core,javadocs"/>
+ <target name="core" depends="compile, clientjar" />
+ <target name="all" depends="core,javadocs"/>
<target name="copy_ear" depends="init_common">
- <delete file="../${clientjar}"/>
+ <delete file="../${clientjar}"/>
<copy file="${assemble.clientjar}/${clientjar}" todir=".." />
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/conf/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/conf/application-client.xml
index 37ff3d5..f934aa9 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/conf/application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/conf/application-client.xml
@@ -12,5 +12,5 @@
-->
<application-client version="1.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application-client_1_4.xsd">
- <display-name>SOAPMessageWithJMSClient</display-name>
+ <display-name>SOAPMessageWithJMSClient</display-name>
</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/JNDINames.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/JNDINames.java
index 86a8637..8022183 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/JNDINames.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/JNDINames.java
@@ -21,10 +21,10 @@
private JNDINames() { } //Prevents instantiation
// JNDI names of topic resources
- public static final String TOPIC_CONNECTION_FACTORY =
+ public static final String TOPIC_CONNECTION_FACTORY =
"jms/TopicConnectionFactory";
- public static final String TEST_MDB_TOPIC =
+ public static final String TEST_MDB_TOPIC =
"jms/TestTopic";
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/ReceiveSOAPMessageWithJMS.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/ReceiveSOAPMessageWithJMS.java
index c2e82ae..c88596a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/ReceiveSOAPMessageWithJMS.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/ReceiveSOAPMessageWithJMS.java
@@ -44,7 +44,7 @@
/**
* Default constructor.
*
- * @param topicName a String that contains the name of a JMS Topic
+ * @param topicName a String that contains the name of a JMS Topic
*
*/
public ReceiveSOAPMessageWithJMS(String topicName) {
@@ -54,7 +54,7 @@
/**
* JMS Connection/Session/Destination/MessageListener set ups.
*
- * @param topicName a String that contains the name of a JMS Topic
+ * @param topicName a String that contains the name of a JMS Topic
*/
public void init(String topicName) {
try {
@@ -66,12 +66,12 @@
/**
* JMS set up.
- */
+ */
ServiceLocator servicelocator = new ServiceLocator();
tcf = servicelocator.getTopicConnectionFactory(JNDINames.TOPIC_CONNECTION_FACTORY);
tc = tcf.createTopicConnection();
session = tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
- topic = servicelocator.getTopic(topicName);
+ topic = servicelocator.getTopic(topicName);
subscriber = session.createSubscriber(topic);
subscriber.setMessageListener( this );
tc.start();
@@ -81,9 +81,9 @@
} catch (Exception jmse) {
jmse.printStackTrace();
}
- }
-
-
+ }
+
+
/**
* JMS Messages are delivered to this method. The body of the message
* contains SOAP streams.
@@ -152,5 +152,5 @@
}
return;
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/SOAPMessageWithJMSClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/SOAPMessageWithJMSClient.java
index 084f19a..c251be5 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/SOAPMessageWithJMSClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/SOAPMessageWithJMSClient.java
@@ -33,16 +33,16 @@
* utility to convert JMS messages back to SOAP messages.
*/
public class SOAPMessageWithJMSClient {
-
- /**
+
+ /**
* The main program to send SOAP messages with JMS and ReceiveSOAPMessageWithJMS.
- */
+ */
public static void main (String[] args) {
String topicName = JNDINames.TEST_MDB_TOPIC;
String usage = "\nUsage: enter parameter Send or Receive (followed by optional Topic name). \n"+
"To Receive message: \"appclient -client SOAPtoJMSMessageSampleClient.jar Receive\" \n"+
- "To Send message: \"appclient -client SOAPtoJMSMessageSampleClient.jar Send\"";
+ "To Send message: \"appclient -client SOAPtoJMSMessageSampleClient.jar Send\"";
if (args.length > 0) {
if (args[0].equalsIgnoreCase("Receive")){
@@ -68,7 +68,7 @@
}
} else {
System.out.println(usage);
- }
+ }
} else {
System.out.println(usage);
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/SendSOAPMessageWithJMS.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/SendSOAPMessageWithJMS.java
index d41379b..73793ab 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/SendSOAPMessageWithJMS.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/SendSOAPMessageWithJMS.java
@@ -56,17 +56,17 @@
/**
* default constructor.
*
- * @param topicName a String that contains the name of a JMS Topic
+ * @param topicName a String that contains the name of a JMS Topic
*
*/
public SendSOAPMessageWithJMS(String topicName) {
init(topicName);
}
-
+
/**
* Initialize JMS Connection/Session/Topic and Publisher.
*
- * @param topicName a String that contains the name of a JMS Topic
+ * @param topicName a String that contains the name of a JMS Topic
*
*/
public void init(String topicName) {
@@ -75,8 +75,8 @@
tcf = servicelocator.getTopicConnectionFactory(JNDINames.TOPIC_CONNECTION_FACTORY);
tc = tcf.createTopicConnection();
session = tc.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
- topic = servicelocator.getTopic(topicName);
- publisher = session.createPublisher(topic);
+ topic = servicelocator.getTopic(topicName);
+ publisher = session.createPublisher(topic);
} catch (JMSException jmse) {
jmse.printStackTrace();
} catch(ServiceLocatorException se) {
@@ -96,7 +96,7 @@
/**
* Create a SOAP message object.
*/
- System.out.println ("Create a SOAP message");
+ System.out.println ("Create a SOAP message");
SOAPMessage soapMessage = mf.createMessage();
/**
* Get SOAP part.
@@ -128,9 +128,9 @@
/**
* Create an atachment with activation API.
*/
-
+
URL url = getUrlFromPropsFile();
- System.out.println ("Attaching the file from URL: " + url);
+ System.out.println ("Attaching the file from URL: " + url);
DataHandler dh = new DataHandler (url);
AttachmentPart ap = soapMessage.createAttachmentPart(dh);
@@ -149,38 +149,38 @@
/**
* Convert SOAP to JMS message.
*/
- System.out.println ("Convert the message to JMS message");
+ System.out.println ("Convert the message to JMS message");
Message m = MessageTransformer.SOAPMessageIntoJMSMessage( soapMessage, session );
/**
* publish JMS message.
*/
- System.out.println ("Publish the message");
+ System.out.println ("Publish the message");
publisher.publish( m );
}
-
+
/** Read server and port from soaptojms.properties file
*
*/
-
+
public URL getUrlFromPropsFile() throws Exception {
InputStream props = SendSOAPMessageWithJMS.class.getResourceAsStream("soaptojms.properties");
-
+
Properties P = new Properties();
P.load(props);
-
+
return (new URL(P.getProperty("url")));
}
-
-
+
+
/**
* Close JMS connection.
*
- * @exception JMSException
+ * @exception JMSException
*/
public void close() throws JMSException {
tc.close();
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/ServiceLocator.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/ServiceLocator.java
index a7cb7a2..d15cb42 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/ServiceLocator.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/com/sun/enterprise/admin/mbeanapi/deployment/samples/SOAPtoJMSMessageSampleClient/simple-client/src/java/samples/jms/soaptojms/ServiceLocator.java
@@ -32,19 +32,19 @@
*/
public class ServiceLocator {
- private InitialContext ic;
+ private InitialContext ic;
public ServiceLocator() throws ServiceLocatorException {
try {
- ic = new InitialContext();
+ ic = new InitialContext();
} catch (NamingException ne) {
throw new ServiceLocatorException(ne);
} catch (Exception e) {
throw new ServiceLocatorException(e);
- }
+ }
}
-
+
/**
* This method helps in obtaining the topic factory
* @return the factory for the factory to get topic connections from
@@ -52,7 +52,7 @@
public TopicConnectionFactory getTopicConnectionFactory(String topicConnFactoryName) throws ServiceLocatorException {
TopicConnectionFactory factory = null;
try {
- factory = (TopicConnectionFactory) ic.lookup(topicConnFactoryName);
+ factory = (TopicConnectionFactory) ic.lookup(topicConnFactoryName);
} catch (NamingException ne) {
ne.printStackTrace();
throw new ServiceLocatorException(ne);
@@ -62,8 +62,8 @@
}
return factory;
}
-
-
+
+
/**
* This method obtains the topc itself for a caller
* @return the Topic Destination to send messages to
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtests.bat b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtests.bat
index c821847..fb1fe30 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtests.bat
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtests.bat
@@ -1,12 +1,12 @@
-@echo off
-setlocal
-set base=../../../../../..
-set cp1=%base%/publish/JDK1.4_DBG.OBJ/admin-core/mbeanapi/lib/mbeanapi.jar
-set cp2=%base%/publish/JDK1.4_DBG.OBJ/jmx/lib/jmxri.jar
-set cp3=%base%/publish/JDK1.4_DBG.OBJ/rjmx-ri/jmxremote.jar
-set cp4=%base%/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build
-set cp=%cp1%;%cp2%;%cp3%;%cp4%
-
-java -cp %cp% -ea com.sun.enterprise.admin.mbeanapi.deployment.DeploymentTestsAuto
-
-
+@echo off
+setlocal
+set base=../../../../../..
+set cp1=%base%/publish/JDK1.4_DBG.OBJ/admin-core/mbeanapi/lib/mbeanapi.jar
+set cp2=%base%/publish/JDK1.4_DBG.OBJ/jmx/lib/jmxri.jar
+set cp3=%base%/publish/JDK1.4_DBG.OBJ/rjmx-ri/jmxremote.jar
+set cp4=%base%/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build
+set cp=%cp1%;%cp2%;%cp3%;%cp4%
+
+java -cp %cp% -ea com.sun.enterprise.admin.mbeanapi.deployment.DeploymentTestsAuto
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtestsUI.bat b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtestsUI.bat
index 8bef4c8..5ef9aea 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtestsUI.bat
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/runtestsUI.bat
@@ -1,13 +1,13 @@
-@echo off
-setlocal
-set base=../../../../../..
-set cp1=%base%/publish/JDK1.4_DBG.OBJ/admin-core/mbeanapi/lib/mbeanapi.jar
-set cp2=%base%/publish/JDK1.4_DBG.OBJ/jmx/lib/jmxri.jar
-set cp3=%base%/publish/JDK1.4_DBG.OBJ/rjmx-ri/jmxremote.jar
-set cp4=%base%/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build
-set cp=%cp1%;%cp2%;%cp3%;%cp4%
-
-java -cp %cp% -ea com.sun.enterprise.admin.mbeanapi.deployment.DeploymentTestsUI
-
-
-
+@echo off
+setlocal
+set base=../../../../../..
+set cp1=%base%/publish/JDK1.4_DBG.OBJ/admin-core/mbeanapi/lib/mbeanapi.jar
+set cp2=%base%/publish/JDK1.4_DBG.OBJ/jmx/lib/jmxri.jar
+set cp3=%base%/publish/JDK1.4_DBG.OBJ/rjmx-ri/jmxremote.jar
+set cp4=%base%/appserv-tests/devtests/ee/admin/mbeanapi/deployment/build
+set cp=%cp1%;%cp2%;%cp3%;%cp4%
+
+java -cp %cp% -ea com.sun.enterprise.admin.mbeanapi.deployment.DeploymentTestsUI
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/test.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/test.xml
index 9932aad..0c27821 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/test.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/deployment/test.xml
@@ -21,7 +21,7 @@
<target name="init-common" depends="">
<echo message="Loading props from file ${env.APS_HOME}/config.properties" level="verbose"/>
- <property file="./config.properties"/>
+ <property file="./config.properties"/>
<echo message="admin.user ${admin.user}" />
<echo message="admin.password ${admin.password}" />
<echo message="admin.host ${admin.host}" />
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/build.properties
index 57cdf1d..9f2f6c3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/build.properties
@@ -15,7 +15,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="ee" value="enterprise edition"/>
<property name="appserver.instance.name" value="server"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/build.xml
index b9c6a25..63552c9 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/build.xml
@@ -27,8 +27,8 @@
<project name="ee-synchronization" default="usage" basedir=".">
- &commonSetup;
- &commonBuild;
+ &commonSetup;
+ &commonBuild;
&eeCommonBuild;
&testproperties;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/ConnectorMonitoring.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/ConnectorMonitoring.java
index ba55e65..6d2dcf2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/ConnectorMonitoring.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/ConnectorMonitoring.java
@@ -52,29 +52,29 @@
* @version $Revision: 1.1 $
*/
public class ConnectorMonitoring extends AMXMonitoringTestBase {
-
+
private String serverName;
private static String SERVLETS = " - SERVLETS -";
private static String VS = "VIRTUAL SERVER";
-
+
public ConnectorMonitoring(final String host, final int port, final String serverName,
final String adminUser, final String adminPassword,
final boolean useTLS) throws IOException {
super(host, port, adminUser,adminPassword,useTLS);
this.serverName = serverName;
}
-
-
+
+
public void test() {
Map connMap =
getServerRootMonitor(serverName).
getConnectorConnectionPoolMonitorMap();
- assert(connMap.size() > 0) :
+ assert(connMap.size() > 0) :
"The connection pool monitor map is " + connMap.size();
for(Iterator itr = connMap.values().iterator(); itr.hasNext();) {
ConnectorConnectionPoolMonitor connMonitor =
(ConnectorConnectionPoolMonitor) itr.next();
- System.out.println("\nConnectorConnectionPoolMonitor [" +
+ System.out.println("\nConnectorConnectionPoolMonitor [" +
connMonitor.getName() + "]");
printStats(connMonitor.getStats().getStatistics());
}
@@ -96,14 +96,14 @@
}
**/
}
-
-
+
+
/**
*
*/
public static void main( final String[] args ) {
new StringifierRegistryIniterImpl( StringifierRegistryImpl.DEFAULT );
-
+
try {
ConnectorMonitoring connMtr = new ConnectorMonitoring(
System.getProperty("HOST", "hoyas.red.iplanet.com"),
@@ -111,14 +111,14 @@
System.getProperty("ADMIN_USER", "admin"),
System.getProperty("ADMIN_PASSWORD", "adminadmin"),
Boolean.getBoolean(System.getProperty("USE_TLS", "false")));
-
+
ConnectorMonitoring.printArgs(args);
-
+
connMtr.test();
-
+
} catch( Throwable t ) {
ExceptionUtil.getRootCause( t ).printStackTrace();
}
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/build.properties
index 2f0f1ec..895c078 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/build.properties
@@ -37,7 +37,7 @@
mgmt-api.jar=${module.publish.home}/management-api/lib/management-api.jar
#
-# The instance that the web module or application is deployed on. If this is
+# The instance that the web module or application is deployed on. If this is
# null or "" then the default server instance "server" is assumed.
#
instance.name=server
@@ -49,7 +49,7 @@
application.name=stateless-simple
#
-# The embedded or standalone web module.
+# The embedded or standalone web module.
#
web.module.name=stateless-simple.war
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/build.xml
index c307117..663db17 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector/build.xml
@@ -61,7 +61,7 @@
<target name="build" depends="compile"
description="Build entire component" />
- <!-- compile-common -->
+ <!-- compile-common -->
<target name="compile-common" depends="init">
<javac srcdir="${src.dir}/appserv-tests/devtests/ee/admin/mbeanapi/common"
destdir="${build}"
@@ -74,7 +74,7 @@
<include name="**/AMXMonitoringTestBase.java"/>
</javac>
</target>
-
+
<!-- compile -->
<target name="compile" depends="init, compile-common">
<javac srcdir="${src.dir}/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/connector"
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/EJBMonitoring.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/EJBMonitoring.java
index a9a5223..1a6df95 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/EJBMonitoring.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/EJBMonitoring.java
@@ -55,7 +55,7 @@
*/
public class EJBMonitoring {
- private final DomainRoot mDomainRoot;
+ private final DomainRoot mDomainRoot;
private String SERVER_NAME = "server";
@@ -73,9 +73,9 @@
getServerRootMonitorMap(). get(SERVER_NAME);
Map appsMtrMgr = svrRootMtr.getApplicationMonitorMap();
- ApplicationMonitor appMtr =
+ ApplicationMonitor appMtr =
(ApplicationMonitor) appsMtrMgr.get(APP_NAME);
-
+
Map ejbMgr = appMtr.getEJBModuleMonitorMap();
Stats stats = null;
@@ -90,12 +90,12 @@
EJBModuleMonitor beanMgr = (EJBModuleMonitor) tmp;
Map beans = beanMgr.getEJBMonitorMap();
-
+
Iterator it = beans.values().iterator();
while (it.hasNext()) {
EJBMonitor em = (EJBMonitor) it.next();
- listStats(em);
+ listStats(em);
Map methodMap = em.getBeanMethodMonitorMap();
itr = methodMap.values().iterator();
@@ -138,40 +138,40 @@
printStats(sts);
}
- public void printStats(Statistic[] stats)
+ public void printStats(Statistic[] stats)
{
if (stats == null)
return;
- for ( int i=0; i < stats.length; i++)
+ for ( int i=0; i < stats.length; i++)
{
printStat(stats[i]);
}
-
+
}
-
- public void printStat(Statistic stat)
+
+ public void printStat(Statistic stat)
{
if (stat == null)
return;
else
- System.out.println(" Stat name is " + stat.getName() +
- " description: " + stat.getDescription() + " start time "
- + stat.getStartTime() + " last sample time "
+ System.out.println(" Stat name is " + stat.getName() +
+ " description: " + stat.getDescription() + " start time "
+ + stat.getStartTime() + " last sample time "
+ stat.getLastSampleTime() + " unit " + stat.getUnit());
}
- public EJBMonitoring(final String host,
- final int port,
- final String adminUser,
+ public EJBMonitoring(final String host,
+ final int port,
+ final String adminUser,
final String adminPassword,
final boolean useTLS)
throws IOException
{
- final AMXConnector ct =
+ final AMXConnector ct =
new AMXConnector( host, port, adminUser, adminPassword, useTLS );
- mDomainRoot = ct.getDomainRoot();
+ mDomainRoot = ct.getDomainRoot();
}
@@ -189,7 +189,7 @@
System.getProperty("ADMIN_PASSWORD", "adminadmin"),
Boolean.getBoolean(System.getProperty("USE_TLS", "false")));
- ejbMtr.testEJBPoolStats();
+ ejbMtr.testEJBPoolStats();
}
catch( Throwable t )
{
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/build.properties
index bb6166b..b1a1948 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/ejb/build.properties
@@ -14,7 +14,7 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-
+
src.dir=.
module.publish.home=../../../../../../${publish.home}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/HTTPMonitoring.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/HTTPMonitoring.java
index b067af8..8bea846 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/HTTPMonitoring.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/HTTPMonitoring.java
@@ -59,15 +59,15 @@
private static String VS = "VIRTUAL SERVER";
public HTTPMonitoring(final String host, final int port, final String serverName,
- final String adminUser, final String adminPassword,
+ final String adminUser, final String adminPassword,
final boolean useTLS) throws IOException {
super(host, port, adminUser,adminPassword,useTLS);
this.serverName = serverName;
}
-
-
+
+
public void test() {
- HTTPServiceMonitor httpService =
+ HTTPServiceMonitor httpService =
getServerRootMonitor(serverName).getHTTPServiceMonitor();
assert (httpService != null) : "The http service monitor is null!";
Map vsMap = httpService.getHTTPServiceVirtualServerMonitorMap();
@@ -84,7 +84,7 @@
}
}
-
+
/**
*
*/
@@ -98,14 +98,14 @@
System.getProperty("ADMIN_USER", "admin"),
System.getProperty("ADMIN_PASSWORD", "adminadmin"),
Boolean.getBoolean(System.getProperty("USE_TLS", "false")));
-
+
HTTPMonitoring.printArgs(args);
-
+
httpMtr.test();
-
+
} catch( Throwable t ) {
ExceptionUtil.getRootCause( t ).printStackTrace();
}
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/build.properties
index 2f0f1ec..895c078 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/build.properties
@@ -37,7 +37,7 @@
mgmt-api.jar=${module.publish.home}/management-api/lib/management-api.jar
#
-# The instance that the web module or application is deployed on. If this is
+# The instance that the web module or application is deployed on. If this is
# null or "" then the default server instance "server" is assumed.
#
instance.name=server
@@ -49,7 +49,7 @@
application.name=stateless-simple
#
-# The embedded or standalone web module.
+# The embedded or standalone web module.
#
web.module.name=stateless-simple.war
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/build.xml
index 82c0cb5..a8ba55b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http/build.xml
@@ -61,7 +61,7 @@
<target name="build" depends="compile"
description="Build entire component" />
- <!-- compile-common -->
+ <!-- compile-common -->
<target name="compile-common" depends="init">
<javac srcdir="${src.dir}/appserv-tests/devtests/ee/admin/mbeanapi/common"
destdir="${build}"
@@ -74,7 +74,7 @@
<include name="**/AMXMonitoringTestBase.java"/>
</javac>
</target>
-
+
<!-- compile -->
<target name="compile" depends="init, compile-common">
<javac srcdir="${src.dir}/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/http"
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/JDBCMonitoring.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/JDBCMonitoring.java
index a58467b..7d8647c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/JDBCMonitoring.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/JDBCMonitoring.java
@@ -51,7 +51,7 @@
*/
public class JDBCMonitoring {
- private static DomainRoot mDomainRoot;
+ private static DomainRoot mDomainRoot;
private static String SERVER_NAME = "server";
@@ -59,15 +59,15 @@
{
Map cpMtrMgr = svrRootMtr.getConnectorConnectionPoolMonitorMap();
- System.out.println("connector connection pool size is " +
+ System.out.println("connector connection pool size is " +
cpMtrMgr.size());
Iterator itr = cpMtrMgr.values().iterator();
while (itr.hasNext()) {
Object o = itr.next();
System.out.println(" Connector Connection pool is " + o);
ConnectorConnectionPoolMonitor cPool =
- (ConnectorConnectionPoolMonitor)o;
- listStat(cPool);
+ (ConnectorConnectionPoolMonitor)o;
+ listStat(cPool);
}
}
@@ -81,8 +81,8 @@
while (itr.hasNext()) {
Object o = itr.next();
System.out.println(" Connection pool is " + o);
- JDBCConnectionPoolMonitor cPool = (JDBCConnectionPoolMonitor)o;
- listStat(cPool);
+ JDBCConnectionPoolMonitor cPool = (JDBCConnectionPoolMonitor)o;
+ listStat(cPool);
}
}
@@ -96,47 +96,47 @@
}
}
- public void listStats(MonitoringStats ms)
+ public void listStats(MonitoringStats ms)
{
Stats stats = ms.getStats();
Statistic[] sts = stats.getStatistics();
printStats(sts);
}
- public void printStats(Statistic[] stats)
+ public void printStats(Statistic[] stats)
{
if (stats == null)
return;
- for ( int i=0; i < stats.length; i++)
+ for ( int i=0; i < stats.length; i++)
{
printStat(stats[i]);
}
-
+
}
-
- public void printStat(Statistic stat)
+
+ public void printStat(Statistic stat)
{
if (stat == null)
return;
else
- System.out.println(" Stat name is " + stat.getName() +
- " description: " + stat.getDescription() + " start time "
- + stat.getStartTime() + " last sample time "
+ System.out.println(" Stat name is " + stat.getName() +
+ " description: " + stat.getDescription() + " start time "
+ + stat.getStartTime() + " last sample time "
+ stat.getLastSampleTime() + " unit " + stat.getUnit());
}
- public JDBCMonitoring(final String host,
- final int port,
- final String adminUser,
+ public JDBCMonitoring(final String host,
+ final int port,
+ final String adminUser,
final String adminPassword,
final boolean useTLS)
throws IOException
{
- final AMXConnector ct =
+ final AMXConnector ct =
new AMXConnector( host, port, adminUser, adminPassword, useTLS );
- mDomainRoot = ct.getDomainRoot();
+ mDomainRoot = ct.getDomainRoot();
}
@@ -159,8 +159,8 @@
ServerRootMonitor svrRootMtr = (ServerRootMonitor) monitorRoot.
getServerRootMonitorMap(). get(SERVER_NAME);
- jdbcMtr.testJDBCPoolStats(svrRootMtr);
- jdbcMtr.testCCPoolStats(svrRootMtr);
+ jdbcMtr.testJDBCPoolStats(svrRootMtr);
+ jdbcMtr.testCCPoolStats(svrRootMtr);
}
catch( Throwable t )
{
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/build.properties
index bb6166b..b1a1948 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/jdbc/build.properties
@@ -14,7 +14,7 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-
+
src.dir=.
module.publish.home=../../../../../../${publish.home}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/MiscMonitoring.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/MiscMonitoring.java
index 6b28d59..a058c65 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/MiscMonitoring.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/MiscMonitoring.java
@@ -54,14 +54,14 @@
*/
public class MiscMonitoring {
- private static DomainRoot mDomainRoot;
+ private static DomainRoot mDomainRoot;
private static final String SERVER_NAME = "server";
public void testThreadPoolStats(ServerRootMonitor svrRootMtr)
{
Map tpMap= svrRootMtr.getThreadPoolMonitorMap();
- System.out.println("\n" + "Thread Pool Monitor Stats: "
+ System.out.println("\n" + "Thread Pool Monitor Stats: "
+ "\n");
System.out.println("Thread PoolORB monitor map " + tpMap.size());
@@ -80,7 +80,7 @@
public void testORBStats(ServerRootMonitor svrRootMtr)
{
Map orbMap= svrRootMtr.getORBConnectionManagerMonitorMap();
- System.out.println("\n" + "ORB Connection Manager Monitor Stats: "
+ System.out.println("\n" + "ORB Connection Manager Monitor Stats: "
+ "\n");
System.out.println("ORB monitor map " + orbMap.size());
@@ -106,7 +106,7 @@
public void testTransactionServiceStats(ServerRootMonitor svrRootMtr)
{
- TransactionServiceMonitor tsMtr =
+ TransactionServiceMonitor tsMtr =
svrRootMtr.getTransactionServiceMonitor();
System.out.println("\n" + "Transaction Service Monitor Stats: " + "\n");
@@ -140,40 +140,40 @@
}
}
- public void printStats(Statistic[] stats)
+ public void printStats(Statistic[] stats)
{
if (stats == null)
return;
- for ( int i=0; i < stats.length; i++)
+ for ( int i=0; i < stats.length; i++)
{
printStat(stats[i]);
}
-
+
}
-
- public void printStat(Statistic stat)
+
+ public void printStat(Statistic stat)
{
if (stat == null)
return;
else
- System.out.println(" Stat name is " + stat.getName() +
- " description: " + stat.getDescription() + " start time "
- + stat.getStartTime() + " last sample time "
+ System.out.println(" Stat name is " + stat.getName() +
+ " description: " + stat.getDescription() + " start time "
+ + stat.getStartTime() + " last sample time "
+ stat.getLastSampleTime() + " unit " + stat.getUnit());
}
- public MiscMonitoring(final String host,
- final int port,
- final String adminUser,
+ public MiscMonitoring(final String host,
+ final int port,
+ final String adminUser,
final String adminPassword,
final boolean useTLS)
throws IOException
{
- final AMXConnector ct =
+ final AMXConnector ct =
new AMXConnector( host, port, adminUser, adminPassword, useTLS );
- mDomainRoot = ct.getDomainRoot();
+ mDomainRoot = ct.getDomainRoot();
}
@@ -196,8 +196,8 @@
ServerRootMonitor svrRootMtr = (ServerRootMonitor) monitorRoot.
getServerRootMonitorMap(). get(SERVER_NAME);
- miscMtr.testJVMStats(svrRootMtr);
- miscMtr.testTransactionServiceStats(svrRootMtr);
+ miscMtr.testJVMStats(svrRootMtr);
+ miscMtr.testTransactionServiceStats(svrRootMtr);
miscMtr.testHTTPServiceStats(svrRootMtr);
miscMtr.testThreadPoolStats(svrRootMtr);
miscMtr.testORBStats(svrRootMtr);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/build.properties
index bb6166b..b1a1948 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/misc/build.properties
@@ -14,7 +14,7 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-
+
src.dir=.
module.publish.home=../../../../../../${publish.home}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/WebMonitoring.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/WebMonitoring.java
index 8bb8735..ea22ff0 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/WebMonitoring.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/WebMonitoring.java
@@ -54,13 +54,13 @@
private static String VS = "VIRTUAL SERVER";
public WebMonitoring(final String host, final int port, final String serverName,
- final String adminUser, final String adminPassword,
+ final String adminUser, final String adminPassword,
final boolean useTLS) throws IOException {
super(host, port, adminUser,adminPassword,useTLS);
this.serverName = serverName;
}
-
-
+
+
public void test(final String applicationName, final String webModule) {
if(isEmbeddedWebModule(applicationName, webModule)) {
testEmbeddedWebModules(getWebModules(applicationName));
@@ -68,7 +68,7 @@
testStandAloneWebModule(webModule);
}
}
-
+
/**
*
@@ -79,8 +79,8 @@
assert(webMap != null && webMap.size() > 0) : "FAILURE!";
testEmbeddedWebModules(webMap);
}
-
-
+
+
/**
*
*/
@@ -91,10 +91,10 @@
Iterator itr = webModules.values().iterator();
while(itr.hasNext()) {
WebModuleVirtualServerMonitor webMonitor = (WebModuleVirtualServerMonitor)itr.next();
- if (!webMonitor.getName().equals("//__asadmin/adminapp")
+ if (!webMonitor.getName().equals("//__asadmin/adminapp")
&& !webMonitor.getName().equals("//__asadmin/admingui")
&& !webMonitor.getName().equals("//__asadmin/com_sun_web_ui")) {
- System.out.println("\nStats for WebModule [" +
+ System.out.println("\nStats for WebModule [" +
webMonitor.getName() + "]");
testWebModuleServlets(webMonitor.getServletMonitorMap());
}
@@ -116,11 +116,11 @@
System.out.println(" |");
System.out.println(" |");
System.out.println(" ---- SERVLET [" + sltMonitor.getName() + "]");
- listStats(sltMonitor);
+ listStats(sltMonitor);
}
}
-
-
+
+
/**
*
*/
@@ -128,21 +128,21 @@
return getApplicationMonitor(serverName, applicationName).
getWebModuleVirtualServerMonitorMap();
}
-
-
+
+
/**
*
*/
private boolean isEmbeddedWebModule(final String applicationName,
final String webModuleName) {
- final ApplicationMonitor appMtr =
+ final ApplicationMonitor appMtr =
getApplicationMonitor(serverName, applicationName);
final Map webMgr = appMtr.getWebModuleVirtualServerMonitorMap();
- return (webMgr.get(webModuleName) != null
+ return (webMgr.get(webModuleName) != null
|| "".equals(webMgr.get(webModuleName)));
}
-
-
+
+
/**
*
@@ -157,18 +157,18 @@
System.getProperty("ADMIN_USER", "admin"),
System.getProperty("ADMIN_PASSWORD", "adminadmin"),
Boolean.getBoolean(System.getProperty("USE_TLS", "false")));
-
+
WebMonitoring.printArgs(args);
-
+
if(args.length < 3) {
webMtr.test(null,null);
} else {
- webMtr.test(args[1], args[2]);
+ webMtr.test(args[1], args[2]);
}
-
+
} catch( Throwable t ) {
ExceptionUtil.getRootCause( t ).printStackTrace();
}
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/build.properties
index 2f0f1ec..895c078 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/build.properties
@@ -37,7 +37,7 @@
mgmt-api.jar=${module.publish.home}/management-api/lib/management-api.jar
#
-# The instance that the web module or application is deployed on. If this is
+# The instance that the web module or application is deployed on. If this is
# null or "" then the default server instance "server" is assumed.
#
instance.name=server
@@ -49,7 +49,7 @@
application.name=stateless-simple
#
-# The embedded or standalone web module.
+# The embedded or standalone web module.
#
web.module.name=stateless-simple.war
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/build.xml
index 776cfd5..b764fe3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web/build.xml
@@ -61,7 +61,7 @@
<target name="build" depends="compile"
description="Build entire component" />
- <!-- compile-common -->
+ <!-- compile-common -->
<target name="compile-common" depends="init">
<javac srcdir="${src.dir}/appserv-tests/devtests/ee/admin/mbeanapi/common"
destdir="${build}"
@@ -74,7 +74,7 @@
<include name="**/*.java"/>
</javac>
</target>
-
+
<!-- compile -->
<target name="compile" depends="init, compile-common">
<javac srcdir="${src.dir}/appserv-tests/devtests/ee/admin/mbeanapi/monitoring/web"
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/DeployNotificationListener.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/DeployNotificationListener.java
index 6464a9a..0f04012 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/DeployNotificationListener.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/DeployNotificationListener.java
@@ -22,96 +22,96 @@
/**
- A JMX NotificationListener for deployment.
+ A JMX NotificationListener for deployment.
*/
public final class DeployNotificationListener
- implements NotificationListener
+ implements NotificationListener
{
- private final Object mDeployID;
- private boolean mIsCompleted;
- private DeploymentStatus mDeploymentStatus;
-
- public
- DeployNotificationListener( final Object deployID )
- {
- mDeployID = deployID;
- mIsCompleted = false;
- }
-
- public boolean
- isCompleted()
- {
- return( mIsCompleted );
- }
-
- public DeploymentStatus
- getDeploymentStatus()
- {
- return( mDeploymentStatus );
- }
-
- public synchronized void
- handleNotification(
- final Notification notif,
- final Object handback)
- {
- try
- {
- realHandleNotification( notif, handback );
- }
- catch( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- /**
- Note that Notifications are not guaranteed to be delivered in order.
- Thus, it is theoretically possible for a DEPLOYMENT_COMPLETED_NOTIFICATION_TYPE
- to be received before a DEPLOYMENT_STARTED_NOTIFICATION_TYPE.
- */
- public void
- realHandleNotification(
- final Notification notif,
- final Object handback)
- {
- final String type = notif.getType();
- final Map m = (Map)notif.getUserData();
- final Object deployID = m.get( DeploymentMgr.NOTIF_DEPLOYMENT_ID_KEY );
-
- if ( deployID.equals( mDeployID ) )
- {
- if ( type.equals( DeploymentMgr.DEPLOYMENT_STARTED_NOTIFICATION_TYPE ) )
- {
- SampleUtil.println( "Deployment started for " + deployID);
- }
- else if ( type.equals( DeploymentMgr.DEPLOYMENT_COMPLETED_NOTIFICATION_TYPE ) )
- {
- final Map statusData = (Map)
- m.get( DeploymentMgr.NOTIF_DEPLOYMENT_COMPLETED_STATUS_KEY );
-
- final DeploymentStatus status =
- DeploymentSupport.mapToDeploymentStatus( statusData );
-
- SampleUtil.println( "Deployment completed for " + deployID + " with status: " +
- status.getStageStatus() );
-
- mIsCompleted = true;
- mDeploymentStatus = status;
- }
- else if ( type.equals( DeploymentMgr.DEPLOYMENT_PROGRESS_NOTIFICATION_TYPE ) )
- {
- final Map progressData = (Map)
- m.get( DeploymentMgr.NOTIF_DEPLOYMENT_PROGRESS_KEY );
-
- final DeploymentProgress progress =
- DeploymentSupport.mapToDeploymentProgress( progressData );
-
- SampleUtil.println( "Deployment progress for " + deployID + " = " +
- progress.getProgressPercent() + "%" );
- }
- }
- }
+ private final Object mDeployID;
+ private boolean mIsCompleted;
+ private DeploymentStatus mDeploymentStatus;
+
+ public
+ DeployNotificationListener( final Object deployID )
+ {
+ mDeployID = deployID;
+ mIsCompleted = false;
+ }
+
+ public boolean
+ isCompleted()
+ {
+ return( mIsCompleted );
+ }
+
+ public DeploymentStatus
+ getDeploymentStatus()
+ {
+ return( mDeploymentStatus );
+ }
+
+ public synchronized void
+ handleNotification(
+ final Notification notif,
+ final Object handback)
+ {
+ try
+ {
+ realHandleNotification( notif, handback );
+ }
+ catch( Exception e )
+ {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ Note that Notifications are not guaranteed to be delivered in order.
+ Thus, it is theoretically possible for a DEPLOYMENT_COMPLETED_NOTIFICATION_TYPE
+ to be received before a DEPLOYMENT_STARTED_NOTIFICATION_TYPE.
+ */
+ public void
+ realHandleNotification(
+ final Notification notif,
+ final Object handback)
+ {
+ final String type = notif.getType();
+ final Map m = (Map)notif.getUserData();
+ final Object deployID = m.get( DeploymentMgr.NOTIF_DEPLOYMENT_ID_KEY );
+
+ if ( deployID.equals( mDeployID ) )
+ {
+ if ( type.equals( DeploymentMgr.DEPLOYMENT_STARTED_NOTIFICATION_TYPE ) )
+ {
+ SampleUtil.println( "Deployment started for " + deployID);
+ }
+ else if ( type.equals( DeploymentMgr.DEPLOYMENT_COMPLETED_NOTIFICATION_TYPE ) )
+ {
+ final Map statusData = (Map)
+ m.get( DeploymentMgr.NOTIF_DEPLOYMENT_COMPLETED_STATUS_KEY );
+
+ final DeploymentStatus status =
+ DeploymentSupport.mapToDeploymentStatus( statusData );
+
+ SampleUtil.println( "Deployment completed for " + deployID + " with status: " +
+ status.getStageStatus() );
+
+ mIsCompleted = true;
+ mDeploymentStatus = status;
+ }
+ else if ( type.equals( DeploymentMgr.DEPLOYMENT_PROGRESS_NOTIFICATION_TYPE ) )
+ {
+ final Map progressData = (Map)
+ m.get( DeploymentMgr.NOTIF_DEPLOYMENT_PROGRESS_KEY );
+
+ final DeploymentProgress progress =
+ DeploymentSupport.mapToDeploymentProgress( progressData );
+
+ SampleUtil.println( "Deployment progress for " + deployID + " = " +
+ progress.getProgressPercent() + "%" );
+ }
+ }
+ }
}
-
-
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/LineReaderImpl.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/LineReaderImpl.java
index c9173f6..02105f2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/LineReaderImpl.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/LineReaderImpl.java
@@ -13,7 +13,7 @@
* $Revision: 1.1 $
* $Date: 2004/10/12 22:49:10 $
*/
-
+
package com.sun.appserv.management.sample;
@@ -21,52 +21,52 @@
import java.io.InputStreamReader;
/**
- Reads a line from the specified input stream, outputs
- the prompt to System.out.
+ Reads a line from the specified input stream, outputs
+ the prompt to System.out.
*/
public class LineReaderImpl
{
- final InputStreamReader mInputStreamReader;
-
- public
- LineReaderImpl( InputStream inputStream )
- {
- mInputStreamReader = new InputStreamReader( inputStream );
- }
+ final InputStreamReader mInputStreamReader;
- public String
- readLine( String prompt )
- throws java.io.IOException
- {
- final StringBuffer line = new StringBuffer();
-
- if ( prompt != null )
- {
- System.out.print( prompt );
- }
-
- while ( true )
- {
- final int value = mInputStreamReader.read();
- if ( value < 0 )
- {
- if ( line.length() != 0 )
- {
- // read a line but saw EOF before a newline
- break;
- }
- return( null );
- }
-
- final char theChar = (char)value;
- if ( theChar == '\n' )
- break;
-
- line.append( theChar );
- }
-
- return( line.toString().trim() );
- }
+ public
+ LineReaderImpl( InputStream inputStream )
+ {
+ mInputStreamReader = new InputStreamReader( inputStream );
+ }
+
+ public String
+ readLine( String prompt )
+ throws java.io.IOException
+ {
+ final StringBuffer line = new StringBuffer();
+
+ if ( prompt != null )
+ {
+ System.out.print( prompt );
+ }
+
+ while ( true )
+ {
+ final int value = mInputStreamReader.read();
+ if ( value < 0 )
+ {
+ if ( line.length() != 0 )
+ {
+ // read a line but saw EOF before a newline
+ break;
+ }
+ return( null );
+ }
+
+ final char theChar = (char)value;
+ if ( theChar == '\n' )
+ break;
+
+ line.append( theChar );
+ }
+
+ return( line.toString().trim() );
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleHandshakeCompletedListener.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleHandshakeCompletedListener.java
index 9402a08..c522e5e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleHandshakeCompletedListener.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleHandshakeCompletedListener.java
@@ -16,29 +16,29 @@
/**
- Demonstrates how to write a HandshakeCompletedListener. Note that usually
- it is not necessary to write your own HandshakeCompletedListener since the
- event is available from {@link HandshakeCompletedListenerImpl#getLastEvent}.
- <p>
- You may wish to write a HandshakeCompletedListener if the data contained
- in the HandshakeCompletedEvent is of interest or you wish to exert more
- control over the TLS connection.
+ Demonstrates how to write a HandshakeCompletedListener. Note that usually
+ it is not necessary to write your own HandshakeCompletedListener since the
+ event is available from {@link HandshakeCompletedListenerImpl#getLastEvent}.
+ <p>
+ You may wish to write a HandshakeCompletedListener if the data contained
+ in the HandshakeCompletedEvent is of interest or you wish to exert more
+ control over the TLS connection.
*/
public final class SampleHandshakeCompletedListener
- extends HandshakeCompletedListenerImpl
+ extends HandshakeCompletedListenerImpl
{
- public
- SampleHandshakeCompletedListener()
- {
- }
-
- public synchronized void
- handshakeCompleted( final HandshakeCompletedEvent event)
- {
- super.handshakeCompleted( event );
-
- System.out.println( "HandshakeCompleted:\n" + event + "\n" );
- }
+ public
+ SampleHandshakeCompletedListener()
+ {
+ }
+
+ public synchronized void
+ handshakeCompleted( final HandshakeCompletedEvent event)
+ {
+ super.handshakeCompleted( event );
+
+ System.out.println( "HandshakeCompleted:\n" + event + "\n" );
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleListener.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleListener.java
index 65ca94f..9ea552c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleListener.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleListener.java
@@ -21,103 +21,103 @@
import javax.management.MBeanServerNotification;
/**
- Displays any {@link javax.management.Notification} received.
- <p>
- Note that most {@link com.sun.appserv.management.base.AMX} Notifications include a Map in the
- userData field of the Notification.
-
- @see com.sun.appserv.management.base.AMX
+ Displays any {@link javax.management.Notification} received.
+ <p>
+ Note that most {@link com.sun.appserv.management.base.AMX} Notifications include a Map in the
+ userData field of the Notification.
+
+ @see com.sun.appserv.management.base.AMX
*/
public final class SampleListener implements NotificationListener
{
- private Map mNotifs;
-
- public
- SampleListener()
- {
- mNotifs = null;
- clearNotifs();
- }
-
- /**
- Keep a Map, keyed by Notification type, of all Notifications received.
- */
- private synchronized void
- addNotif( final Notification notif )
- {
- final String type = notif.getType();
-
- List list = null;
-
- if ( ! mNotifs.keySet().contains( type ) )
- {
- clearNotifs( type );
- }
-
- list = (List)mNotifs.get( type );
-
- list.add( notif );
- }
-
- /**
- Return a Map, keyed by Notification type, of all Notifications received so far.
- */
- public Map
- getNotifsReceived()
- {
- return( mNotifs );
- }
-
- public List
- getNotifsReceived( final String type )
- {
- return( (List)mNotifs.get( type ) );
- }
-
- /**
- Clear the history of Notifications received.
- */
- public synchronized Map
- clearNotifs()
- {
- final Map existing = getNotifsReceived();
-
- mNotifs = Collections.synchronizedMap( new HashMap() );
-
- return( existing );
- }
-
- public synchronized List
- clearNotifs( final String type )
- {
- final Map existing = getNotifsReceived();
-
- final List newList = Collections.synchronizedList( new ArrayList() );
-
- final List existingList = (List)existing.get( type );
-
- mNotifs.put( type, newList );
-
- return( existingList );
- }
-
- /**
- The Notification is delivered here.
- */
- public void
- handleNotification(
- final Notification notif,
- final Object handback)
- {
- final String type = notif.getType();
- final Object userData = notif.getUserData();
-
- addNotif( notif );
-
- SampleUtil.println( "SampleListener: received: " + SampleUtil.toString( notif ) );
- SampleUtil.println( "" );
- }
-
-
-
+ private Map mNotifs;
+
+ public
+ SampleListener()
+ {
+ mNotifs = null;
+ clearNotifs();
+ }
+
+ /**
+ Keep a Map, keyed by Notification type, of all Notifications received.
+ */
+ private synchronized void
+ addNotif( final Notification notif )
+ {
+ final String type = notif.getType();
+
+ List list = null;
+
+ if ( ! mNotifs.keySet().contains( type ) )
+ {
+ clearNotifs( type );
+ }
+
+ list = (List)mNotifs.get( type );
+
+ list.add( notif );
+ }
+
+ /**
+ Return a Map, keyed by Notification type, of all Notifications received so far.
+ */
+ public Map
+ getNotifsReceived()
+ {
+ return( mNotifs );
+ }
+
+ public List
+ getNotifsReceived( final String type )
+ {
+ return( (List)mNotifs.get( type ) );
+ }
+
+ /**
+ Clear the history of Notifications received.
+ */
+ public synchronized Map
+ clearNotifs()
+ {
+ final Map existing = getNotifsReceived();
+
+ mNotifs = Collections.synchronizedMap( new HashMap() );
+
+ return( existing );
+ }
+
+ public synchronized List
+ clearNotifs( final String type )
+ {
+ final Map existing = getNotifsReceived();
+
+ final List newList = Collections.synchronizedList( new ArrayList() );
+
+ final List existingList = (List)existing.get( type );
+
+ mNotifs.put( type, newList );
+
+ return( existingList );
+ }
+
+ /**
+ The Notification is delivered here.
+ */
+ public void
+ handleNotification(
+ final Notification notif,
+ final Object handback)
+ {
+ final String type = notif.getType();
+ final Object userData = notif.getUserData();
+
+ addNotif( notif );
+
+ SampleUtil.println( "SampleListener: received: " + SampleUtil.toString( notif ) );
+ SampleUtil.println( "" );
+ }
+
+
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleMain.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleMain.java
index 75a8c5b..7a14ce4 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleMain.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleMain.java
@@ -30,374 +30,374 @@
import com.sun.appserv.management.client.HandshakeCompletedListenerImpl;
/**
- Main class demonstrating a variety of MBean API (AMX) usages.
- Enters an interactive loop in which the user can run various commands.
+ Main class demonstrating a variety of MBean API (AMX) usages.
+ Enters an interactive loop in which the user can run various commands.
*/
public final class SampleMain
{
- private final DomainRoot mDomainRoot;
- private HandshakeCompletedListenerImpl mHandshakeCompletedListener;
-
- public static void
- main( final String[] args )
- {
- if ( args.length > 1 )
- {
- SampleUtil.println( "Specify a properties file or nothing." );
- System.exit( 255 );
- }
-
- try
- {
- new SampleMain( args.length == 1 ? args[ 0 ] : "SampleMain.properties" );
- }
- catch( Throwable t )
- {
- SampleUtil.getRootCause( t ).printStackTrace();
- }
- }
-
-
- final String QUIT = "quit";
- final String LIST = "list";
- final String DEPLOY = "deploy";
- final String UNDEPLOY = "undeploy";
- final String QUERY = "query";
- final String SHOW_HIERARCHY = "show-hierarchy";
- final String START_SERVER = "start-server";
- final String STOP_SERVER = "stop-server";
- final String LIST_ATTRIBUTES = "list-attributes";
- final String LIST_DOTTED_NAMES = "list-dotted-names";
- final String LIST_PROPERTIES = "list-properties";
- final String SET_MONITORING = "set-monitoring";
- final String DEMO_JMX_MONITOR = "demo-jmx-monitor";
- final String RUN_ALL = "run-all";
-
- final String[] MENU_CHOICES = new String[]
- {
- DEMO_JMX_MONITOR, DEPLOY, LIST_ATTRIBUTES, LIST, LIST_DOTTED_NAMES, LIST_PROPERTIES, QUERY, QUIT, RUN_ALL,
- START_SERVER, STOP_SERVER,
- SHOW_HIERARCHY, SET_MONITORING, UNDEPLOY
- };
-
- final String MENU = SampleUtil.arrayToString( MENU_CHOICES, " ", "\n");
- final String PROMPT = "Commands:\n" + MENU + "\nEnter command> ";
-
-
- private static final class IllegalUsageException extends Exception
- {
- IllegalUsageException() {}
- }
-
- private void
- require(
- final boolean test,
- final String msg )
- throws IllegalUsageException
- {
- if ( ! test )
- {
- SampleUtil.println( msg );
- throw new IllegalUsageException();
- }
- }
-
- private void
- handleChoice(
- final Samples samples,
- final String line )
- throws IOException, IllegalUsageException, InstanceNotFoundException
- {
- final String[] parts = line.split( "[ \t]+" );
- final int numArgs = parts.length - 1;
- final String cmd = parts[ 0 ];
-
- if ( cmd.length() != 0 )
- {
- SampleUtil.println( "cmd: " + SampleUtil.toString( parts ) );
- }
-
- if ( cmd.equals( QUIT ) || cmd.equals( "q" ) )
- {
- require( numArgs == 0, "Usage: " + QUIT );
- System.exit( 0 );
- }
- else if ( cmd.length() == 0 )
- {
- // do nothing
- }
- else if ( cmd.equals( DEPLOY ) )
- {
- require( numArgs >= 1, "Usage: " + DEPLOY + " <archive-name>" );
- for( int i = 1; i < parts.length; ++i )
- {
- samples.deploy( new File( parts[ i ] ) );
- }
- }
- else if ( cmd.equals( UNDEPLOY ) )
- {
- require( numArgs >= 1, "Usage: " + UNDEPLOY + " [<name>[ <name>]*]" );
- for( int i = 1; i < parts.length; ++i )
- {
- samples.undeploy( parts[ i ] );
- }
- }
- else if ( cmd.equals( START_SERVER ) )
- {
- require( numArgs == 1, "Usage: " + START_SERVER + " <server-name>" );
- samples.startServer( parts[ 1 ] );
- }
- else if ( cmd.equals( STOP_SERVER ) )
- {
- require( numArgs == 1, "Usage: " + STOP_SERVER + " <server-name>" );
- samples.stopServer( parts[ 1 ] );
- }
- else if ( cmd.equals( LIST ) )
- {
- require( numArgs == 0, "Usage: " + LIST );
- samples.handleList();
- }
- else if ( cmd.equals( SHOW_HIERARCHY ) )
- {
- if ( numArgs == 0 )
- {
- samples.displayHierarchy();
- }
- else
- {
- for( int i = 1; i < parts.length; ++i )
- {
- samples.displayHierarchy( parts[ i ] );
- }
- }
- }
- else if ( cmd.equals( QUERY) )
- {
- require( numArgs == 0, "Usage: " + QUERY );
-
- samples.demoQuery();
- }
- else if ( cmd.equals( LIST_ATTRIBUTES ) )
- {
- if ( numArgs == 0 )
- {
- samples.displayAllAttributes( getDomainRoot() );
- }
- else
- {
- for( int i = 1; i < parts.length; ++i )
- {
- samples.displayAllAttributes( parts[ i ] );
- }
- }
- }
- else if ( cmd.equals( LIST_DOTTED_NAMES ) )
- {
- require( numArgs == 0, "Usage: " + LIST_DOTTED_NAMES );
- samples.displayDottedNames( );
- }
- else if ( cmd.equals( LIST_PROPERTIES ) )
- {
- require( numArgs == 0, "Usage: " + LIST_PROPERTIES );
- samples.displayAllProperties( );
- }
- else if ( cmd.equals( RUN_ALL ) )
- {
- require( numArgs == 0, "Usage: " + RUN_ALL );
-
- for( int i = 0; i < MENU_CHOICES.length; ++i )
- {
- final String choice = MENU_CHOICES[ i ];
-
- if ( ! ( choice.equals( QUIT ) || choice.equals( RUN_ALL ) ) )
- {
- handleChoice( samples, choice );
- }
- }
- }
- else if ( cmd.equals( DEMO_JMX_MONITOR ) )
- {
- samples.demoJMXMonitor();
- }
- else if ( cmd.equals( SET_MONITORING ) )
- {
- require( numArgs == 2, "Usage: " + SET_MONITORING + " <config-name> HIGH|LOW|OFF" );
-
- samples.setMonitoring( parts[ 1 ], parts[ 2 ]);
- }
- else
- {
- SampleUtil.println( "Unknown command: " + line );
- }
- }
-
- private void
- demo()
- throws IOException
- {
- final LineReaderImpl in = new LineReaderImpl( System.in );
-
- final Samples samples = new Samples( getDomainRoot() );
- while ( true )
- {
- final String line = in.readLine( "\n" + PROMPT );
- try
- {
- handleChoice( samples, line.trim() );
- }
- catch( IllegalUsageException e )
- {
- }
- catch( Exception e )
- {
- e.printStackTrace();
- }
- }
- }
-
- private final DomainRoot
- getDomainRoot()
- {
- return( mDomainRoot );
- }
-
-
-
-
- private TLSParams
- createTLSParams(
- final String trustStore,
- final String password )
- {
- final File trustStoreFile = new File( trustStore );
- final char[] trustStorePassword = password.toCharArray();
-
- mHandshakeCompletedListener = new HandshakeCompletedListenerImpl();
- final TrustStoreTrustManager trustMgr =
- new TrustStoreTrustManager( trustStoreFile, trustStorePassword);
- trustMgr.setPrompt( true );
+ private final DomainRoot mDomainRoot;
+ private HandshakeCompletedListenerImpl mHandshakeCompletedListener;
- final TLSParams tlsParams = new TLSParams( trustMgr, mHandshakeCompletedListener );
+ public static void
+ main( final String[] args )
+ {
+ if ( args.length > 1 )
+ {
+ SampleUtil.println( "Specify a properties file or nothing." );
+ System.exit( 255 );
+ }
- return( tlsParams );
- }
-
- /**
- Read connect properties from a file.
- */
- private final Properties
- getConnectProperties( final String file )
- throws IOException
- {
- final Properties props = new Properties();
-
- if ( file != null )
- {
- SampleUtil.println( "Reading properties from: " + SampleUtil.quote( file ) );
- final File f = new File( file );
-
- if ( f.exists() )
- {
- final FileInputStream is = new FileInputStream( f );
- try
- {
- props.load( is );
- }
- finally
- {
- is.close();
- }
- }
- else
- {
- SampleUtil.println("File \"" + file + " does not exist, using defaults." );
- }
- }
-
- return( props );
- }
-
- private final static String DEFAULT_TRUST_STORE_FILE = "~/.keystore";
- private final static String DEFAULT_TRUST_STORE_PASSWORD = "changeme";
-
- /**
- @param host hostname or IP address of Domain Admin Server
- @param port RMI administrative port
- @param user admin user
- @param password admin user password
- @param tlsParams TLS parameters, may be null
- @return AppserverConnectionSource
- */
- public static AppserverConnectionSource
- connect(
- final String host,
- final int port,
- final String user,
- final String password,
- final TLSParams tlsParams )
- throws IOException
- {
- final String info = "host=" + host + ", port=" + port +
- ", user=" + user + ", password=" + password +
- ", tls=" + (tlsParams != null);
-
- SampleUtil.println( "Connecting...:" + info );
-
- final AppserverConnectionSource conn =
- new AppserverConnectionSource( AppserverConnectionSource.PROTOCOL_RMI,
- host, port, user, password, tlsParams, null);
-
- // force the connection now
- conn.getJMXConnector( false );
+ try
+ {
+ new SampleMain( args.length == 1 ? args[ 0 ] : "SampleMain.properties" );
+ }
+ catch( Throwable t )
+ {
+ SampleUtil.getRootCause( t ).printStackTrace();
+ }
+ }
- SampleUtil.println( "Connected: " + info );
-
- return( conn );
- }
-
-
- /**
- */
- public
- SampleMain( final String optionalPropertiesFile )
- throws IOException
- {
- final Properties props = getConnectProperties( optionalPropertiesFile );
-
- final String host = props.getProperty( "connect.host", "localhost" );
- final int port = Integer.parseInt( props.getProperty( "connect.port", "8686" ) );
- final String user = props.getProperty( "connect.user", "admin" );
- final String password = props.getProperty( "connect.password", "admin123" );
- final String trustStore = props.getProperty( "connect.truststore", DEFAULT_TRUST_STORE_FILE);
- final String trustStorePassword =
- props.getProperty( "connect.truststorePassword", DEFAULT_TRUST_STORE_PASSWORD);
- final boolean useTLS =
- Boolean.valueOf( props.getProperty( "connect.useTLS", "false" ) ).booleanValue();
-
- final TLSParams tlsParams = useTLS ?
- createTLSParams( trustStore, trustStorePassword) : null;
-
- final AppserverConnectionSource conn = connect( host, port, user, password, tlsParams );
-
- if ( mHandshakeCompletedListener != null )
- {
- SampleUtil.println( "HandshakeCompletedEvent: " +
- SampleUtil.toString( mHandshakeCompletedListener.getLastEvent() ) );
- }
-
- mDomainRoot = conn.getDomainRoot();
-
- try
- {
- demo( );
- }
- finally
- {
- // close the connection (not necessary, but here for as an example)
- conn.getJMXConnector( false ).close();
- }
- }
+ final String QUIT = "quit";
+ final String LIST = "list";
+ final String DEPLOY = "deploy";
+ final String UNDEPLOY = "undeploy";
+ final String QUERY = "query";
+ final String SHOW_HIERARCHY = "show-hierarchy";
+ final String START_SERVER = "start-server";
+ final String STOP_SERVER = "stop-server";
+ final String LIST_ATTRIBUTES = "list-attributes";
+ final String LIST_DOTTED_NAMES = "list-dotted-names";
+ final String LIST_PROPERTIES = "list-properties";
+ final String SET_MONITORING = "set-monitoring";
+ final String DEMO_JMX_MONITOR = "demo-jmx-monitor";
+ final String RUN_ALL = "run-all";
+
+ final String[] MENU_CHOICES = new String[]
+ {
+ DEMO_JMX_MONITOR, DEPLOY, LIST_ATTRIBUTES, LIST, LIST_DOTTED_NAMES, LIST_PROPERTIES, QUERY, QUIT, RUN_ALL,
+ START_SERVER, STOP_SERVER,
+ SHOW_HIERARCHY, SET_MONITORING, UNDEPLOY
+ };
+
+ final String MENU = SampleUtil.arrayToString( MENU_CHOICES, " ", "\n");
+ final String PROMPT = "Commands:\n" + MENU + "\nEnter command> ";
+
+
+ private static final class IllegalUsageException extends Exception
+ {
+ IllegalUsageException() {}
+ }
+
+ private void
+ require(
+ final boolean test,
+ final String msg )
+ throws IllegalUsageException
+ {
+ if ( ! test )
+ {
+ SampleUtil.println( msg );
+ throw new IllegalUsageException();
+ }
+ }
+
+ private void
+ handleChoice(
+ final Samples samples,
+ final String line )
+ throws IOException, IllegalUsageException, InstanceNotFoundException
+ {
+ final String[] parts = line.split( "[ \t]+" );
+ final int numArgs = parts.length - 1;
+ final String cmd = parts[ 0 ];
+
+ if ( cmd.length() != 0 )
+ {
+ SampleUtil.println( "cmd: " + SampleUtil.toString( parts ) );
+ }
+
+ if ( cmd.equals( QUIT ) || cmd.equals( "q" ) )
+ {
+ require( numArgs == 0, "Usage: " + QUIT );
+ System.exit( 0 );
+ }
+ else if ( cmd.length() == 0 )
+ {
+ // do nothing
+ }
+ else if ( cmd.equals( DEPLOY ) )
+ {
+ require( numArgs >= 1, "Usage: " + DEPLOY + " <archive-name>" );
+ for( int i = 1; i < parts.length; ++i )
+ {
+ samples.deploy( new File( parts[ i ] ) );
+ }
+ }
+ else if ( cmd.equals( UNDEPLOY ) )
+ {
+ require( numArgs >= 1, "Usage: " + UNDEPLOY + " [<name>[ <name>]*]" );
+ for( int i = 1; i < parts.length; ++i )
+ {
+ samples.undeploy( parts[ i ] );
+ }
+ }
+ else if ( cmd.equals( START_SERVER ) )
+ {
+ require( numArgs == 1, "Usage: " + START_SERVER + " <server-name>" );
+ samples.startServer( parts[ 1 ] );
+ }
+ else if ( cmd.equals( STOP_SERVER ) )
+ {
+ require( numArgs == 1, "Usage: " + STOP_SERVER + " <server-name>" );
+ samples.stopServer( parts[ 1 ] );
+ }
+ else if ( cmd.equals( LIST ) )
+ {
+ require( numArgs == 0, "Usage: " + LIST );
+ samples.handleList();
+ }
+ else if ( cmd.equals( SHOW_HIERARCHY ) )
+ {
+ if ( numArgs == 0 )
+ {
+ samples.displayHierarchy();
+ }
+ else
+ {
+ for( int i = 1; i < parts.length; ++i )
+ {
+ samples.displayHierarchy( parts[ i ] );
+ }
+ }
+ }
+ else if ( cmd.equals( QUERY) )
+ {
+ require( numArgs == 0, "Usage: " + QUERY );
+
+ samples.demoQuery();
+ }
+ else if ( cmd.equals( LIST_ATTRIBUTES ) )
+ {
+ if ( numArgs == 0 )
+ {
+ samples.displayAllAttributes( getDomainRoot() );
+ }
+ else
+ {
+ for( int i = 1; i < parts.length; ++i )
+ {
+ samples.displayAllAttributes( parts[ i ] );
+ }
+ }
+ }
+ else if ( cmd.equals( LIST_DOTTED_NAMES ) )
+ {
+ require( numArgs == 0, "Usage: " + LIST_DOTTED_NAMES );
+ samples.displayDottedNames( );
+ }
+ else if ( cmd.equals( LIST_PROPERTIES ) )
+ {
+ require( numArgs == 0, "Usage: " + LIST_PROPERTIES );
+ samples.displayAllProperties( );
+ }
+ else if ( cmd.equals( RUN_ALL ) )
+ {
+ require( numArgs == 0, "Usage: " + RUN_ALL );
+
+ for( int i = 0; i < MENU_CHOICES.length; ++i )
+ {
+ final String choice = MENU_CHOICES[ i ];
+
+ if ( ! ( choice.equals( QUIT ) || choice.equals( RUN_ALL ) ) )
+ {
+ handleChoice( samples, choice );
+ }
+ }
+ }
+ else if ( cmd.equals( DEMO_JMX_MONITOR ) )
+ {
+ samples.demoJMXMonitor();
+ }
+ else if ( cmd.equals( SET_MONITORING ) )
+ {
+ require( numArgs == 2, "Usage: " + SET_MONITORING + " <config-name> HIGH|LOW|OFF" );
+
+ samples.setMonitoring( parts[ 1 ], parts[ 2 ]);
+ }
+ else
+ {
+ SampleUtil.println( "Unknown command: " + line );
+ }
+ }
+
+ private void
+ demo()
+ throws IOException
+ {
+ final LineReaderImpl in = new LineReaderImpl( System.in );
+
+ final Samples samples = new Samples( getDomainRoot() );
+ while ( true )
+ {
+ final String line = in.readLine( "\n" + PROMPT );
+ try
+ {
+ handleChoice( samples, line.trim() );
+ }
+ catch( IllegalUsageException e )
+ {
+ }
+ catch( Exception e )
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private final DomainRoot
+ getDomainRoot()
+ {
+ return( mDomainRoot );
+ }
+
+
+
+
+ private TLSParams
+ createTLSParams(
+ final String trustStore,
+ final String password )
+ {
+ final File trustStoreFile = new File( trustStore );
+ final char[] trustStorePassword = password.toCharArray();
+
+ mHandshakeCompletedListener = new HandshakeCompletedListenerImpl();
+ final TrustStoreTrustManager trustMgr =
+ new TrustStoreTrustManager( trustStoreFile, trustStorePassword);
+ trustMgr.setPrompt( true );
+
+ final TLSParams tlsParams = new TLSParams( trustMgr, mHandshakeCompletedListener );
+
+ return( tlsParams );
+ }
+
+ /**
+ Read connect properties from a file.
+ */
+ private final Properties
+ getConnectProperties( final String file )
+ throws IOException
+ {
+ final Properties props = new Properties();
+
+ if ( file != null )
+ {
+ SampleUtil.println( "Reading properties from: " + SampleUtil.quote( file ) );
+ final File f = new File( file );
+
+ if ( f.exists() )
+ {
+ final FileInputStream is = new FileInputStream( f );
+ try
+ {
+ props.load( is );
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+ else
+ {
+ SampleUtil.println("File \"" + file + " does not exist, using defaults." );
+ }
+ }
+
+ return( props );
+ }
+
+ private final static String DEFAULT_TRUST_STORE_FILE = "~/.keystore";
+ private final static String DEFAULT_TRUST_STORE_PASSWORD = "changeme";
+
+ /**
+ @param host hostname or IP address of Domain Admin Server
+ @param port RMI administrative port
+ @param user admin user
+ @param password admin user password
+ @param tlsParams TLS parameters, may be null
+ @return AppserverConnectionSource
+ */
+ public static AppserverConnectionSource
+ connect(
+ final String host,
+ final int port,
+ final String user,
+ final String password,
+ final TLSParams tlsParams )
+ throws IOException
+ {
+ final String info = "host=" + host + ", port=" + port +
+ ", user=" + user + ", password=" + password +
+ ", tls=" + (tlsParams != null);
+
+ SampleUtil.println( "Connecting...:" + info );
+
+ final AppserverConnectionSource conn =
+ new AppserverConnectionSource( AppserverConnectionSource.PROTOCOL_RMI,
+ host, port, user, password, tlsParams, null);
+
+ // force the connection now
+ conn.getJMXConnector( false );
+
+ SampleUtil.println( "Connected: " + info );
+
+ return( conn );
+ }
+
+
+ /**
+ */
+ public
+ SampleMain( final String optionalPropertiesFile )
+ throws IOException
+ {
+ final Properties props = getConnectProperties( optionalPropertiesFile );
+
+ final String host = props.getProperty( "connect.host", "localhost" );
+ final int port = Integer.parseInt( props.getProperty( "connect.port", "8686" ) );
+ final String user = props.getProperty( "connect.user", "admin" );
+ final String password = props.getProperty( "connect.password", "admin123" );
+ final String trustStore = props.getProperty( "connect.truststore", DEFAULT_TRUST_STORE_FILE);
+ final String trustStorePassword =
+ props.getProperty( "connect.truststorePassword", DEFAULT_TRUST_STORE_PASSWORD);
+ final boolean useTLS =
+ Boolean.valueOf( props.getProperty( "connect.useTLS", "false" ) ).booleanValue();
+
+ final TLSParams tlsParams = useTLS ?
+ createTLSParams( trustStore, trustStorePassword) : null;
+
+ final AppserverConnectionSource conn = connect( host, port, user, password, tlsParams );
+
+ if ( mHandshakeCompletedListener != null )
+ {
+ SampleUtil.println( "HandshakeCompletedEvent: " +
+ SampleUtil.toString( mHandshakeCompletedListener.getLastEvent() ) );
+ }
+
+ mDomainRoot = conn.getDomainRoot();
+
+
+ try
+ {
+ demo( );
+ }
+ finally
+ {
+ // close the connection (not necessary, but here for as an example)
+ conn.getJMXConnector( false ).close();
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleUtil.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleUtil.java
index 5bf789d..02268ca 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleUtil.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/SampleUtil.java
@@ -24,265 +24,265 @@
/**
- Utility methods for the samples.
+ Utility methods for the samples.
*/
public final class SampleUtil
{
- private SampleUtil() {}
-
- public static void
- println( Object o )
- {
- System.out.println( toString( o ) );
- }
-
- /**
- Display a Map to System.out.
- */
- public static void
- displayMap(
- final String msg,
- final Map m)
- {
- println( msg + ": " + toString( m.keySet() ) );
- }
-
-
- private static final String QUOTE_CHAR = "\"";
- public static String
- quote( final Object o )
- {
- if ( o == null )
- {
- return quote( "null" );
- }
-
- return( QUOTE_CHAR + o.toString() + QUOTE_CHAR );
- }
-
- public static String
- toString( final Object o )
- {
- String result = null;
-
- if ( o == null )
- {
- result = "null";
- }
- else if ( o instanceof Object[] )
- {
- result = "[" + arrayToString( (Object[])o, null, ", " ) + "]";
- }
- else if ( o instanceof Notification )
- {
- result = toString( (Notification)o );
- }
- else if ( o instanceof Attribute )
- {
- result = toString( (Attribute)o );
- }
- else if ( o instanceof Map )
- {
- result = toString( (Map)o );
- }
- else
- {
- result = o.toString();
- }
- return( result );
- }
-
-
- public static String
- toString( final Attribute a )
- {
- return a.getName() + "=" + toString( a.getValue() );
- }
-
- private static void
- append( final StringBuffer b, final Object o)
- {
- if ( b != null && b.length() != 0 )
- {
- b.append( ", " );
- }
-
- b.append( o.toString() );
- }
-
- public static String
- toString( final Notification notif )
- {
- final StringBuffer b = new StringBuffer();
-
- append( b, "#" + notif.getSequenceNumber() );
- append( b, new java.util.Date( notif.getTimeStamp() ) );
- append( b, SampleUtil.quote( notif.getSource() ) );
- append( b, notif.getType() );
-
- append( b, "UserData = " + toString( notif.getUserData() ) );
-
- if ( notif instanceof MBeanServerNotification )
- {
- // this should really be done in a MBeanServerNotificationStringifier!
- final MBeanServerNotification n = (MBeanServerNotification)notif;
-
- append( b, SampleUtil.quote( n.getMBeanName() ) );
- }
- else if ( notif instanceof AttributeChangeNotification )
- {
- final AttributeChangeNotification a = (AttributeChangeNotification)notif;
- append( b, quote( a.getAttributeName() ) +
- ", OldValue = " + quote( toString( a.getOldValue() )) +
- ", NewValue = " + quote( toString( a.getNewValue() )) );
- }
-
- return( b.toString() );
- }
-
-
+ private SampleUtil() {}
- public static String
- arrayToString(
- final Object[] a,
- final String prefix,
- final String suffix )
- {
- final StringBuffer buf = new StringBuffer();
-
- for( int i = 0; i < a.length; ++i )
- {
- if ( prefix != null )
- {
- buf.append( prefix );
- }
-
- buf.append( toString( a[ i ] ) );
-
- if ( suffix != null && i < a.length )
- {
- buf.append( suffix );
- }
- }
-
- return( buf.toString() );
- }
-
-
- public static String
- toString( final Map m )
- {
- return( mapToString( m, "\n" ) );
- }
-
- public static String
- mapToString( final Map m, final String separator )
- {
- if ( m == null )
- {
- return( "null" );
- }
-
- final StringBuffer buf = new StringBuffer();
-
- final Iterator iter = m.keySet().iterator();
- while ( iter.hasNext() )
- {
- final Object key = iter.next();
- final Object value = m.get( key );
-
- buf.append( key + "=" + SampleUtil.toString( value ) + separator );
- }
- if ( buf.length() != 0 )
- {
- // strip trailing separator
- buf.setLength( buf.length() - separator.length() );
- }
-
- return( buf.toString() );
- }
-
-
- /**
- Get the chain of exceptions via getCause(). The first element is the
- Exception passed.
-
- @param start the Exception to traverse
- @return a Throwable[] or an Exception[] as appropriate
- */
- public static Throwable[]
- getCauses( final Throwable start )
- {
- final List list = new ArrayList();
-
- boolean haveNonException = false;
-
- Throwable t = start;
- while ( t != null )
- {
- list.add( t );
-
- if ( ! ( t instanceof Exception ) )
- {
- haveNonException = true;
- }
-
- final Throwable temp = t.getCause();
- if ( temp == null )
- break;
- t = temp;
- }
-
- final Throwable[] results = haveNonException ?
- new Throwable[ list.size() ] : new Exception[ list.size() ];
-
- list.toArray( results );
-
- return( results );
- }
-
-
- /**
- Get the original troublemaker.
-
- @param e the Exception to dig into
- @return the original Throwable that started the problem
- */ public static Throwable
- getRootCause( final Throwable e )
- {
- final Throwable[] causes = getCauses( e );
-
- return( causes[ causes.length - 1 ] );
- }
-
- /**
- Create a new Set containing all array elements.
- */
- public static Set
- newSet( final Object [] objects )
- {
- return( newSet( objects, 0, objects.length ) );
- }
+ public static void
+ println( Object o )
+ {
+ System.out.println( toString( o ) );
+ }
+
+ /**
+ Display a Map to System.out.
+ */
+ public static void
+ displayMap(
+ final String msg,
+ final Map m)
+ {
+ println( msg + ": " + toString( m.keySet() ) );
+ }
- /**
- Create a new Set containing all array elements.
- */
- public static Set
- newSet(
- final Object [] objects,
- final int startIndex,
- final int numItems )
- {
- final Set set = new HashSet();
-
- for( int i = 0; i < numItems; ++i )
- {
- set.add( objects[ startIndex + i ] );
- }
+ private static final String QUOTE_CHAR = "\"";
+ public static String
+ quote( final Object o )
+ {
+ if ( o == null )
+ {
+ return quote( "null" );
+ }
- return( set );
- }
+ return( QUOTE_CHAR + o.toString() + QUOTE_CHAR );
+ }
+
+ public static String
+ toString( final Object o )
+ {
+ String result = null;
+
+ if ( o == null )
+ {
+ result = "null";
+ }
+ else if ( o instanceof Object[] )
+ {
+ result = "[" + arrayToString( (Object[])o, null, ", " ) + "]";
+ }
+ else if ( o instanceof Notification )
+ {
+ result = toString( (Notification)o );
+ }
+ else if ( o instanceof Attribute )
+ {
+ result = toString( (Attribute)o );
+ }
+ else if ( o instanceof Map )
+ {
+ result = toString( (Map)o );
+ }
+ else
+ {
+ result = o.toString();
+ }
+ return( result );
+ }
+
+
+ public static String
+ toString( final Attribute a )
+ {
+ return a.getName() + "=" + toString( a.getValue() );
+ }
+
+ private static void
+ append( final StringBuffer b, final Object o)
+ {
+ if ( b != null && b.length() != 0 )
+ {
+ b.append( ", " );
+ }
+
+ b.append( o.toString() );
+ }
+
+ public static String
+ toString( final Notification notif )
+ {
+ final StringBuffer b = new StringBuffer();
+
+ append( b, "#" + notif.getSequenceNumber() );
+ append( b, new java.util.Date( notif.getTimeStamp() ) );
+ append( b, SampleUtil.quote( notif.getSource() ) );
+ append( b, notif.getType() );
+
+ append( b, "UserData = " + toString( notif.getUserData() ) );
+
+ if ( notif instanceof MBeanServerNotification )
+ {
+ // this should really be done in a MBeanServerNotificationStringifier!
+ final MBeanServerNotification n = (MBeanServerNotification)notif;
+
+ append( b, SampleUtil.quote( n.getMBeanName() ) );
+ }
+ else if ( notif instanceof AttributeChangeNotification )
+ {
+ final AttributeChangeNotification a = (AttributeChangeNotification)notif;
+ append( b, quote( a.getAttributeName() ) +
+ ", OldValue = " + quote( toString( a.getOldValue() )) +
+ ", NewValue = " + quote( toString( a.getNewValue() )) );
+ }
+
+ return( b.toString() );
+ }
+
+
+
+ public static String
+ arrayToString(
+ final Object[] a,
+ final String prefix,
+ final String suffix )
+ {
+ final StringBuffer buf = new StringBuffer();
+
+ for( int i = 0; i < a.length; ++i )
+ {
+ if ( prefix != null )
+ {
+ buf.append( prefix );
+ }
+
+ buf.append( toString( a[ i ] ) );
+
+ if ( suffix != null && i < a.length )
+ {
+ buf.append( suffix );
+ }
+ }
+
+ return( buf.toString() );
+ }
+
+
+ public static String
+ toString( final Map m )
+ {
+ return( mapToString( m, "\n" ) );
+ }
+
+ public static String
+ mapToString( final Map m, final String separator )
+ {
+ if ( m == null )
+ {
+ return( "null" );
+ }
+
+ final StringBuffer buf = new StringBuffer();
+
+ final Iterator iter = m.keySet().iterator();
+ while ( iter.hasNext() )
+ {
+ final Object key = iter.next();
+ final Object value = m.get( key );
+
+ buf.append( key + "=" + SampleUtil.toString( value ) + separator );
+ }
+ if ( buf.length() != 0 )
+ {
+ // strip trailing separator
+ buf.setLength( buf.length() - separator.length() );
+ }
+
+ return( buf.toString() );
+ }
+
+
+ /**
+ Get the chain of exceptions via getCause(). The first element is the
+ Exception passed.
+
+ @param start the Exception to traverse
+ @return a Throwable[] or an Exception[] as appropriate
+ */
+ public static Throwable[]
+ getCauses( final Throwable start )
+ {
+ final List list = new ArrayList();
+
+ boolean haveNonException = false;
+
+ Throwable t = start;
+ while ( t != null )
+ {
+ list.add( t );
+
+ if ( ! ( t instanceof Exception ) )
+ {
+ haveNonException = true;
+ }
+
+ final Throwable temp = t.getCause();
+ if ( temp == null )
+ break;
+ t = temp;
+ }
+
+ final Throwable[] results = haveNonException ?
+ new Throwable[ list.size() ] : new Exception[ list.size() ];
+
+ list.toArray( results );
+
+ return( results );
+ }
+
+
+ /**
+ Get the original troublemaker.
+
+ @param e the Exception to dig into
+ @return the original Throwable that started the problem
+ */ public static Throwable
+ getRootCause( final Throwable e )
+ {
+ final Throwable[] causes = getCauses( e );
+
+ return( causes[ causes.length - 1 ] );
+ }
+
+ /**
+ Create a new Set containing all array elements.
+ */
+ public static Set
+ newSet( final Object [] objects )
+ {
+ return( newSet( objects, 0, objects.length ) );
+ }
+
+
+ /**
+ Create a new Set containing all array elements.
+ */
+ public static Set
+ newSet(
+ final Object [] objects,
+ final int startIndex,
+ final int numItems )
+ {
+ final Set set = new HashSet();
+
+ for( int i = 0; i < numItems; ++i )
+ {
+ set.add( objects[ startIndex + i ] );
+ }
+
+ return( set );
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/Samples.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/Samples.java
index 9c806f5..abbcc31 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/Samples.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/Samples.java
@@ -72,909 +72,909 @@
/**
- Main class demonstrating a variety of MBean API (AMX) usages.
+ Main class demonstrating a variety of MBean API (AMX) usages.
*/
public final class Samples
{
- private final DomainRoot mDomainRoot;
+ private final DomainRoot mDomainRoot;
- public
- Samples( final DomainRoot domainRoot )
- {
- mDomainRoot = domainRoot;
- }
-
+ public
+ Samples( final DomainRoot domainRoot )
+ {
+ mDomainRoot = domainRoot;
+ }
- public final DomainRoot
- getDomainRoot()
- {
- return( mDomainRoot );
- }
-
- public DomainConfig
- getDomainConfig()
- {
- return( getDomainRoot().getDomainConfig() );
- }
-
- public QueryMgr
- getQueryMgr()
- {
- return( getDomainRoot().getQueryMgr() );
- }
-
- /**
- Print a message.
- */
- public void
- println( Object o )
- {
- System.out.println( toString( o ) );
- }
-
- /**
- Turn an object into a useful String
- */
- public String
- toString( Object o )
- {
- return( SampleUtil.toString( o ) );
- }
-
- /**
- Display a Map to System.out.
- */
- private void
- displayMap(
- final String msg,
- final Map m)
- {
- println( msg + ": " + toString( m.keySet() ) );
- }
- /**
- Demonstrates how to access various types of {@link AMX} by obtaining a Map and then displaying it.
- */
- public void
- handleList()
- {
- final DomainConfig dcp = getDomainConfig();
-
- // Top-level items
- println( "\n--- Top-level --- \n" );
-
- displayMap( "ConfigConfig", dcp.getConfigConfigMap() );
-
- displayMap( "ServerConfig", dcp.getServerConfigMap() );
-
- displayMap( "StandaloneServerConfig", dcp.getStandaloneServerConfigMap() );
-
- displayMap( "ClusteredServerConfig", dcp.getClusteredServerConfigMap() );
-
- displayMap( "ClusterConfig", dcp.getClusterConfigMap() );
-
-
- // deployed items
- println( "\n--- DeployedItems --- \n" );
- displayMap( "J2EEApplicationConfig", dcp.getJ2EEApplicationConfigMap() );
- displayMap( "EJBModuleConfig", dcp.getEJBModuleConfigMap() );
- displayMap( "WebModuleConfig", dcp.getWebModuleConfigMap() );
- displayMap( "RARModuleConfig", dcp.getRARModuleConfigMap() );
- displayMap( "AppClientModuleConfig", dcp.getAppClientModuleConfigMap() );
- displayMap( "LifecycleModuleConfig", dcp.getLifecycleModuleConfigMap() );
-
-
- // resources
- println( "\n--- Resources --- \n" );
-
- displayMap( "CustomResourceConfig", dcp.getCustomResourceConfigMap() );
- displayMap( "PersistenceManagerFactoryResourceConfig",
- dcp.getPersistenceManagerFactoryResourceConfigMap() );
- displayMap( "JNDIResourceConfig", dcp.getJNDIResourceConfigMap() );
- displayMap( "JMSResourceConfig", dcp.getJMSResourceConfigMap() );
- displayMap( "JDBCResourceConfig", dcp.getJDBCResourceConfigMap() );
- displayMap( "ConnectorResourceConfig", dcp.getConnectorResourceConfigMap() );
- displayMap( "JDBCConnectionPoolConfig", dcp.getJDBCConnectionPoolConfigMap() );
- displayMap( "PersistenceManagerFactoryResourceConfig",
- dcp.getPersistenceManagerFactoryResourceConfigMap() );
- displayMap( "ConnectorConnectionPoolConfig",
- dcp.getConnectorConnectionPoolConfigMap() );
- displayMap( "AdminObjectResourceConfig", dcp.getAdminObjectResourceConfigMap() );
- displayMap( "ResourceAdapterConfig", dcp.getResourceAdapterConfigMap() );
- displayMap( "MailResourceConfig", dcp.getMailResourceConfigMap() );
-
-
- // get a ConfigConfig
- final ConfigConfig config =
- (ConfigConfig)dcp.getConfigConfigMap().get( "server-config" );
-
+ public final DomainRoot
+ getDomainRoot()
+ {
+ return( mDomainRoot );
+ }
- // HTTPService
- println( "\n--- HTTPService --- \n" );
-
- final HTTPServiceConfig httpService = config.getHTTPServiceConfig();
- displayMap( "HTTPListeners", httpService.getHTTPListenerConfigMap() );
- displayMap( "VirtualServers", httpService.getVirtualServerConfigMap() );
- }
-
- /**
- Return a Set of {@link AMX} whose ObjectName has the property
- <i>property-name</i>=<i>property-value</i>.
-
- @param propertyName
- @param propertyValue
- @return Set of {@link AMX}
- */
- public Set
- queryWild(
- final String propertyName,
- final String propertyValue)
- {
- final String[] propNames = new String[] { propertyName };
- final String[] propValues = new String[]{ propertyValue };
-
- final Set amxs = getQueryMgr().queryWildSet( propNames, propValues );
-
- return( amxs );
- }
-
- /**
- Call queryWild( propertyName, propertyValue ) and display the result.
-
- @param propertyName
- @param propertyValue
- */
- public void
- displayWild(
- final String propertyName,
- final String propertyValue)
- {
- final Set items = queryWild( propertyName, propertyValue );
-
- println( "\n--- Queried for " + propertyName + "=" + propertyValue + " ---" );
- final Iterator iter = items.iterator();
- while ( iter.hasNext() )
- {
- final AMX item = (AMX)iter.next();
-
- println( "j2eeType=" + item.getJ2EEType() + "," + "name=" + item.getName() );
- }
- }
-
- public Set
- queryForJ2EEType( final String j2eeType )
- {
- final String prop = Util.makeJ2EETypeProp( j2eeType );
- final Set items = getQueryMgr().queryPropsSet( prop );
-
- return( items );
- }
-
- public void
- displayAvailableChildTypes( final String j2eeType )
- {
- final DomainRoot domainRoot = getDomainRoot();
-
- }
-
- private String
- getIndent( final int num )
- {
- final char[] indent = new char[ num ];
- for( int i = 0; i < num; ++i )
- {
- indent[ i ] = ' ';
- }
- return( new String( indent ) );
- }
-
- /**
- Display the j2eeType and name (if not {@link AMX#NO_NAME})
- */
- private void
- displayAMX(
- final AMX amx,
- final int indentCount )
- {
- final String indent = getIndent( indentCount );
-
- final String j2eeType = amx.getJ2EEType();
- final String name = amx.getName();
- if ( name.equals( AMX.NO_NAME ) )
- {
- println( indent + j2eeType );
- }
- else
- {
- println( indent + j2eeType + "=" + name );
- }
- }
-
- private void
- displayHierarchy(
- final Collection amxSet,
- final int indentCount )
- {
- final Iterator iter = amxSet.iterator();
- while ( iter.hasNext() )
- {
- final AMX amx = (AMX)iter.next();
- displayHierarchy( amx, indentCount );
- }
- }
-
- /**
- Display the hierarchy of {@link AMX} beginning with the specified one
- */
- public void
- displayHierarchy(
- final AMX amx,
- final int indentCount )
- {
- displayAMX( amx, indentCount );
-
- if ( amx instanceof Container )
- {
- // get Maps of all contained items
- final Map m = ((Container)amx).getMultiContaineeMap( null );
+ public DomainConfig
+ getDomainConfig()
+ {
+ return( getDomainRoot().getDomainConfig() );
+ }
- // for clarity of display, separate out those that are Containers,
- // and those that are not.
- final Set deferred = new HashSet();
- final Iterator mapsIter = m.values().iterator();
- while ( mapsIter.hasNext() )
- {
- final Map instancesMap = (Map)mapsIter.next();
- final AMX first = (AMX)instancesMap.values().iterator().next();
- if ( first instanceof Container )
- {
- deferred.add( instancesMap );
- }
- else
- {
- displayHierarchy( instancesMap.values(), indentCount + 2);
- }
- }
-
- // display deferred items
- final Iterator iter = deferred.iterator();
- while ( iter.hasNext() )
- {
- final Map instancesMap = (Map)iter.next();
- displayHierarchy( instancesMap.values(), indentCount + 2);
- }
- }
-
- }
-
- /**
- Display the entire MBean hierarchy.
- */
- public void
- displayHierarchy()
- {
- displayHierarchy( getDomainRoot(), 0);
- }
-
- /**
- Display the MBean hierarchy beginning with j2eeType.
- */
- public void
- displayHierarchy( final String j2eeType )
- {
- final Set items = getQueryMgr().queryJ2EETypeSet( j2eeType );
-
- if ( items.size() == 0 )
- {
- println( "No {@link AMX} of j2eeType " + SampleUtil.quote( j2eeType ) + " found" );
- }
- else
- {
- displayHierarchy( items, 0);
- }
- }
-
-
- /**
- Display all MBeans that have j2eeType=<j2eeType>
- */
- public void
- displayJ2EEType( final String j2eeType )
- {
- final Set items = queryForJ2EEType( j2eeType );
-
- println( "\n--- Queried for j2eeType=" + j2eeType + " ---" );
-
- final Iterator iter = items.iterator();
- while ( iter.hasNext() )
- {
- final AMX item = (AMX)iter.next();
-
- // they may or may not have unique names, so show ObjectNames
- println( Util.getObjectName( item ) );
- }
- println( "" );
- }
-
-
- /**
- Display all Attributes in the {@link AMX}.
- */
- public void
- displayAllAttributes( final AMX item )
- {
- println( "\n--- Attributes for " + item.getJ2EEType() + "=" + item.getName() + " ---" );
-
- final Extra extra = Util.getExtra( item );
-
- final Map attrs = extra.getAllAttributes();
-
- final Iterator iter = attrs.keySet().iterator();
- while ( iter.hasNext() )
- {
- final String name = (String)iter.next();
- final Object value = attrs.get( name );
-
- println( name + "=" + toString( value ) );
- }
- }
-
- /**
- Display all Attributes in the {@link AMX}.
- */
- public void
- displayAllAttributes( final String j2eeType )
- {
- final Set items = queryForJ2EEType( j2eeType );
-
- if ( items.size() == 0 )
- {
- println( "No {@link AMX} of j2eeType " + SampleUtil.quote( j2eeType ) + " found" );
- }
- else
- {
- final Iterator iter = items.iterator();
- while ( iter.hasNext() )
- {
- final AMX amx = (AMX)iter.next();
-
- displayAllAttributes( amx );
- println( "" );
- }
- }
- }
-
-
- /**
- Display all dotted names.
- */
- public void
- displayDottedNames()
- {
- final ConfigDottedNames configDottedNames = getDomainRoot().getConfigDottedNames();
- Attribute[] result = (Attribute[])configDottedNames.dottedNameGet( "*" );
- println( "--- ConfigDottedNames ---" );
- println( SampleUtil.arrayToString( result, "", "\n" ) );
-
- println( "\n--- MonitoringDottedNames ---" );
-
- final MonitoringDottedNames monDottedNames = getDomainRoot().getMonitoringDottedNames();
- result = (Attribute[])monDottedNames.dottedNameGet( "*" );
- println( SampleUtil.arrayToString( result, "", "\n" ) );
- }
-
-
- /**
- Demonstrate how to use the {@link com.sun.appserv.management.base.QueryMgr} facilities.
- */
- public void
- demoQuery()
- {
- displayWild( AMX.J2EE_TYPE_KEY, "X-*ResourceConfig" );
- displayWild( AMX.J2EE_TYPE_KEY, "X-*ServerConfig" );
-
- displayJ2EEType( XTypes.SSL_CONFIG );
- displayJ2EEType( XTypes.CLUSTER_CONFIG );
- }
+ public QueryMgr
+ getQueryMgr()
+ {
+ return( getDomainRoot().getQueryMgr() );
+ }
-
- private Object
- uploadArchive( final File archive )
- throws IOException
- {
- final FileInputStream input = new FileInputStream( archive );
- final long length = input.available();
- final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
- final Object uploadID = mgr.initiateFileUpload( length );
-
- try
- {
- final int chunkSize = 256 * 1024;
- long remaining = length;
- while ( remaining != 0 )
- {
- final int actual = remaining < chunkSize ? (int)remaining : chunkSize;
-
- final byte[] bytes = new byte[ actual ];
- final int num = input.read( bytes );
- if ( num != actual )
- {
- throw new IOException();
- }
+ /**
+ Print a message.
+ */
+ public void
+ println( Object o )
+ {
+ System.out.println( toString( o ) );
+ }
- mgr.uploadBytes( uploadID, bytes );
- remaining -= actual;
- }
- }
- finally
- {
- input.close();
- }
-
- return( uploadID );
- }
-
-
- private final String
- getAppName( final String archiveName )
- {
- String result = archiveName;
-
- final int idx = archiveName.lastIndexOf( "." );
- if ( idx > 1 )
- {
- result = archiveName.substring( 0, idx );
- }
-
- return( result );
- }
-
- /**
- Deploy an archive.
- <p>
- To deploy, you will need an archive to deploy. A recommended sample may be found at:
- <i>INSTALL_ROOT</i>/samples/ejb/stateless/apps/simple.ear
- <p>
- This sample deploys the archive to the domain, but does not create any references
- to it, so it will not actually be associated with any server.
- <p>
- To associate an application with a server, use
- {@link StandaloneServerConfig#createDeployedItemRefConfig}
- @see com.sun.appserv.management.config.StandaloneServerConfig
- @see com.sun.appserv.management.config.DeployedItemRefConfigCR
- */
- public void
- deploy( final File archive )
- throws IOException
- {
- final Object uploadID = uploadArchive( archive );
- final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
-
- final Object deployID = mgr.initDeploy( );
- final DeployNotificationListener myListener = new DeployNotificationListener( deployID);
- mgr.addNotificationListener( myListener, null, null);
-
- try
- {
- final Map options = new HashMap();
-
- final String archiveName = archive.getName();
- final String deployName = getAppName( archiveName );
- SampleUtil.println( "Deploying " + archiveName + " as " + deployName );
-
- options.put( DeploymentMgr.DEPLOY_OPTION_NAME_KEY, deployName );
- options.put( DeploymentMgr.DEPLOY_OPTION_VERIFY_KEY, Boolean.TRUE.toString() );
- options.put( DeploymentMgr.DEPLOY_OPTION_DESCRIPTION_KEY, "description" );
-
-
- mgr.startDeploy( deployID, uploadID, null, options);
-
- while ( ! myListener.isCompleted() )
- {
- try
- {
- println( "deploy: waiting for deploy of " + archive);
- Thread.sleep( 1000 );
- }
- catch( InterruptedException e )
- {
- }
- }
-
- final DeploymentStatus status = myListener.getDeploymentStatus();
- final Map additionalStatus = status.getAdditionalStatus();
- final String moduleID =
- (String)additionalStatus.get( DeploymentStatus.MODULE_ID_KEY );
-
- SampleUtil.println( "Deployed " + quote(archiveName) + " as " + quote(deployName) +
- ": status=" + status.getStageStatus() + ", moduleID = " + quote(moduleID) +
- ", AdditionalStatus=" + SampleUtil.mapToString( additionalStatus, " ") );
-
- if ( ! deployName.equals( moduleID ) )
- {
- SampleUtil.println( "WARNING: requested name of " + quote(deployName) +
- " has not been used, actual name = " + quote(moduleID) +
- ", see bug #6218714" );
- }
-
- if ( status.getStageThrowable() != null )
- {
- status.getStageThrowable().printStackTrace();
- }
- }
- finally
- {
- try
- {
- mgr.removeNotificationListener( myListener );
- }
- catch( Exception e )
- {
- }
- }
- }
-
- private String
- quote( final String s )
- {
- return SampleUtil.quote( s );
- }
-
- /**
- Undeploys a deployed module.
- */
- public void
- undeploy( final String moduleName )
- throws IOException
- {
- final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
-
- final Map statusData = mgr.undeploy( moduleName, null );
- final DeploymentStatus status =
- DeploymentSupport.mapToDeploymentStatus( statusData );
-
- println( "Undeployment result: " + status.getStageStatus() );
- if ( status.getStageThrowable() != null )
- {
- status.getStageThrowable().printStackTrace();
- }
- }
-
- /**
- Get a J2EEServer by name.
- */
- public J2EEServer
- getJ2EEServer( final String serverName )
- {
- final J2EEDomain j2eeDomain = getDomainRoot().getJ2EEDomain();
- final Map servers = j2eeDomain.getServerMap();
- final J2EEServer server = (J2EEServer)servers.get( serverName );
-
- if ( server == null )
- {
- throw new IllegalArgumentException( serverName );
- }
-
- return( server );
- }
-
- /**
- Create a standalone server.
-
- @param configName
- */
- public ConfigConfig
- createConfig( final String configName )
- {
- final ConfigConfig config = getDomainConfig().createConfigConfig( configName, null );
- return( config );
- }
-
- /**
- Create a standalone server.
-
- @param serverName
- */
- public StandaloneServerConfig
- createServer(
- final String serverName,
- final String configName )
- {
- final String nodeAgentName = null;
-
- final StandaloneServerConfig server = (StandaloneServerConfig)
- getDomainConfig().createStandaloneServerConfig( serverName, nodeAgentName, configName, null );
-
- return( server );
- }
-
- public StandaloneServerConfig
- createServer( final String serverName )
- {
- final ConfigConfig config = createConfig( serverName + "-config" );
-
- final StandaloneServerConfig server = createServer( serverName, config.getName() );
- return( server );
- }
-
-
- /**
- Start a server.
- */
- public void
- startServer( final String serverName )
- {
- final J2EEServer server = getJ2EEServer( serverName );
-
- server.start();
- }
-
- /**
- Stop a server.
- */
- public void
- stopServer( final String serverName )
- {
- final J2EEServer server = getJ2EEServer( serverName );
-
- server.stop();
- }
-
-
- private static final Set LEGAL_MON =
- Collections.unmodifiableSet( SampleUtil.newSet( new String[]
- {
- ModuleMonitoringLevelValues.HIGH,
- ModuleMonitoringLevelValues.LOW,
- ModuleMonitoringLevelValues.OFF,
- } ));
-
- /**
- Sets the monitoring state for all available modules.
-
- @param configName configuration element on which to operate
- @param state one of HIGH, LOW, OFF
- */
- public void
- setMonitoring(
- final String configName,
- final String state )
- {
- if ( ! LEGAL_MON.contains( state ) )
- {
- throw new IllegalArgumentException( state );
- }
-
- final ConfigConfig config =
- (ConfigConfig)getDomainConfig().getConfigConfigMap().get( configName );
-
- final ModuleMonitoringLevelsConfig mon =
- config.getMonitoringServiceConfig().getModuleMonitoringLevelsConfig();
-
- // set all modules to the same state
- mon.setConnectorConnectionPool( state );
- mon.setThreadPool( state );
- mon.setHTTPService( state );
- mon.setJDBCConnectionPool( state );
- mon.setORB( state );
- mon.setTransactionService( state );
- mon.setWebContainer( state );
- mon.setEJBContainer( state );
- }
-
- /**
- Get a Map of <i>property-name</i>=<i>property-value</i>.
-
- @param pa a PropertiesAccess
- */
- public Map
- getProperties( final PropertiesAccess pa )
- {
- final HashMap m = new HashMap();
-
- final String[] names = pa.getPropertyNames();
- for( int i = 0; i < names.length; ++i )
- {
- m.put( names[ i ], pa.getPropertyValue( names[ i ] ) );
- }
-
- return( m );
- }
-
- /**
- Display all properties found on all {@link AMX}.
-
- @see #getProperties(PropertiesAccess)
- @see PropertiesAccess#getPropertyNames
- */
- public void
- displayAllProperties( )
- {
- final Iterator iter = getQueryMgr().queryAllSet().iterator();
- while ( iter.hasNext() )
- {
- final AMX amx = (AMX)iter.next();
-
- if ( amx instanceof PropertiesAccess )
- {
- final PropertiesAccess pa = (PropertiesAccess)amx;
-
- final Map props = getProperties( pa );
- if ( props.keySet().size() != 0 )
- {
- println( "\nProperties for: " + Util.getObjectName( (AMX)pa ) );
- println( SampleUtil.mapToString( getProperties( pa ), "\n") );
- }
- }
- }
- }
-
- private void
- mySleep( final long millis )
- {
- try
- {
- Thread.sleep( millis );
- }
- catch( InterruptedException e )
- {
- }
- }
-
-
- public final static String MBEAN_SERVER_DELEGATE =
- "JMImplementation:type=MBeanServerDelegate";
- public static ObjectName
- getMBeanServerDelegateObjectName()
- {
- return( Util.newObjectName( MBEAN_SERVER_DELEGATE ) );
- }
-
-
- private void
- waitNumNotifs( final Map notifs, final String type, final int numRequired )
- {
- while ( true )
- {
- final List list = (List)notifs.get( type );
- if ( list != null && list.size() >= numRequired )
- {
- break;
- }
+ /**
+ Turn an object into a useful String
+ */
+ public String
+ toString( Object o )
+ {
+ return( SampleUtil.toString( o ) );
+ }
- mySleep( 50 );
- }
- }
-
-
-
- private void
- waitMBeanServerNotification(
- final SampleListener listener,
- final String type,
- final ObjectName objectName )
- {
- List list = null;
- while ( (list = listener.getNotifsReceived( type )) == null )
- {
- mySleep( 50 );
- }
-
- boolean waiting = true;
- while ( waiting )
- {
- final Iterator iter = list.iterator();
- while ( iter.hasNext() )
- {
- final MBeanServerNotification notif = (MBeanServerNotification)iter.next();
- if ( notif.getMBeanName().equals( objectName ) )
- {
- waiting = false;
- break;
- }
- else
- {
- SampleUtil.println( "Unexpected ObjectName: " + objectName + " != " + notif.getMBeanName() );
- }
- }
- mySleep( 100 );
- }
- }
-
-
- /**
- Demonstrates the use of a javax.management.monitor MBean
- to be notified of changes in the value of an Attribute.
- */
- public void
- demoJMXMonitor()
- throws InstanceNotFoundException, IOException
- {
- final JMXMonitorMgr mgr = getDomainRoot().getJMXMonitorMgr();
-
- final String attrName = "SampleString";
- final String attrValue = "hello";
-
- // listen to the MBeanServerDelegate, too, so we can see our sample monitor
- // get registered.
- final SampleListener sampleListener = new SampleListener();
- final MBeanServerConnection conn =
- Util.getExtra( mgr ).getConnectionSource().getExistingMBeanServerConnection();
- conn.addNotificationListener(
- getMBeanServerDelegateObjectName(), sampleListener, null, null );
-
-
- final Sample sample = (Sample)getDomainRoot().getContainee( XTypes.SAMPLE );
-
- final String monitorName = "SampleStringMonitor";
- AMXStringMonitor mon = null;
- try
- {
- // cleanup in case it was left around by mistake...
- try { mgr.remove( monitorName ); } catch( Exception e ) {}
-
- // create a new one
- mon = mgr.createStringMonitor( monitorName );
- // observer that we've been notified (not required)
- waitMBeanServerNotification( sampleListener,
- MBeanServerNotification.REGISTRATION_NOTIFICATION, Util.getObjectName( mon ) );
-
- // we'll modify this Attribute's value, to force a change
- sample.addAttribute( attrName, attrValue );
-
- // listen to the monitor
- mon.addNotificationListener( sampleListener, null, null );
- mon.setObservedAttribute( attrName );
- mon.setStringToCompare( attrValue );
- mon.setNotifyDiffer( true );
- mon.setNotifyMatch( true );
-
- // tell the monitor to observe sample
- mon.addObservedObject( Util.getObjectName( sample ) );
-
- // since the Attribute was added dynamically, there is no
- // getter method, so we must access the Attribute via JMX
- final StdAttributesAccess attrs = Util.getExtra( sample );
- attrs.setAttribute( new Attribute( attrName, "goodbye" ) );
- // set it to original value
- attrs.setAttribute( new Attribute( attrName, attrValue ) );
-
- // we added it,so we should remove it
- sample.removeAttribute( attrName );
-
- // let the Notifications arrive...
- final Map notifs = sampleListener.getNotifsReceived();
- waitNumNotifs( notifs, AttributeChangeNotification.ATTRIBUTE_CHANGE, 4 );
- }
- catch( Throwable t )
- {
- t.printStackTrace();
- }
- finally
- {
- try
- {
- mon.removeNotificationListener( sampleListener );
-
- // don't leave monitors around
- if ( mon != null )
- {
- mgr.remove( mon.getName() );
- // observer that we've been notified (not required)
- waitMBeanServerNotification( sampleListener,
- MBeanServerNotification.UNREGISTRATION_NOTIFICATION,
- Util.getObjectName( mon ) );
- }
-
- conn.removeNotificationListener(
- getMBeanServerDelegateObjectName(), sampleListener );
- }
- catch( ListenerNotFoundException e )
- {
- }
- }
- }
+ /**
+ Display a Map to System.out.
+ */
+ private void
+ displayMap(
+ final String msg,
+ final Map m)
+ {
+ println( msg + ": " + toString( m.keySet() ) );
+ }
+
+ /**
+ Demonstrates how to access various types of {@link AMX} by obtaining a Map and then displaying it.
+ */
+ public void
+ handleList()
+ {
+ final DomainConfig dcp = getDomainConfig();
+
+ // Top-level items
+ println( "\n--- Top-level --- \n" );
+
+ displayMap( "ConfigConfig", dcp.getConfigConfigMap() );
+
+ displayMap( "ServerConfig", dcp.getServerConfigMap() );
+
+ displayMap( "StandaloneServerConfig", dcp.getStandaloneServerConfigMap() );
+
+ displayMap( "ClusteredServerConfig", dcp.getClusteredServerConfigMap() );
+
+ displayMap( "ClusterConfig", dcp.getClusterConfigMap() );
+
+
+ // deployed items
+ println( "\n--- DeployedItems --- \n" );
+ displayMap( "J2EEApplicationConfig", dcp.getJ2EEApplicationConfigMap() );
+ displayMap( "EJBModuleConfig", dcp.getEJBModuleConfigMap() );
+ displayMap( "WebModuleConfig", dcp.getWebModuleConfigMap() );
+ displayMap( "RARModuleConfig", dcp.getRARModuleConfigMap() );
+ displayMap( "AppClientModuleConfig", dcp.getAppClientModuleConfigMap() );
+ displayMap( "LifecycleModuleConfig", dcp.getLifecycleModuleConfigMap() );
+
+
+ // resources
+ println( "\n--- Resources --- \n" );
+
+ displayMap( "CustomResourceConfig", dcp.getCustomResourceConfigMap() );
+ displayMap( "PersistenceManagerFactoryResourceConfig",
+ dcp.getPersistenceManagerFactoryResourceConfigMap() );
+ displayMap( "JNDIResourceConfig", dcp.getJNDIResourceConfigMap() );
+ displayMap( "JMSResourceConfig", dcp.getJMSResourceConfigMap() );
+ displayMap( "JDBCResourceConfig", dcp.getJDBCResourceConfigMap() );
+ displayMap( "ConnectorResourceConfig", dcp.getConnectorResourceConfigMap() );
+ displayMap( "JDBCConnectionPoolConfig", dcp.getJDBCConnectionPoolConfigMap() );
+ displayMap( "PersistenceManagerFactoryResourceConfig",
+ dcp.getPersistenceManagerFactoryResourceConfigMap() );
+ displayMap( "ConnectorConnectionPoolConfig",
+ dcp.getConnectorConnectionPoolConfigMap() );
+ displayMap( "AdminObjectResourceConfig", dcp.getAdminObjectResourceConfigMap() );
+ displayMap( "ResourceAdapterConfig", dcp.getResourceAdapterConfigMap() );
+ displayMap( "MailResourceConfig", dcp.getMailResourceConfigMap() );
+
+
+ // get a ConfigConfig
+ final ConfigConfig config =
+ (ConfigConfig)dcp.getConfigConfigMap().get( "server-config" );
+
+
+ // HTTPService
+ println( "\n--- HTTPService --- \n" );
+
+ final HTTPServiceConfig httpService = config.getHTTPServiceConfig();
+ displayMap( "HTTPListeners", httpService.getHTTPListenerConfigMap() );
+ displayMap( "VirtualServers", httpService.getVirtualServerConfigMap() );
+ }
+
+ /**
+ Return a Set of {@link AMX} whose ObjectName has the property
+ <i>property-name</i>=<i>property-value</i>.
+
+ @param propertyName
+ @param propertyValue
+ @return Set of {@link AMX}
+ */
+ public Set
+ queryWild(
+ final String propertyName,
+ final String propertyValue)
+ {
+ final String[] propNames = new String[] { propertyName };
+ final String[] propValues = new String[]{ propertyValue };
+
+ final Set amxs = getQueryMgr().queryWildSet( propNames, propValues );
+
+ return( amxs );
+ }
+
+ /**
+ Call queryWild( propertyName, propertyValue ) and display the result.
+
+ @param propertyName
+ @param propertyValue
+ */
+ public void
+ displayWild(
+ final String propertyName,
+ final String propertyValue)
+ {
+ final Set items = queryWild( propertyName, propertyValue );
+
+ println( "\n--- Queried for " + propertyName + "=" + propertyValue + " ---" );
+ final Iterator iter = items.iterator();
+ while ( iter.hasNext() )
+ {
+ final AMX item = (AMX)iter.next();
+
+ println( "j2eeType=" + item.getJ2EEType() + "," + "name=" + item.getName() );
+ }
+ }
+
+ public Set
+ queryForJ2EEType( final String j2eeType )
+ {
+ final String prop = Util.makeJ2EETypeProp( j2eeType );
+ final Set items = getQueryMgr().queryPropsSet( prop );
+
+ return( items );
+ }
+
+ public void
+ displayAvailableChildTypes( final String j2eeType )
+ {
+ final DomainRoot domainRoot = getDomainRoot();
+
+ }
+
+ private String
+ getIndent( final int num )
+ {
+ final char[] indent = new char[ num ];
+ for( int i = 0; i < num; ++i )
+ {
+ indent[ i ] = ' ';
+ }
+ return( new String( indent ) );
+ }
+
+ /**
+ Display the j2eeType and name (if not {@link AMX#NO_NAME})
+ */
+ private void
+ displayAMX(
+ final AMX amx,
+ final int indentCount )
+ {
+ final String indent = getIndent( indentCount );
+
+ final String j2eeType = amx.getJ2EEType();
+ final String name = amx.getName();
+ if ( name.equals( AMX.NO_NAME ) )
+ {
+ println( indent + j2eeType );
+ }
+ else
+ {
+ println( indent + j2eeType + "=" + name );
+ }
+ }
+
+ private void
+ displayHierarchy(
+ final Collection amxSet,
+ final int indentCount )
+ {
+ final Iterator iter = amxSet.iterator();
+ while ( iter.hasNext() )
+ {
+ final AMX amx = (AMX)iter.next();
+ displayHierarchy( amx, indentCount );
+ }
+ }
+
+ /**
+ Display the hierarchy of {@link AMX} beginning with the specified one
+ */
+ public void
+ displayHierarchy(
+ final AMX amx,
+ final int indentCount )
+ {
+ displayAMX( amx, indentCount );
+
+ if ( amx instanceof Container )
+ {
+ // get Maps of all contained items
+ final Map m = ((Container)amx).getMultiContaineeMap( null );
+
+ // for clarity of display, separate out those that are Containers,
+ // and those that are not.
+ final Set deferred = new HashSet();
+ final Iterator mapsIter = m.values().iterator();
+ while ( mapsIter.hasNext() )
+ {
+ final Map instancesMap = (Map)mapsIter.next();
+ final AMX first = (AMX)instancesMap.values().iterator().next();
+ if ( first instanceof Container )
+ {
+ deferred.add( instancesMap );
+ }
+ else
+ {
+ displayHierarchy( instancesMap.values(), indentCount + 2);
+ }
+ }
+
+ // display deferred items
+ final Iterator iter = deferred.iterator();
+ while ( iter.hasNext() )
+ {
+ final Map instancesMap = (Map)iter.next();
+ displayHierarchy( instancesMap.values(), indentCount + 2);
+ }
+ }
+
+ }
+
+ /**
+ Display the entire MBean hierarchy.
+ */
+ public void
+ displayHierarchy()
+ {
+ displayHierarchy( getDomainRoot(), 0);
+ }
+
+ /**
+ Display the MBean hierarchy beginning with j2eeType.
+ */
+ public void
+ displayHierarchy( final String j2eeType )
+ {
+ final Set items = getQueryMgr().queryJ2EETypeSet( j2eeType );
+
+ if ( items.size() == 0 )
+ {
+ println( "No {@link AMX} of j2eeType " + SampleUtil.quote( j2eeType ) + " found" );
+ }
+ else
+ {
+ displayHierarchy( items, 0);
+ }
+ }
+
+
+ /**
+ Display all MBeans that have j2eeType=<j2eeType>
+ */
+ public void
+ displayJ2EEType( final String j2eeType )
+ {
+ final Set items = queryForJ2EEType( j2eeType );
+
+ println( "\n--- Queried for j2eeType=" + j2eeType + " ---" );
+
+ final Iterator iter = items.iterator();
+ while ( iter.hasNext() )
+ {
+ final AMX item = (AMX)iter.next();
+
+ // they may or may not have unique names, so show ObjectNames
+ println( Util.getObjectName( item ) );
+ }
+ println( "" );
+ }
+
+
+ /**
+ Display all Attributes in the {@link AMX}.
+ */
+ public void
+ displayAllAttributes( final AMX item )
+ {
+ println( "\n--- Attributes for " + item.getJ2EEType() + "=" + item.getName() + " ---" );
+
+ final Extra extra = Util.getExtra( item );
+
+ final Map attrs = extra.getAllAttributes();
+
+ final Iterator iter = attrs.keySet().iterator();
+ while ( iter.hasNext() )
+ {
+ final String name = (String)iter.next();
+ final Object value = attrs.get( name );
+
+ println( name + "=" + toString( value ) );
+ }
+ }
+
+ /**
+ Display all Attributes in the {@link AMX}.
+ */
+ public void
+ displayAllAttributes( final String j2eeType )
+ {
+ final Set items = queryForJ2EEType( j2eeType );
+
+ if ( items.size() == 0 )
+ {
+ println( "No {@link AMX} of j2eeType " + SampleUtil.quote( j2eeType ) + " found" );
+ }
+ else
+ {
+ final Iterator iter = items.iterator();
+ while ( iter.hasNext() )
+ {
+ final AMX amx = (AMX)iter.next();
+
+ displayAllAttributes( amx );
+ println( "" );
+ }
+ }
+ }
+
+
+ /**
+ Display all dotted names.
+ */
+ public void
+ displayDottedNames()
+ {
+ final ConfigDottedNames configDottedNames = getDomainRoot().getConfigDottedNames();
+ Attribute[] result = (Attribute[])configDottedNames.dottedNameGet( "*" );
+ println( "--- ConfigDottedNames ---" );
+ println( SampleUtil.arrayToString( result, "", "\n" ) );
+
+ println( "\n--- MonitoringDottedNames ---" );
+
+ final MonitoringDottedNames monDottedNames = getDomainRoot().getMonitoringDottedNames();
+ result = (Attribute[])monDottedNames.dottedNameGet( "*" );
+ println( SampleUtil.arrayToString( result, "", "\n" ) );
+ }
+
+
+ /**
+ Demonstrate how to use the {@link com.sun.appserv.management.base.QueryMgr} facilities.
+ */
+ public void
+ demoQuery()
+ {
+ displayWild( AMX.J2EE_TYPE_KEY, "X-*ResourceConfig" );
+ displayWild( AMX.J2EE_TYPE_KEY, "X-*ServerConfig" );
+
+ displayJ2EEType( XTypes.SSL_CONFIG );
+ displayJ2EEType( XTypes.CLUSTER_CONFIG );
+ }
+
+
+ private Object
+ uploadArchive( final File archive )
+ throws IOException
+ {
+ final FileInputStream input = new FileInputStream( archive );
+ final long length = input.available();
+ final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
+ final Object uploadID = mgr.initiateFileUpload( length );
+
+ try
+ {
+ final int chunkSize = 256 * 1024;
+ long remaining = length;
+ while ( remaining != 0 )
+ {
+ final int actual = remaining < chunkSize ? (int)remaining : chunkSize;
+
+ final byte[] bytes = new byte[ actual ];
+ final int num = input.read( bytes );
+ if ( num != actual )
+ {
+ throw new IOException();
+ }
+
+ mgr.uploadBytes( uploadID, bytes );
+ remaining -= actual;
+ }
+ }
+ finally
+ {
+ input.close();
+ }
+
+ return( uploadID );
+ }
+
+
+ private final String
+ getAppName( final String archiveName )
+ {
+ String result = archiveName;
+
+ final int idx = archiveName.lastIndexOf( "." );
+ if ( idx > 1 )
+ {
+ result = archiveName.substring( 0, idx );
+ }
+
+ return( result );
+ }
+
+ /**
+ Deploy an archive.
+ <p>
+ To deploy, you will need an archive to deploy. A recommended sample may be found at:
+ <i>INSTALL_ROOT</i>/samples/ejb/stateless/apps/simple.ear
+ <p>
+ This sample deploys the archive to the domain, but does not create any references
+ to it, so it will not actually be associated with any server.
+ <p>
+ To associate an application with a server, use
+ {@link StandaloneServerConfig#createDeployedItemRefConfig}
+ @see com.sun.appserv.management.config.StandaloneServerConfig
+ @see com.sun.appserv.management.config.DeployedItemRefConfigCR
+ */
+ public void
+ deploy( final File archive )
+ throws IOException
+ {
+ final Object uploadID = uploadArchive( archive );
+ final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
+
+ final Object deployID = mgr.initDeploy( );
+ final DeployNotificationListener myListener = new DeployNotificationListener( deployID);
+ mgr.addNotificationListener( myListener, null, null);
+
+ try
+ {
+ final Map options = new HashMap();
+
+ final String archiveName = archive.getName();
+ final String deployName = getAppName( archiveName );
+ SampleUtil.println( "Deploying " + archiveName + " as " + deployName );
+
+ options.put( DeploymentMgr.DEPLOY_OPTION_NAME_KEY, deployName );
+ options.put( DeploymentMgr.DEPLOY_OPTION_VERIFY_KEY, Boolean.TRUE.toString() );
+ options.put( DeploymentMgr.DEPLOY_OPTION_DESCRIPTION_KEY, "description" );
+
+
+ mgr.startDeploy( deployID, uploadID, null, options);
+
+ while ( ! myListener.isCompleted() )
+ {
+ try
+ {
+ println( "deploy: waiting for deploy of " + archive);
+ Thread.sleep( 1000 );
+ }
+ catch( InterruptedException e )
+ {
+ }
+ }
+
+ final DeploymentStatus status = myListener.getDeploymentStatus();
+ final Map additionalStatus = status.getAdditionalStatus();
+ final String moduleID =
+ (String)additionalStatus.get( DeploymentStatus.MODULE_ID_KEY );
+
+ SampleUtil.println( "Deployed " + quote(archiveName) + " as " + quote(deployName) +
+ ": status=" + status.getStageStatus() + ", moduleID = " + quote(moduleID) +
+ ", AdditionalStatus=" + SampleUtil.mapToString( additionalStatus, " ") );
+
+ if ( ! deployName.equals( moduleID ) )
+ {
+ SampleUtil.println( "WARNING: requested name of " + quote(deployName) +
+ " has not been used, actual name = " + quote(moduleID) +
+ ", see bug #6218714" );
+ }
+
+ if ( status.getStageThrowable() != null )
+ {
+ status.getStageThrowable().printStackTrace();
+ }
+ }
+ finally
+ {
+ try
+ {
+ mgr.removeNotificationListener( myListener );
+ }
+ catch( Exception e )
+ {
+ }
+ }
+ }
+
+ private String
+ quote( final String s )
+ {
+ return SampleUtil.quote( s );
+ }
+
+ /**
+ Undeploys a deployed module.
+ */
+ public void
+ undeploy( final String moduleName )
+ throws IOException
+ {
+ final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
+
+ final Map statusData = mgr.undeploy( moduleName, null );
+ final DeploymentStatus status =
+ DeploymentSupport.mapToDeploymentStatus( statusData );
+
+ println( "Undeployment result: " + status.getStageStatus() );
+ if ( status.getStageThrowable() != null )
+ {
+ status.getStageThrowable().printStackTrace();
+ }
+ }
+
+ /**
+ Get a J2EEServer by name.
+ */
+ public J2EEServer
+ getJ2EEServer( final String serverName )
+ {
+ final J2EEDomain j2eeDomain = getDomainRoot().getJ2EEDomain();
+ final Map servers = j2eeDomain.getServerMap();
+ final J2EEServer server = (J2EEServer)servers.get( serverName );
+
+ if ( server == null )
+ {
+ throw new IllegalArgumentException( serverName );
+ }
+
+ return( server );
+ }
+
+ /**
+ Create a standalone server.
+
+ @param configName
+ */
+ public ConfigConfig
+ createConfig( final String configName )
+ {
+ final ConfigConfig config = getDomainConfig().createConfigConfig( configName, null );
+ return( config );
+ }
+
+ /**
+ Create a standalone server.
+
+ @param serverName
+ */
+ public StandaloneServerConfig
+ createServer(
+ final String serverName,
+ final String configName )
+ {
+ final String nodeAgentName = null;
+
+ final StandaloneServerConfig server = (StandaloneServerConfig)
+ getDomainConfig().createStandaloneServerConfig( serverName, nodeAgentName, configName, null );
+
+ return( server );
+ }
+
+ public StandaloneServerConfig
+ createServer( final String serverName )
+ {
+ final ConfigConfig config = createConfig( serverName + "-config" );
+
+ final StandaloneServerConfig server = createServer( serverName, config.getName() );
+ return( server );
+ }
+
+
+ /**
+ Start a server.
+ */
+ public void
+ startServer( final String serverName )
+ {
+ final J2EEServer server = getJ2EEServer( serverName );
+
+ server.start();
+ }
+
+ /**
+ Stop a server.
+ */
+ public void
+ stopServer( final String serverName )
+ {
+ final J2EEServer server = getJ2EEServer( serverName );
+
+ server.stop();
+ }
+
+
+ private static final Set LEGAL_MON =
+ Collections.unmodifiableSet( SampleUtil.newSet( new String[]
+ {
+ ModuleMonitoringLevelValues.HIGH,
+ ModuleMonitoringLevelValues.LOW,
+ ModuleMonitoringLevelValues.OFF,
+ } ));
+
+ /**
+ Sets the monitoring state for all available modules.
+
+ @param configName configuration element on which to operate
+ @param state one of HIGH, LOW, OFF
+ */
+ public void
+ setMonitoring(
+ final String configName,
+ final String state )
+ {
+ if ( ! LEGAL_MON.contains( state ) )
+ {
+ throw new IllegalArgumentException( state );
+ }
+
+ final ConfigConfig config =
+ (ConfigConfig)getDomainConfig().getConfigConfigMap().get( configName );
+
+ final ModuleMonitoringLevelsConfig mon =
+ config.getMonitoringServiceConfig().getModuleMonitoringLevelsConfig();
+
+ // set all modules to the same state
+ mon.setConnectorConnectionPool( state );
+ mon.setThreadPool( state );
+ mon.setHTTPService( state );
+ mon.setJDBCConnectionPool( state );
+ mon.setORB( state );
+ mon.setTransactionService( state );
+ mon.setWebContainer( state );
+ mon.setEJBContainer( state );
+ }
+
+ /**
+ Get a Map of <i>property-name</i>=<i>property-value</i>.
+
+ @param pa a PropertiesAccess
+ */
+ public Map
+ getProperties( final PropertiesAccess pa )
+ {
+ final HashMap m = new HashMap();
+
+ final String[] names = pa.getPropertyNames();
+ for( int i = 0; i < names.length; ++i )
+ {
+ m.put( names[ i ], pa.getPropertyValue( names[ i ] ) );
+ }
+
+ return( m );
+ }
+
+ /**
+ Display all properties found on all {@link AMX}.
+
+ @see #getProperties(PropertiesAccess)
+ @see PropertiesAccess#getPropertyNames
+ */
+ public void
+ displayAllProperties( )
+ {
+ final Iterator iter = getQueryMgr().queryAllSet().iterator();
+ while ( iter.hasNext() )
+ {
+ final AMX amx = (AMX)iter.next();
+
+ if ( amx instanceof PropertiesAccess )
+ {
+ final PropertiesAccess pa = (PropertiesAccess)amx;
+
+ final Map props = getProperties( pa );
+ if ( props.keySet().size() != 0 )
+ {
+ println( "\nProperties for: " + Util.getObjectName( (AMX)pa ) );
+ println( SampleUtil.mapToString( getProperties( pa ), "\n") );
+ }
+ }
+ }
+ }
+
+ private void
+ mySleep( final long millis )
+ {
+ try
+ {
+ Thread.sleep( millis );
+ }
+ catch( InterruptedException e )
+ {
+ }
+ }
+
+
+ public final static String MBEAN_SERVER_DELEGATE =
+ "JMImplementation:type=MBeanServerDelegate";
+ public static ObjectName
+ getMBeanServerDelegateObjectName()
+ {
+ return( Util.newObjectName( MBEAN_SERVER_DELEGATE ) );
+ }
+
+
+ private void
+ waitNumNotifs( final Map notifs, final String type, final int numRequired )
+ {
+ while ( true )
+ {
+ final List list = (List)notifs.get( type );
+ if ( list != null && list.size() >= numRequired )
+ {
+ break;
+ }
+
+ mySleep( 50 );
+ }
+ }
+
+
+
+ private void
+ waitMBeanServerNotification(
+ final SampleListener listener,
+ final String type,
+ final ObjectName objectName )
+ {
+ List list = null;
+ while ( (list = listener.getNotifsReceived( type )) == null )
+ {
+ mySleep( 50 );
+ }
+
+ boolean waiting = true;
+ while ( waiting )
+ {
+ final Iterator iter = list.iterator();
+ while ( iter.hasNext() )
+ {
+ final MBeanServerNotification notif = (MBeanServerNotification)iter.next();
+ if ( notif.getMBeanName().equals( objectName ) )
+ {
+ waiting = false;
+ break;
+ }
+ else
+ {
+ SampleUtil.println( "Unexpected ObjectName: " + objectName + " != " + notif.getMBeanName() );
+ }
+ }
+ mySleep( 100 );
+ }
+ }
+
+
+ /**
+ Demonstrates the use of a javax.management.monitor MBean
+ to be notified of changes in the value of an Attribute.
+ */
+ public void
+ demoJMXMonitor()
+ throws InstanceNotFoundException, IOException
+ {
+ final JMXMonitorMgr mgr = getDomainRoot().getJMXMonitorMgr();
+
+ final String attrName = "SampleString";
+ final String attrValue = "hello";
+
+ // listen to the MBeanServerDelegate, too, so we can see our sample monitor
+ // get registered.
+ final SampleListener sampleListener = new SampleListener();
+ final MBeanServerConnection conn =
+ Util.getExtra( mgr ).getConnectionSource().getExistingMBeanServerConnection();
+ conn.addNotificationListener(
+ getMBeanServerDelegateObjectName(), sampleListener, null, null );
+
+
+ final Sample sample = (Sample)getDomainRoot().getContainee( XTypes.SAMPLE );
+
+ final String monitorName = "SampleStringMonitor";
+ AMXStringMonitor mon = null;
+ try
+ {
+ // cleanup in case it was left around by mistake...
+ try { mgr.remove( monitorName ); } catch( Exception e ) {}
+
+ // create a new one
+ mon = mgr.createStringMonitor( monitorName );
+ // observer that we've been notified (not required)
+ waitMBeanServerNotification( sampleListener,
+ MBeanServerNotification.REGISTRATION_NOTIFICATION, Util.getObjectName( mon ) );
+
+ // we'll modify this Attribute's value, to force a change
+ sample.addAttribute( attrName, attrValue );
+
+ // listen to the monitor
+ mon.addNotificationListener( sampleListener, null, null );
+ mon.setObservedAttribute( attrName );
+ mon.setStringToCompare( attrValue );
+ mon.setNotifyDiffer( true );
+ mon.setNotifyMatch( true );
+
+ // tell the monitor to observe sample
+ mon.addObservedObject( Util.getObjectName( sample ) );
+
+ // since the Attribute was added dynamically, there is no
+ // getter method, so we must access the Attribute via JMX
+ final StdAttributesAccess attrs = Util.getExtra( sample );
+ attrs.setAttribute( new Attribute( attrName, "goodbye" ) );
+ // set it to original value
+ attrs.setAttribute( new Attribute( attrName, attrValue ) );
+
+ // we added it,so we should remove it
+ sample.removeAttribute( attrName );
+
+ // let the Notifications arrive...
+ final Map notifs = sampleListener.getNotifsReceived();
+ waitNumNotifs( notifs, AttributeChangeNotification.ATTRIBUTE_CHANGE, 4 );
+ }
+ catch( Throwable t )
+ {
+ t.printStackTrace();
+ }
+ finally
+ {
+ try
+ {
+ mon.removeNotificationListener( sampleListener );
+
+ // don't leave monitors around
+ if ( mon != null )
+ {
+ mgr.remove( mon.getName() );
+ // observer that we've been notified (not required)
+ waitMBeanServerNotification( sampleListener,
+ MBeanServerNotification.UNREGISTRATION_NOTIFICATION,
+ Util.getObjectName( mon ) );
+ }
+
+ conn.removeNotificationListener(
+ getMBeanServerDelegateObjectName(), sampleListener );
+ }
+ catch( ListenerNotFoundException e )
+ {
+ }
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/create-amx-sample.sh b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/create-amx-sample.sh
index 8a9398d..62e9a0b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/create-amx-sample.sh
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/create-amx-sample.sh
@@ -18,25 +18,25 @@
# resulting value is returned in the variable 'FULLPATH_RESULT'
fullpath()
{
- if [ $# != 1 ]
- then
- echo "fullpath: exactly one argument required"
- exit 1
- fi
-
- DIR_IN=$1
+ if [ $# != 1 ]
+ then
+ echo "fullpath: exactly one argument required"
+ exit 1
+ fi
- CWD=`pwd`
- if [ -d $DIR_IN ]
- then
- cd $DIR_IN
- FULLPATH_RESULT=`pwd`
- else
- echo "Can't cd to " $DIR_IN
- exit 1
- fi
-
- cd $CWD
+ DIR_IN=$1
+
+ CWD=`pwd`
+ if [ -d $DIR_IN ]
+ then
+ cd $DIR_IN
+ FULLPATH_RESULT=`pwd`
+ else
+ echo "Can't cd to " $DIR_IN
+ exit 1
+ fi
+
+ cd $CWD
}
@@ -47,16 +47,16 @@
# the classpath separator--if not set, choose a default
if [ -z "$CLASSPATH_SEPARATOR" ]
then
- # not defined--look for telltale sign of Windows--the ":\" in our path
- echo $SCRIPT_DIR | grep -e ":\\\\" -e ":/"
- if [ $? = 0 ]
- then
- CPS=";"
- else
- CPS=":"
- fi
+ # not defined--look for telltale sign of Windows--the ":\" in our path
+ echo $SCRIPT_DIR | grep -e ":\\\\" -e ":/"
+ if [ $? = 0 ]
+ then
+ CPS=";"
+ else
+ CPS=":"
+ fi
else
- CPS=$CLASSPATH_SEPARATOR
+ CPS=$CLASSPATH_SEPARATOR
fi
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/run-samples.bat b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/run-samples.bat
index 1017e00..37a7801 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/run-samples.bat
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/com/sun/appserv/management/sample/run-samples.bat
@@ -1,6 +1,6 @@
-REM These jar files must be present!
-set STD_JARS=jmxri.jar;jmxremote.jar;javax77.jar
-set CP=.;amx-client.jar;%STD_JARS%
-
-java -cp %CP% com.sun.appserv.management.sample.SampleMain .\SampleMain.properties
-
+REM These jar files must be present!
+set STD_JARS=jmxri.jar;jmxremote.jar;javax77.jar
+set CP=.;amx-client.jar;%STD_JARS%
+
+java -cp %CP% com.sun.appserv.management.sample.SampleMain .\SampleMain.properties
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/create-amx-sdk.sh b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/create-amx-sdk.sh
index 037448b..35f9b0a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/create-amx-sdk.sh
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/create-amx-sdk.sh
@@ -18,25 +18,25 @@
# resulting value is returned in the variable 'FULLPATH_RESULT'
fullpath()
{
- if [ $# != 1 ]
- then
- echo "fullpath: exactly one argument required"
- exit 1
- fi
-
- DIR_IN=$1
+ if [ $# != 1 ]
+ then
+ echo "fullpath: exactly one argument required"
+ exit 1
+ fi
- CWD=`pwd`
- if [ -d $DIR_IN ]
- then
- cd $DIR_IN
- FULLPATH_RESULT=`pwd`
- else
- echo "Can't cd to " $DIR_IN
- exit 1
- fi
-
- cd $CWD
+ DIR_IN=$1
+
+ CWD=`pwd`
+ if [ -d $DIR_IN ]
+ then
+ cd $DIR_IN
+ FULLPATH_RESULT=`pwd`
+ else
+ echo "Can't cd to " $DIR_IN
+ exit 1
+ fi
+
+ cd $CWD
}
@@ -47,16 +47,16 @@
# the classpath separator--if not set, choose a default
if [ -z "$CLASSPATH_SEPARATOR" ]
then
- # not defined--look for telltale sign of Windows--the ":\" in our path
- echo $SCRIPT_DIR | grep -e ":\\\\" -e ":/"
- if [ $? = 0 ]
- then
- CPS=";"
- else
- CPS=":"
- fi
+ # not defined--look for telltale sign of Windows--the ":\" in our path
+ echo $SCRIPT_DIR | grep -e ":\\\\" -e ":/"
+ if [ $? = 0 ]
+ then
+ CPS=";"
+ else
+ CPS=":"
+ fi
else
- CPS=$CLASSPATH_SEPARATOR
+ CPS=$CLASSPATH_SEPARATOR
fi
@@ -130,7 +130,7 @@
cp $JMX_RI_JAR $JMX_REMOTE_JAR $SDK_DIR
cp $JAVAX77_JAR $SDK_DIR/javax77.jar
-echo "\nCopying samples scripts..."
+echo "\nCopying samples scripts..."
cp $SRC_SAMPLE/run-samples.bat $SRC_SAMPLE/run-samples.sh $SDK_DIR
cp $SRC_SAMPLE/SampleMain.properties $SDK_DIR
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/run-samples.bat b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/run-samples.bat
index 12350b4..bbcee43 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/run-samples.bat
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/run-samples.bat
@@ -1,6 +1,6 @@
-REM These jar files must be present!
-set STD_JARS=jmxri.jar;jmxremote.jar;javax77.jar
-set CP=.;amx-client.jar;%STD_JARS%
-
-java -cp %CP% samples.amx.SampleMain .\SampleMain.properties
-
+REM These jar files must be present!
+set STD_JARS=jmxri.jar;jmxremote.jar;javax77.jar
+set CP=.;amx-client.jar;%STD_JARS%
+
+java -cp %CP% samples.amx.SampleMain .\SampleMain.properties
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/DeployNotificationListener.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/DeployNotificationListener.java
index 3238efb..4a55746 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/DeployNotificationListener.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/DeployNotificationListener.java
@@ -22,96 +22,96 @@
/**
- A JMX NotificationListener for deployment.
+ A JMX NotificationListener for deployment.
*/
public final class DeployNotificationListener
- implements NotificationListener
+ implements NotificationListener
{
- private final Object mDeployID;
- private boolean mIsCompleted;
- private DeploymentStatus mDeploymentStatus;
-
- public
- DeployNotificationListener( final Object deployID )
- {
- mDeployID = deployID;
- mIsCompleted = false;
- }
-
- public boolean
- isCompleted()
- {
- return( mIsCompleted );
- }
-
- public DeploymentStatus
- getDeploymentStatus()
- {
- return( mDeploymentStatus );
- }
-
- public synchronized void
- handleNotification(
- final Notification notif,
- final Object handback)
- {
- try
- {
- realHandleNotification( notif, handback );
- }
- catch( Exception e )
- {
- e.printStackTrace();
- }
- }
-
- /**
- Note that Notifications are not guaranteed to be delivered in order.
- Thus, it is theoretically possible for a DEPLOYMENT_COMPLETED_NOTIFICATION_TYPE
- to be received before a DEPLOYMENT_STARTED_NOTIFICATION_TYPE.
- */
- public void
- realHandleNotification(
- final Notification notif,
- final Object handback)
- {
- final String type = notif.getType();
- final Map m = (Map)notif.getUserData();
- final Object deployID = m.get( DeploymentMgr.NOTIF_DEPLOYMENT_ID_KEY );
-
- if ( deployID.equals( mDeployID ) )
- {
- if ( type.equals( DeploymentMgr.DEPLOYMENT_STARTED_NOTIFICATION_TYPE ) )
- {
- SampleUtil.println( "Deployment started for " + deployID);
- }
- else if ( type.equals( DeploymentMgr.DEPLOYMENT_COMPLETED_NOTIFICATION_TYPE ) )
- {
- final Map statusData = (Map)
- m.get( DeploymentMgr.NOTIF_DEPLOYMENT_COMPLETED_STATUS_KEY );
-
- final DeploymentStatus status =
- DeploymentSupport.mapToDeploymentStatus( statusData );
-
- SampleUtil.println( "Deployment completed for " + deployID + " with status: " +
- status.getStageStatus() );
-
- mIsCompleted = true;
- mDeploymentStatus = status;
- }
- else if ( type.equals( DeploymentMgr.DEPLOYMENT_PROGRESS_NOTIFICATION_TYPE ) )
- {
- final Map progressData = (Map)
- m.get( DeploymentMgr.NOTIF_DEPLOYMENT_PROGRESS_KEY );
-
- final DeploymentProgress progress =
- DeploymentSupport.mapToDeploymentProgress( progressData );
-
- SampleUtil.println( "Deployment progress for " + deployID + " = " +
- progress.getProgressPercent() + "%" );
- }
- }
- }
+ private final Object mDeployID;
+ private boolean mIsCompleted;
+ private DeploymentStatus mDeploymentStatus;
+
+ public
+ DeployNotificationListener( final Object deployID )
+ {
+ mDeployID = deployID;
+ mIsCompleted = false;
+ }
+
+ public boolean
+ isCompleted()
+ {
+ return( mIsCompleted );
+ }
+
+ public DeploymentStatus
+ getDeploymentStatus()
+ {
+ return( mDeploymentStatus );
+ }
+
+ public synchronized void
+ handleNotification(
+ final Notification notif,
+ final Object handback)
+ {
+ try
+ {
+ realHandleNotification( notif, handback );
+ }
+ catch( Exception e )
+ {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ Note that Notifications are not guaranteed to be delivered in order.
+ Thus, it is theoretically possible for a DEPLOYMENT_COMPLETED_NOTIFICATION_TYPE
+ to be received before a DEPLOYMENT_STARTED_NOTIFICATION_TYPE.
+ */
+ public void
+ realHandleNotification(
+ final Notification notif,
+ final Object handback)
+ {
+ final String type = notif.getType();
+ final Map m = (Map)notif.getUserData();
+ final Object deployID = m.get( DeploymentMgr.NOTIF_DEPLOYMENT_ID_KEY );
+
+ if ( deployID.equals( mDeployID ) )
+ {
+ if ( type.equals( DeploymentMgr.DEPLOYMENT_STARTED_NOTIFICATION_TYPE ) )
+ {
+ SampleUtil.println( "Deployment started for " + deployID);
+ }
+ else if ( type.equals( DeploymentMgr.DEPLOYMENT_COMPLETED_NOTIFICATION_TYPE ) )
+ {
+ final Map statusData = (Map)
+ m.get( DeploymentMgr.NOTIF_DEPLOYMENT_COMPLETED_STATUS_KEY );
+
+ final DeploymentStatus status =
+ DeploymentSupport.mapToDeploymentStatus( statusData );
+
+ SampleUtil.println( "Deployment completed for " + deployID + " with status: " +
+ status.getStageStatus() );
+
+ mIsCompleted = true;
+ mDeploymentStatus = status;
+ }
+ else if ( type.equals( DeploymentMgr.DEPLOYMENT_PROGRESS_NOTIFICATION_TYPE ) )
+ {
+ final Map progressData = (Map)
+ m.get( DeploymentMgr.NOTIF_DEPLOYMENT_PROGRESS_KEY );
+
+ final DeploymentProgress progress =
+ DeploymentSupport.mapToDeploymentProgress( progressData );
+
+ SampleUtil.println( "Deployment progress for " + deployID + " = " +
+ progress.getProgressPercent() + "%" );
+ }
+ }
+ }
}
-
-
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/LineReaderImpl.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/LineReaderImpl.java
index 06fe1b3..b55a319 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/LineReaderImpl.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/LineReaderImpl.java
@@ -13,7 +13,7 @@
* $Revision: 1.1 $
* $Date: 2005/01/27 21:34:04 $
*/
-
+
package samples.amx;
@@ -21,52 +21,52 @@
import java.io.InputStreamReader;
/**
- Reads a line from the specified input stream, outputs
- the prompt to System.out.
+ Reads a line from the specified input stream, outputs
+ the prompt to System.out.
*/
public class LineReaderImpl
{
- final InputStreamReader mInputStreamReader;
-
- public
- LineReaderImpl( InputStream inputStream )
- {
- mInputStreamReader = new InputStreamReader( inputStream );
- }
+ final InputStreamReader mInputStreamReader;
- public String
- readLine( String prompt )
- throws java.io.IOException
- {
- final StringBuffer line = new StringBuffer();
-
- if ( prompt != null )
- {
- System.out.print( prompt );
- }
-
- while ( true )
- {
- final int value = mInputStreamReader.read();
- if ( value < 0 )
- {
- if ( line.length() != 0 )
- {
- // read a line but saw EOF before a newline
- break;
- }
- return( null );
- }
-
- final char theChar = (char)value;
- if ( theChar == '\n' )
- break;
-
- line.append( theChar );
- }
-
- return( line.toString().trim() );
- }
+ public
+ LineReaderImpl( InputStream inputStream )
+ {
+ mInputStreamReader = new InputStreamReader( inputStream );
+ }
+
+ public String
+ readLine( String prompt )
+ throws java.io.IOException
+ {
+ final StringBuffer line = new StringBuffer();
+
+ if ( prompt != null )
+ {
+ System.out.print( prompt );
+ }
+
+ while ( true )
+ {
+ final int value = mInputStreamReader.read();
+ if ( value < 0 )
+ {
+ if ( line.length() != 0 )
+ {
+ // read a line but saw EOF before a newline
+ break;
+ }
+ return( null );
+ }
+
+ final char theChar = (char)value;
+ if ( theChar == '\n' )
+ break;
+
+ line.append( theChar );
+ }
+
+ return( line.toString().trim() );
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleHandshakeCompletedListener.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleHandshakeCompletedListener.java
index 6ad637f..ab6cb88 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleHandshakeCompletedListener.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleHandshakeCompletedListener.java
@@ -16,29 +16,29 @@
/**
- Demonstrates how to write a HandshakeCompletedListener. Note that usually
- it is not necessary to write your own HandshakeCompletedListener since the
- event is available from {@link HandshakeCompletedListenerImpl#getLastEvent}.
- <p>
- You may wish to write a HandshakeCompletedListener if the data contained
- in the HandshakeCompletedEvent is of interest or you wish to exert more
- control over the TLS connection.
+ Demonstrates how to write a HandshakeCompletedListener. Note that usually
+ it is not necessary to write your own HandshakeCompletedListener since the
+ event is available from {@link HandshakeCompletedListenerImpl#getLastEvent}.
+ <p>
+ You may wish to write a HandshakeCompletedListener if the data contained
+ in the HandshakeCompletedEvent is of interest or you wish to exert more
+ control over the TLS connection.
*/
public final class SampleHandshakeCompletedListener
- extends HandshakeCompletedListenerImpl
+ extends HandshakeCompletedListenerImpl
{
- public
- SampleHandshakeCompletedListener()
- {
- }
-
- public synchronized void
- handshakeCompleted( final HandshakeCompletedEvent event)
- {
- super.handshakeCompleted( event );
-
- System.out.println( "HandshakeCompleted:\n" + event + "\n" );
- }
+ public
+ SampleHandshakeCompletedListener()
+ {
+ }
+
+ public synchronized void
+ handshakeCompleted( final HandshakeCompletedEvent event)
+ {
+ super.handshakeCompleted( event );
+
+ System.out.println( "HandshakeCompleted:\n" + event + "\n" );
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleListener.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleListener.java
index 9764573..7b78d43 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleListener.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleListener.java
@@ -21,103 +21,103 @@
import javax.management.MBeanServerNotification;
/**
- Displays any {@link javax.management.Notification} received.
- <p>
- Note that most {@link com.sun.appserv.management.base.AMX} Notifications include a Map in the
- userData field of the Notification.
-
- @see com.sun.appserv.management.base.AMX
+ Displays any {@link javax.management.Notification} received.
+ <p>
+ Note that most {@link com.sun.appserv.management.base.AMX} Notifications include a Map in the
+ userData field of the Notification.
+
+ @see com.sun.appserv.management.base.AMX
*/
public final class SampleListener implements NotificationListener
{
- private Map mNotifs;
-
- public
- SampleListener()
- {
- mNotifs = null;
- clearNotifs();
- }
-
- /**
- Keep a Map, keyed by Notification type, of all Notifications received.
- */
- private synchronized void
- addNotif( final Notification notif )
- {
- final String type = notif.getType();
-
- List list = null;
-
- if ( ! mNotifs.keySet().contains( type ) )
- {
- clearNotifs( type );
- }
-
- list = (List)mNotifs.get( type );
-
- list.add( notif );
- }
-
- /**
- Return a Map, keyed by Notification type, of all Notifications received so far.
- */
- public Map
- getNotifsReceived()
- {
- return( mNotifs );
- }
-
- public List
- getNotifsReceived( final String type )
- {
- return( (List)mNotifs.get( type ) );
- }
-
- /**
- Clear the history of Notifications received.
- */
- public synchronized Map
- clearNotifs()
- {
- final Map existing = getNotifsReceived();
-
- mNotifs = Collections.synchronizedMap( new HashMap() );
-
- return( existing );
- }
-
- public synchronized List
- clearNotifs( final String type )
- {
- final Map existing = getNotifsReceived();
-
- final List newList = Collections.synchronizedList( new ArrayList() );
-
- final List existingList = (List)existing.get( type );
-
- mNotifs.put( type, newList );
-
- return( existingList );
- }
-
- /**
- The Notification is delivered here.
- */
- public void
- handleNotification(
- final Notification notif,
- final Object handback)
- {
- final String type = notif.getType();
- final Object userData = notif.getUserData();
-
- addNotif( notif );
-
- SampleUtil.println( "SampleListener: received: " + SampleUtil.toString( notif ) );
- SampleUtil.println( "" );
- }
-
-
-
+ private Map mNotifs;
+
+ public
+ SampleListener()
+ {
+ mNotifs = null;
+ clearNotifs();
+ }
+
+ /**
+ Keep a Map, keyed by Notification type, of all Notifications received.
+ */
+ private synchronized void
+ addNotif( final Notification notif )
+ {
+ final String type = notif.getType();
+
+ List list = null;
+
+ if ( ! mNotifs.keySet().contains( type ) )
+ {
+ clearNotifs( type );
+ }
+
+ list = (List)mNotifs.get( type );
+
+ list.add( notif );
+ }
+
+ /**
+ Return a Map, keyed by Notification type, of all Notifications received so far.
+ */
+ public Map
+ getNotifsReceived()
+ {
+ return( mNotifs );
+ }
+
+ public List
+ getNotifsReceived( final String type )
+ {
+ return( (List)mNotifs.get( type ) );
+ }
+
+ /**
+ Clear the history of Notifications received.
+ */
+ public synchronized Map
+ clearNotifs()
+ {
+ final Map existing = getNotifsReceived();
+
+ mNotifs = Collections.synchronizedMap( new HashMap() );
+
+ return( existing );
+ }
+
+ public synchronized List
+ clearNotifs( final String type )
+ {
+ final Map existing = getNotifsReceived();
+
+ final List newList = Collections.synchronizedList( new ArrayList() );
+
+ final List existingList = (List)existing.get( type );
+
+ mNotifs.put( type, newList );
+
+ return( existingList );
+ }
+
+ /**
+ The Notification is delivered here.
+ */
+ public void
+ handleNotification(
+ final Notification notif,
+ final Object handback)
+ {
+ final String type = notif.getType();
+ final Object userData = notif.getUserData();
+
+ addNotif( notif );
+
+ SampleUtil.println( "SampleListener: received: " + SampleUtil.toString( notif ) );
+ SampleUtil.println( "" );
+ }
+
+
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleMain.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleMain.java
index d92fe1d..8d4149e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleMain.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleMain.java
@@ -30,374 +30,374 @@
import com.sun.appserv.management.client.HandshakeCompletedListenerImpl;
/**
- Main class demonstrating a variety of MBean API (AMX) usages.
- Enters an interactive loop in which the user can run various commands.
+ Main class demonstrating a variety of MBean API (AMX) usages.
+ Enters an interactive loop in which the user can run various commands.
*/
public final class SampleMain
{
- private final DomainRoot mDomainRoot;
- private HandshakeCompletedListenerImpl mHandshakeCompletedListener;
-
- public static void
- main( final String[] args )
- {
- if ( args.length > 1 )
- {
- SampleUtil.println( "Specify a properties file or nothing." );
- System.exit( 255 );
- }
-
- try
- {
- new SampleMain( args.length == 1 ? args[ 0 ] : "SampleMain.properties" );
- }
- catch( Throwable t )
- {
- SampleUtil.getRootCause( t ).printStackTrace();
- }
- }
-
-
- final String QUIT = "quit";
- final String LIST = "list";
- final String DEPLOY = "deploy";
- final String UNDEPLOY = "undeploy";
- final String QUERY = "query";
- final String SHOW_HIERARCHY = "show-hierarchy";
- final String START_SERVER = "start-server";
- final String STOP_SERVER = "stop-server";
- final String LIST_ATTRIBUTES = "list-attributes";
- final String LIST_DOTTED_NAMES = "list-dotted-names";
- final String LIST_PROPERTIES = "list-properties";
- final String SET_MONITORING = "set-monitoring";
- final String DEMO_JMX_MONITOR = "demo-jmx-monitor";
- final String RUN_ALL = "run-all";
-
- final String[] MENU_CHOICES = new String[]
- {
- DEMO_JMX_MONITOR, DEPLOY, LIST_ATTRIBUTES, LIST, LIST_DOTTED_NAMES, LIST_PROPERTIES, QUERY, QUIT, RUN_ALL,
- START_SERVER, STOP_SERVER,
- SHOW_HIERARCHY, SET_MONITORING, UNDEPLOY
- };
-
- final String MENU = SampleUtil.arrayToString( MENU_CHOICES, " ", "\n");
- final String PROMPT = "Commands:\n" + MENU + "\nEnter command> ";
-
-
- private static final class IllegalUsageException extends Exception
- {
- IllegalUsageException() {}
- }
-
- private void
- require(
- final boolean test,
- final String msg )
- throws IllegalUsageException
- {
- if ( ! test )
- {
- SampleUtil.println( msg );
- throw new IllegalUsageException();
- }
- }
-
- private void
- handleChoice(
- final Samples samples,
- final String line )
- throws IOException, IllegalUsageException, InstanceNotFoundException
- {
- final String[] parts = line.split( "[ \t]+" );
- final int numArgs = parts.length - 1;
- final String cmd = parts[ 0 ];
-
- if ( cmd.length() != 0 )
- {
- SampleUtil.println( "cmd: " + SampleUtil.toString( parts ) );
- }
-
- if ( cmd.equals( QUIT ) || cmd.equals( "q" ) )
- {
- require( numArgs == 0, "Usage: " + QUIT );
- System.exit( 0 );
- }
- else if ( cmd.length() == 0 )
- {
- // do nothing
- }
- else if ( cmd.equals( DEPLOY ) )
- {
- require( numArgs >= 1, "Usage: " + DEPLOY + " <archive-name>" );
- for( int i = 1; i < parts.length; ++i )
- {
- samples.deploy( new File( parts[ i ] ) );
- }
- }
- else if ( cmd.equals( UNDEPLOY ) )
- {
- require( numArgs >= 1, "Usage: " + UNDEPLOY + " [<name>[ <name>]*]" );
- for( int i = 1; i < parts.length; ++i )
- {
- samples.undeploy( parts[ i ] );
- }
- }
- else if ( cmd.equals( START_SERVER ) )
- {
- require( numArgs == 1, "Usage: " + START_SERVER + " <server-name>" );
- samples.startServer( parts[ 1 ] );
- }
- else if ( cmd.equals( STOP_SERVER ) )
- {
- require( numArgs == 1, "Usage: " + STOP_SERVER + " <server-name>" );
- samples.stopServer( parts[ 1 ] );
- }
- else if ( cmd.equals( LIST ) )
- {
- require( numArgs == 0, "Usage: " + LIST );
- samples.handleList();
- }
- else if ( cmd.equals( SHOW_HIERARCHY ) )
- {
- if ( numArgs == 0 )
- {
- samples.displayHierarchy();
- }
- else
- {
- for( int i = 1; i < parts.length; ++i )
- {
- samples.displayHierarchy( parts[ i ] );
- }
- }
- }
- else if ( cmd.equals( QUERY) )
- {
- require( numArgs == 0, "Usage: " + QUERY );
-
- samples.demoQuery();
- }
- else if ( cmd.equals( LIST_ATTRIBUTES ) )
- {
- if ( numArgs == 0 )
- {
- samples.displayAllAttributes( getDomainRoot() );
- }
- else
- {
- for( int i = 1; i < parts.length; ++i )
- {
- samples.displayAllAttributes( parts[ i ] );
- }
- }
- }
- else if ( cmd.equals( LIST_DOTTED_NAMES ) )
- {
- require( numArgs == 0, "Usage: " + LIST_DOTTED_NAMES );
- samples.displayDottedNames( );
- }
- else if ( cmd.equals( LIST_PROPERTIES ) )
- {
- require( numArgs == 0, "Usage: " + LIST_PROPERTIES );
- samples.displayAllProperties( );
- }
- else if ( cmd.equals( RUN_ALL ) )
- {
- require( numArgs == 0, "Usage: " + RUN_ALL );
-
- for( int i = 0; i < MENU_CHOICES.length; ++i )
- {
- final String choice = MENU_CHOICES[ i ];
-
- if ( ! ( choice.equals( QUIT ) || choice.equals( RUN_ALL ) ) )
- {
- handleChoice( samples, choice );
- }
- }
- }
- else if ( cmd.equals( DEMO_JMX_MONITOR ) )
- {
- samples.demoJMXMonitor();
- }
- else if ( cmd.equals( SET_MONITORING ) )
- {
- require( numArgs == 2, "Usage: " + SET_MONITORING + " <config-name> HIGH|LOW|OFF" );
-
- samples.setMonitoring( parts[ 1 ], parts[ 2 ]);
- }
- else
- {
- SampleUtil.println( "Unknown command: " + line );
- }
- }
-
- private void
- demo()
- throws IOException
- {
- final LineReaderImpl in = new LineReaderImpl( System.in );
-
- final Samples samples = new Samples( getDomainRoot() );
- while ( true )
- {
- final String line = in.readLine( "\n" + PROMPT );
- try
- {
- handleChoice( samples, line.trim() );
- }
- catch( IllegalUsageException e )
- {
- }
- catch( Exception e )
- {
- e.printStackTrace();
- }
- }
- }
-
- private final DomainRoot
- getDomainRoot()
- {
- return( mDomainRoot );
- }
-
-
-
-
- private TLSParams
- createTLSParams(
- final String trustStore,
- final String password )
- {
- final File trustStoreFile = new File( trustStore );
- final char[] trustStorePassword = password.toCharArray();
-
- mHandshakeCompletedListener = new HandshakeCompletedListenerImpl();
- final TrustStoreTrustManager trustMgr =
- new TrustStoreTrustManager( trustStoreFile, trustStorePassword);
- trustMgr.setPrompt( true );
+ private final DomainRoot mDomainRoot;
+ private HandshakeCompletedListenerImpl mHandshakeCompletedListener;
- final TLSParams tlsParams = new TLSParams( trustMgr, mHandshakeCompletedListener );
+ public static void
+ main( final String[] args )
+ {
+ if ( args.length > 1 )
+ {
+ SampleUtil.println( "Specify a properties file or nothing." );
+ System.exit( 255 );
+ }
- return( tlsParams );
- }
-
- /**
- Read connect properties from a file.
- */
- private final Properties
- getConnectProperties( final String file )
- throws IOException
- {
- final Properties props = new Properties();
-
- if ( file != null )
- {
- SampleUtil.println( "Reading properties from: " + SampleUtil.quote( file ) );
- final File f = new File( file );
-
- if ( f.exists() )
- {
- final FileInputStream is = new FileInputStream( f );
- try
- {
- props.load( is );
- }
- finally
- {
- is.close();
- }
- }
- else
- {
- SampleUtil.println("File \"" + file + " does not exist, using defaults." );
- }
- }
-
- return( props );
- }
-
- private final static String DEFAULT_TRUST_STORE_FILE = "~/.keystore";
- private final static String DEFAULT_TRUST_STORE_PASSWORD = "changeme";
-
- /**
- @param host hostname or IP address of Domain Admin Server
- @param port RMI administrative port
- @param user admin user
- @param password admin user password
- @param tlsParams TLS parameters, may be null
- @return AppserverConnectionSource
- */
- public static AppserverConnectionSource
- connect(
- final String host,
- final int port,
- final String user,
- final String password,
- final TLSParams tlsParams )
- throws IOException
- {
- final String info = "host=" + host + ", port=" + port +
- ", user=" + user + ", password=" + password +
- ", tls=" + (tlsParams != null);
-
- SampleUtil.println( "Connecting...:" + info );
-
- final AppserverConnectionSource conn =
- new AppserverConnectionSource( AppserverConnectionSource.PROTOCOL_RMI,
- host, port, user, password, tlsParams, null);
-
- // force the connection now
- conn.getJMXConnector( false );
+ try
+ {
+ new SampleMain( args.length == 1 ? args[ 0 ] : "SampleMain.properties" );
+ }
+ catch( Throwable t )
+ {
+ SampleUtil.getRootCause( t ).printStackTrace();
+ }
+ }
- SampleUtil.println( "Connected: " + info );
-
- return( conn );
- }
-
-
- /**
- */
- public
- SampleMain( final String optionalPropertiesFile )
- throws IOException
- {
- final Properties props = getConnectProperties( optionalPropertiesFile );
-
- final String host = props.getProperty( "connect.host", "localhost" );
- final int port = Integer.parseInt( props.getProperty( "connect.port", "8686" ) );
- final String user = props.getProperty( "connect.user", "admin" );
- final String password = props.getProperty( "connect.password", "admin123" );
- final String trustStore = props.getProperty( "connect.truststore", DEFAULT_TRUST_STORE_FILE);
- final String trustStorePassword =
- props.getProperty( "connect.truststorePassword", DEFAULT_TRUST_STORE_PASSWORD);
- final boolean useTLS =
- Boolean.valueOf( props.getProperty( "connect.useTLS", "false" ) ).booleanValue();
-
- final TLSParams tlsParams = useTLS ?
- createTLSParams( trustStore, trustStorePassword) : null;
-
- final AppserverConnectionSource conn = connect( host, port, user, password, tlsParams );
-
- if ( mHandshakeCompletedListener != null )
- {
- SampleUtil.println( "HandshakeCompletedEvent: " +
- SampleUtil.toString( mHandshakeCompletedListener.getLastEvent() ) );
- }
-
- mDomainRoot = conn.getDomainRoot();
-
- try
- {
- demo( );
- }
- finally
- {
- // close the connection (not necessary, but here for as an example)
- conn.getJMXConnector( false ).close();
- }
- }
+ final String QUIT = "quit";
+ final String LIST = "list";
+ final String DEPLOY = "deploy";
+ final String UNDEPLOY = "undeploy";
+ final String QUERY = "query";
+ final String SHOW_HIERARCHY = "show-hierarchy";
+ final String START_SERVER = "start-server";
+ final String STOP_SERVER = "stop-server";
+ final String LIST_ATTRIBUTES = "list-attributes";
+ final String LIST_DOTTED_NAMES = "list-dotted-names";
+ final String LIST_PROPERTIES = "list-properties";
+ final String SET_MONITORING = "set-monitoring";
+ final String DEMO_JMX_MONITOR = "demo-jmx-monitor";
+ final String RUN_ALL = "run-all";
+
+ final String[] MENU_CHOICES = new String[]
+ {
+ DEMO_JMX_MONITOR, DEPLOY, LIST_ATTRIBUTES, LIST, LIST_DOTTED_NAMES, LIST_PROPERTIES, QUERY, QUIT, RUN_ALL,
+ START_SERVER, STOP_SERVER,
+ SHOW_HIERARCHY, SET_MONITORING, UNDEPLOY
+ };
+
+ final String MENU = SampleUtil.arrayToString( MENU_CHOICES, " ", "\n");
+ final String PROMPT = "Commands:\n" + MENU + "\nEnter command> ";
+
+
+ private static final class IllegalUsageException extends Exception
+ {
+ IllegalUsageException() {}
+ }
+
+ private void
+ require(
+ final boolean test,
+ final String msg )
+ throws IllegalUsageException
+ {
+ if ( ! test )
+ {
+ SampleUtil.println( msg );
+ throw new IllegalUsageException();
+ }
+ }
+
+ private void
+ handleChoice(
+ final Samples samples,
+ final String line )
+ throws IOException, IllegalUsageException, InstanceNotFoundException
+ {
+ final String[] parts = line.split( "[ \t]+" );
+ final int numArgs = parts.length - 1;
+ final String cmd = parts[ 0 ];
+
+ if ( cmd.length() != 0 )
+ {
+ SampleUtil.println( "cmd: " + SampleUtil.toString( parts ) );
+ }
+
+ if ( cmd.equals( QUIT ) || cmd.equals( "q" ) )
+ {
+ require( numArgs == 0, "Usage: " + QUIT );
+ System.exit( 0 );
+ }
+ else if ( cmd.length() == 0 )
+ {
+ // do nothing
+ }
+ else if ( cmd.equals( DEPLOY ) )
+ {
+ require( numArgs >= 1, "Usage: " + DEPLOY + " <archive-name>" );
+ for( int i = 1; i < parts.length; ++i )
+ {
+ samples.deploy( new File( parts[ i ] ) );
+ }
+ }
+ else if ( cmd.equals( UNDEPLOY ) )
+ {
+ require( numArgs >= 1, "Usage: " + UNDEPLOY + " [<name>[ <name>]*]" );
+ for( int i = 1; i < parts.length; ++i )
+ {
+ samples.undeploy( parts[ i ] );
+ }
+ }
+ else if ( cmd.equals( START_SERVER ) )
+ {
+ require( numArgs == 1, "Usage: " + START_SERVER + " <server-name>" );
+ samples.startServer( parts[ 1 ] );
+ }
+ else if ( cmd.equals( STOP_SERVER ) )
+ {
+ require( numArgs == 1, "Usage: " + STOP_SERVER + " <server-name>" );
+ samples.stopServer( parts[ 1 ] );
+ }
+ else if ( cmd.equals( LIST ) )
+ {
+ require( numArgs == 0, "Usage: " + LIST );
+ samples.handleList();
+ }
+ else if ( cmd.equals( SHOW_HIERARCHY ) )
+ {
+ if ( numArgs == 0 )
+ {
+ samples.displayHierarchy();
+ }
+ else
+ {
+ for( int i = 1; i < parts.length; ++i )
+ {
+ samples.displayHierarchy( parts[ i ] );
+ }
+ }
+ }
+ else if ( cmd.equals( QUERY) )
+ {
+ require( numArgs == 0, "Usage: " + QUERY );
+
+ samples.demoQuery();
+ }
+ else if ( cmd.equals( LIST_ATTRIBUTES ) )
+ {
+ if ( numArgs == 0 )
+ {
+ samples.displayAllAttributes( getDomainRoot() );
+ }
+ else
+ {
+ for( int i = 1; i < parts.length; ++i )
+ {
+ samples.displayAllAttributes( parts[ i ] );
+ }
+ }
+ }
+ else if ( cmd.equals( LIST_DOTTED_NAMES ) )
+ {
+ require( numArgs == 0, "Usage: " + LIST_DOTTED_NAMES );
+ samples.displayDottedNames( );
+ }
+ else if ( cmd.equals( LIST_PROPERTIES ) )
+ {
+ require( numArgs == 0, "Usage: " + LIST_PROPERTIES );
+ samples.displayAllProperties( );
+ }
+ else if ( cmd.equals( RUN_ALL ) )
+ {
+ require( numArgs == 0, "Usage: " + RUN_ALL );
+
+ for( int i = 0; i < MENU_CHOICES.length; ++i )
+ {
+ final String choice = MENU_CHOICES[ i ];
+
+ if ( ! ( choice.equals( QUIT ) || choice.equals( RUN_ALL ) ) )
+ {
+ handleChoice( samples, choice );
+ }
+ }
+ }
+ else if ( cmd.equals( DEMO_JMX_MONITOR ) )
+ {
+ samples.demoJMXMonitor();
+ }
+ else if ( cmd.equals( SET_MONITORING ) )
+ {
+ require( numArgs == 2, "Usage: " + SET_MONITORING + " <config-name> HIGH|LOW|OFF" );
+
+ samples.setMonitoring( parts[ 1 ], parts[ 2 ]);
+ }
+ else
+ {
+ SampleUtil.println( "Unknown command: " + line );
+ }
+ }
+
+ private void
+ demo()
+ throws IOException
+ {
+ final LineReaderImpl in = new LineReaderImpl( System.in );
+
+ final Samples samples = new Samples( getDomainRoot() );
+ while ( true )
+ {
+ final String line = in.readLine( "\n" + PROMPT );
+ try
+ {
+ handleChoice( samples, line.trim() );
+ }
+ catch( IllegalUsageException e )
+ {
+ }
+ catch( Exception e )
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private final DomainRoot
+ getDomainRoot()
+ {
+ return( mDomainRoot );
+ }
+
+
+
+
+ private TLSParams
+ createTLSParams(
+ final String trustStore,
+ final String password )
+ {
+ final File trustStoreFile = new File( trustStore );
+ final char[] trustStorePassword = password.toCharArray();
+
+ mHandshakeCompletedListener = new HandshakeCompletedListenerImpl();
+ final TrustStoreTrustManager trustMgr =
+ new TrustStoreTrustManager( trustStoreFile, trustStorePassword);
+ trustMgr.setPrompt( true );
+
+ final TLSParams tlsParams = new TLSParams( trustMgr, mHandshakeCompletedListener );
+
+ return( tlsParams );
+ }
+
+ /**
+ Read connect properties from a file.
+ */
+ private final Properties
+ getConnectProperties( final String file )
+ throws IOException
+ {
+ final Properties props = new Properties();
+
+ if ( file != null )
+ {
+ SampleUtil.println( "Reading properties from: " + SampleUtil.quote( file ) );
+ final File f = new File( file );
+
+ if ( f.exists() )
+ {
+ final FileInputStream is = new FileInputStream( f );
+ try
+ {
+ props.load( is );
+ }
+ finally
+ {
+ is.close();
+ }
+ }
+ else
+ {
+ SampleUtil.println("File \"" + file + " does not exist, using defaults." );
+ }
+ }
+
+ return( props );
+ }
+
+ private final static String DEFAULT_TRUST_STORE_FILE = "~/.keystore";
+ private final static String DEFAULT_TRUST_STORE_PASSWORD = "changeme";
+
+ /**
+ @param host hostname or IP address of Domain Admin Server
+ @param port RMI administrative port
+ @param user admin user
+ @param password admin user password
+ @param tlsParams TLS parameters, may be null
+ @return AppserverConnectionSource
+ */
+ public static AppserverConnectionSource
+ connect(
+ final String host,
+ final int port,
+ final String user,
+ final String password,
+ final TLSParams tlsParams )
+ throws IOException
+ {
+ final String info = "host=" + host + ", port=" + port +
+ ", user=" + user + ", password=" + password +
+ ", tls=" + (tlsParams != null);
+
+ SampleUtil.println( "Connecting...:" + info );
+
+ final AppserverConnectionSource conn =
+ new AppserverConnectionSource( AppserverConnectionSource.PROTOCOL_RMI,
+ host, port, user, password, tlsParams, null);
+
+ // force the connection now
+ conn.getJMXConnector( false );
+
+ SampleUtil.println( "Connected: " + info );
+
+ return( conn );
+ }
+
+
+ /**
+ */
+ public
+ SampleMain( final String optionalPropertiesFile )
+ throws IOException
+ {
+ final Properties props = getConnectProperties( optionalPropertiesFile );
+
+ final String host = props.getProperty( "connect.host", "localhost" );
+ final int port = Integer.parseInt( props.getProperty( "connect.port", "8686" ) );
+ final String user = props.getProperty( "connect.user", "admin" );
+ final String password = props.getProperty( "connect.password", "admin123" );
+ final String trustStore = props.getProperty( "connect.truststore", DEFAULT_TRUST_STORE_FILE);
+ final String trustStorePassword =
+ props.getProperty( "connect.truststorePassword", DEFAULT_TRUST_STORE_PASSWORD);
+ final boolean useTLS =
+ Boolean.valueOf( props.getProperty( "connect.useTLS", "false" ) ).booleanValue();
+
+ final TLSParams tlsParams = useTLS ?
+ createTLSParams( trustStore, trustStorePassword) : null;
+
+ final AppserverConnectionSource conn = connect( host, port, user, password, tlsParams );
+
+ if ( mHandshakeCompletedListener != null )
+ {
+ SampleUtil.println( "HandshakeCompletedEvent: " +
+ SampleUtil.toString( mHandshakeCompletedListener.getLastEvent() ) );
+ }
+
+ mDomainRoot = conn.getDomainRoot();
+
+
+ try
+ {
+ demo( );
+ }
+ finally
+ {
+ // close the connection (not necessary, but here for as an example)
+ conn.getJMXConnector( false ).close();
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleUtil.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleUtil.java
index c2515b3..e9e0461 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleUtil.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/SampleUtil.java
@@ -24,265 +24,265 @@
/**
- Utility methods for the samples.
+ Utility methods for the samples.
*/
public final class SampleUtil
{
- private SampleUtil() {}
-
- public static void
- println( Object o )
- {
- System.out.println( toString( o ) );
- }
-
- /**
- Display a Map to System.out.
- */
- public static void
- displayMap(
- final String msg,
- final Map m)
- {
- println( msg + ": " + toString( m.keySet() ) );
- }
-
-
- private static final String QUOTE_CHAR = "\"";
- public static String
- quote( final Object o )
- {
- if ( o == null )
- {
- return quote( "null" );
- }
-
- return( QUOTE_CHAR + o.toString() + QUOTE_CHAR );
- }
-
- public static String
- toString( final Object o )
- {
- String result = null;
-
- if ( o == null )
- {
- result = "null";
- }
- else if ( o instanceof Object[] )
- {
- result = "[" + arrayToString( (Object[])o, null, ", " ) + "]";
- }
- else if ( o instanceof Notification )
- {
- result = toString( (Notification)o );
- }
- else if ( o instanceof Attribute )
- {
- result = toString( (Attribute)o );
- }
- else if ( o instanceof Map )
- {
- result = toString( (Map)o );
- }
- else
- {
- result = o.toString();
- }
- return( result );
- }
-
-
- public static String
- toString( final Attribute a )
- {
- return a.getName() + "=" + toString( a.getValue() );
- }
-
- private static void
- append( final StringBuffer b, final Object o)
- {
- if ( b != null && b.length() != 0 )
- {
- b.append( ", " );
- }
-
- b.append( o.toString() );
- }
-
- public static String
- toString( final Notification notif )
- {
- final StringBuffer b = new StringBuffer();
-
- append( b, "#" + notif.getSequenceNumber() );
- append( b, new java.util.Date( notif.getTimeStamp() ) );
- append( b, SampleUtil.quote( notif.getSource() ) );
- append( b, notif.getType() );
-
- append( b, "UserData = " + toString( notif.getUserData() ) );
-
- if ( notif instanceof MBeanServerNotification )
- {
- // this should really be done in a MBeanServerNotificationStringifier!
- final MBeanServerNotification n = (MBeanServerNotification)notif;
-
- append( b, SampleUtil.quote( n.getMBeanName() ) );
- }
- else if ( notif instanceof AttributeChangeNotification )
- {
- final AttributeChangeNotification a = (AttributeChangeNotification)notif;
- append( b, quote( a.getAttributeName() ) +
- ", OldValue = " + quote( toString( a.getOldValue() )) +
- ", NewValue = " + quote( toString( a.getNewValue() )) );
- }
-
- return( b.toString() );
- }
-
-
+ private SampleUtil() {}
- public static String
- arrayToString(
- final Object[] a,
- final String prefix,
- final String suffix )
- {
- final StringBuffer buf = new StringBuffer();
-
- for( int i = 0; i < a.length; ++i )
- {
- if ( prefix != null )
- {
- buf.append( prefix );
- }
-
- buf.append( toString( a[ i ] ) );
-
- if ( suffix != null && i < a.length )
- {
- buf.append( suffix );
- }
- }
-
- return( buf.toString() );
- }
-
-
- public static String
- toString( final Map m )
- {
- return( mapToString( m, "\n" ) );
- }
-
- public static String
- mapToString( final Map m, final String separator )
- {
- if ( m == null )
- {
- return( "null" );
- }
-
- final StringBuffer buf = new StringBuffer();
-
- final Iterator iter = m.keySet().iterator();
- while ( iter.hasNext() )
- {
- final Object key = iter.next();
- final Object value = m.get( key );
-
- buf.append( key + "=" + SampleUtil.toString( value ) + separator );
- }
- if ( buf.length() != 0 )
- {
- // strip trailing separator
- buf.setLength( buf.length() - separator.length() );
- }
-
- return( buf.toString() );
- }
-
-
- /**
- Get the chain of exceptions via getCause(). The first element is the
- Exception passed.
-
- @param start the Exception to traverse
- @return a Throwable[] or an Exception[] as appropriate
- */
- public static Throwable[]
- getCauses( final Throwable start )
- {
- final List list = new ArrayList();
-
- boolean haveNonException = false;
-
- Throwable t = start;
- while ( t != null )
- {
- list.add( t );
-
- if ( ! ( t instanceof Exception ) )
- {
- haveNonException = true;
- }
-
- final Throwable temp = t.getCause();
- if ( temp == null )
- break;
- t = temp;
- }
-
- final Throwable[] results = haveNonException ?
- new Throwable[ list.size() ] : new Exception[ list.size() ];
-
- list.toArray( results );
-
- return( results );
- }
-
-
- /**
- Get the original troublemaker.
-
- @param e the Exception to dig into
- @return the original Throwable that started the problem
- */ public static Throwable
- getRootCause( final Throwable e )
- {
- final Throwable[] causes = getCauses( e );
-
- return( causes[ causes.length - 1 ] );
- }
-
- /**
- Create a new Set containing all array elements.
- */
- public static Set
- newSet( final Object [] objects )
- {
- return( newSet( objects, 0, objects.length ) );
- }
+ public static void
+ println( Object o )
+ {
+ System.out.println( toString( o ) );
+ }
+
+ /**
+ Display a Map to System.out.
+ */
+ public static void
+ displayMap(
+ final String msg,
+ final Map m)
+ {
+ println( msg + ": " + toString( m.keySet() ) );
+ }
- /**
- Create a new Set containing all array elements.
- */
- public static Set
- newSet(
- final Object [] objects,
- final int startIndex,
- final int numItems )
- {
- final Set set = new HashSet();
-
- for( int i = 0; i < numItems; ++i )
- {
- set.add( objects[ startIndex + i ] );
- }
+ private static final String QUOTE_CHAR = "\"";
+ public static String
+ quote( final Object o )
+ {
+ if ( o == null )
+ {
+ return quote( "null" );
+ }
- return( set );
- }
+ return( QUOTE_CHAR + o.toString() + QUOTE_CHAR );
+ }
+
+ public static String
+ toString( final Object o )
+ {
+ String result = null;
+
+ if ( o == null )
+ {
+ result = "null";
+ }
+ else if ( o instanceof Object[] )
+ {
+ result = "[" + arrayToString( (Object[])o, null, ", " ) + "]";
+ }
+ else if ( o instanceof Notification )
+ {
+ result = toString( (Notification)o );
+ }
+ else if ( o instanceof Attribute )
+ {
+ result = toString( (Attribute)o );
+ }
+ else if ( o instanceof Map )
+ {
+ result = toString( (Map)o );
+ }
+ else
+ {
+ result = o.toString();
+ }
+ return( result );
+ }
+
+
+ public static String
+ toString( final Attribute a )
+ {
+ return a.getName() + "=" + toString( a.getValue() );
+ }
+
+ private static void
+ append( final StringBuffer b, final Object o)
+ {
+ if ( b != null && b.length() != 0 )
+ {
+ b.append( ", " );
+ }
+
+ b.append( o.toString() );
+ }
+
+ public static String
+ toString( final Notification notif )
+ {
+ final StringBuffer b = new StringBuffer();
+
+ append( b, "#" + notif.getSequenceNumber() );
+ append( b, new java.util.Date( notif.getTimeStamp() ) );
+ append( b, SampleUtil.quote( notif.getSource() ) );
+ append( b, notif.getType() );
+
+ append( b, "UserData = " + toString( notif.getUserData() ) );
+
+ if ( notif instanceof MBeanServerNotification )
+ {
+ // this should really be done in a MBeanServerNotificationStringifier!
+ final MBeanServerNotification n = (MBeanServerNotification)notif;
+
+ append( b, SampleUtil.quote( n.getMBeanName() ) );
+ }
+ else if ( notif instanceof AttributeChangeNotification )
+ {
+ final AttributeChangeNotification a = (AttributeChangeNotification)notif;
+ append( b, quote( a.getAttributeName() ) +
+ ", OldValue = " + quote( toString( a.getOldValue() )) +
+ ", NewValue = " + quote( toString( a.getNewValue() )) );
+ }
+
+ return( b.toString() );
+ }
+
+
+
+ public static String
+ arrayToString(
+ final Object[] a,
+ final String prefix,
+ final String suffix )
+ {
+ final StringBuffer buf = new StringBuffer();
+
+ for( int i = 0; i < a.length; ++i )
+ {
+ if ( prefix != null )
+ {
+ buf.append( prefix );
+ }
+
+ buf.append( toString( a[ i ] ) );
+
+ if ( suffix != null && i < a.length )
+ {
+ buf.append( suffix );
+ }
+ }
+
+ return( buf.toString() );
+ }
+
+
+ public static String
+ toString( final Map m )
+ {
+ return( mapToString( m, "\n" ) );
+ }
+
+ public static String
+ mapToString( final Map m, final String separator )
+ {
+ if ( m == null )
+ {
+ return( "null" );
+ }
+
+ final StringBuffer buf = new StringBuffer();
+
+ final Iterator iter = m.keySet().iterator();
+ while ( iter.hasNext() )
+ {
+ final Object key = iter.next();
+ final Object value = m.get( key );
+
+ buf.append( key + "=" + SampleUtil.toString( value ) + separator );
+ }
+ if ( buf.length() != 0 )
+ {
+ // strip trailing separator
+ buf.setLength( buf.length() - separator.length() );
+ }
+
+ return( buf.toString() );
+ }
+
+
+ /**
+ Get the chain of exceptions via getCause(). The first element is the
+ Exception passed.
+
+ @param start the Exception to traverse
+ @return a Throwable[] or an Exception[] as appropriate
+ */
+ public static Throwable[]
+ getCauses( final Throwable start )
+ {
+ final List list = new ArrayList();
+
+ boolean haveNonException = false;
+
+ Throwable t = start;
+ while ( t != null )
+ {
+ list.add( t );
+
+ if ( ! ( t instanceof Exception ) )
+ {
+ haveNonException = true;
+ }
+
+ final Throwable temp = t.getCause();
+ if ( temp == null )
+ break;
+ t = temp;
+ }
+
+ final Throwable[] results = haveNonException ?
+ new Throwable[ list.size() ] : new Exception[ list.size() ];
+
+ list.toArray( results );
+
+ return( results );
+ }
+
+
+ /**
+ Get the original troublemaker.
+
+ @param e the Exception to dig into
+ @return the original Throwable that started the problem
+ */ public static Throwable
+ getRootCause( final Throwable e )
+ {
+ final Throwable[] causes = getCauses( e );
+
+ return( causes[ causes.length - 1 ] );
+ }
+
+ /**
+ Create a new Set containing all array elements.
+ */
+ public static Set
+ newSet( final Object [] objects )
+ {
+ return( newSet( objects, 0, objects.length ) );
+ }
+
+
+ /**
+ Create a new Set containing all array elements.
+ */
+ public static Set
+ newSet(
+ final Object [] objects,
+ final int startIndex,
+ final int numItems )
+ {
+ final Set set = new HashSet();
+
+ for( int i = 0; i < numItems; ++i )
+ {
+ set.add( objects[ startIndex + i ] );
+ }
+
+ return( set );
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/Samples.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/Samples.java
index a98c667..35e8755 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/Samples.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/mbeanapi/samples/samples/amx/Samples.java
@@ -72,918 +72,918 @@
/**
- Main class demonstrating a variety of MBean API (AMX) usages.
+ Main class demonstrating a variety of MBean API (AMX) usages.
*/
public final class Samples
{
- private final DomainRoot mDomainRoot;
+ private final DomainRoot mDomainRoot;
- public
- Samples( final DomainRoot domainRoot )
- {
- mDomainRoot = domainRoot;
- }
-
+ public
+ Samples( final DomainRoot domainRoot )
+ {
+ mDomainRoot = domainRoot;
+ }
- public final DomainRoot
- getDomainRoot()
- {
- return( mDomainRoot );
- }
-
- public DomainConfig
- getDomainConfig()
- {
- return( getDomainRoot().getDomainConfig() );
- }
-
- public QueryMgr
- getQueryMgr()
- {
- return( getDomainRoot().getQueryMgr() );
- }
-
- /**
- Print a message.
- */
- public void
- println( Object o )
- {
- System.out.println( toString( o ) );
- }
-
- /**
- Turn an object into a useful String
- */
- public String
- toString( Object o )
- {
- return( SampleUtil.toString( o ) );
- }
-
- /**
- Display a Map to System.out.
- */
- private void
- displayMap(
- final String msg,
- final Map m)
- {
- println( msg + ": " + toString( m.keySet() ) );
- }
- /**
- Demonstrates how to access various types of {@link AMX} by obtaining a Map and then displaying it.
- */
- public void
- handleList()
- {
- final DomainConfig dcp = getDomainConfig();
-
- // Top-level items
- println( "\n--- Top-level --- \n" );
-
- displayMap( "ConfigConfig", dcp.getConfigConfigMap() );
-
- displayMap( "ServerConfig", dcp.getServerConfigMap() );
-
- displayMap( "StandaloneServerConfig", dcp.getStandaloneServerConfigMap() );
-
- displayMap( "ClusteredServerConfig", dcp.getClusteredServerConfigMap() );
-
- displayMap( "ClusterConfig", dcp.getClusterConfigMap() );
-
-
- // deployed items
- println( "\n--- DeployedItems --- \n" );
- displayMap( "J2EEApplicationConfig", dcp.getJ2EEApplicationConfigMap() );
- displayMap( "EJBModuleConfig", dcp.getEJBModuleConfigMap() );
- displayMap( "WebModuleConfig", dcp.getWebModuleConfigMap() );
- displayMap( "RARModuleConfig", dcp.getRARModuleConfigMap() );
- displayMap( "AppClientModuleConfig", dcp.getAppClientModuleConfigMap() );
- displayMap( "LifecycleModuleConfig", dcp.getLifecycleModuleConfigMap() );
-
-
- // resources
- println( "\n--- Resources --- \n" );
-
- displayMap( "CustomResourceConfig", dcp.getCustomResourceConfigMap() );
- displayMap( "PersistenceManagerFactoryResourceConfig",
- dcp.getPersistenceManagerFactoryResourceConfigMap() );
- displayMap( "JNDIResourceConfig", dcp.getJNDIResourceConfigMap() );
- displayMap( "JMSResourceConfig", dcp.getJMSResourceConfigMap() );
- displayMap( "JDBCResourceConfig", dcp.getJDBCResourceConfigMap() );
- displayMap( "ConnectorResourceConfig", dcp.getConnectorResourceConfigMap() );
- displayMap( "JDBCConnectionPoolConfig", dcp.getJDBCConnectionPoolConfigMap() );
- displayMap( "PersistenceManagerFactoryResourceConfig",
- dcp.getPersistenceManagerFactoryResourceConfigMap() );
- displayMap( "ConnectorConnectionPoolConfig",
- dcp.getConnectorConnectionPoolConfigMap() );
- displayMap( "AdminObjectResourceConfig", dcp.getAdminObjectResourceConfigMap() );
- displayMap( "ResourceAdapterConfig", dcp.getResourceAdapterConfigMap() );
- displayMap( "MailResourceConfig", dcp.getMailResourceConfigMap() );
-
-
- // get a ConfigConfig
- final ConfigConfig config =
- (ConfigConfig)dcp.getConfigConfigMap().get( "server-config" );
-
+ public final DomainRoot
+ getDomainRoot()
+ {
+ return( mDomainRoot );
+ }
- // HTTPService
- println( "\n--- HTTPService --- \n" );
-
- final HTTPServiceConfig httpService = config.getHTTPServiceConfig();
- displayMap( "HTTPListeners", httpService.getHTTPListenerConfigMap() );
- displayMap( "VirtualServers", httpService.getVirtualServerConfigMap() );
- }
-
- /**
- Return a Set of {@link AMX} whose ObjectName has the property
- <i>property-name</i>=<i>property-value</i>.
-
- @param propertyName
- @param propertyValue
- @return Set of {@link AMX}
- */
- public Set
- queryWild(
- final String propertyName,
- final String propertyValue)
- {
- final String[] propNames = new String[] { propertyName };
- final String[] propValues = new String[]{ propertyValue };
-
- final Set amxs = getQueryMgr().queryWildSet( propNames, propValues );
-
- return( amxs );
- }
-
- /**
- Call queryWild( propertyName, propertyValue ) and display the result.
-
- @param propertyName
- @param propertyValue
- */
- public void
- displayWild(
- final String propertyName,
- final String propertyValue)
- {
- final Set items = queryWild( propertyName, propertyValue );
-
- println( "\n--- Queried for " + propertyName + "=" + propertyValue + " ---" );
- final Iterator iter = items.iterator();
- while ( iter.hasNext() )
- {
- final AMX item = (AMX)iter.next();
-
- println( "j2eeType=" + item.getJ2EEType() + "," + "name=" + item.getName() );
- }
- }
-
- public Set
- queryForJ2EEType( final String j2eeType )
- {
- final String prop = Util.makeJ2EETypeProp( j2eeType );
- final Set items = getQueryMgr().queryPropsSet( prop );
-
- return( items );
- }
-
- public void
- displayAvailableChildTypes( final String j2eeType )
- {
- final DomainRoot domainRoot = getDomainRoot();
-
- }
-
- private String
- getIndent( final int num )
- {
- final char[] indent = new char[ num ];
- for( int i = 0; i < num; ++i )
- {
- indent[ i ] = ' ';
- }
- return( new String( indent ) );
- }
-
- /**
- Display the j2eeType and name (if not {@link AMX#NO_NAME})
- */
- private void
- displayAMX(
- final AMX amx,
- final int indentCount )
- {
- final String indent = getIndent( indentCount );
-
- final String j2eeType = amx.getJ2EEType();
- final String name = amx.getName();
- if ( name.equals( AMX.NO_NAME ) )
- {
- println( indent + j2eeType );
- }
- else
- {
- println( indent + j2eeType + "=" + name );
- }
- }
-
- private void
- displayHierarchy(
- final Collection amxSet,
- final int indentCount )
- {
- final Iterator iter = amxSet.iterator();
- while ( iter.hasNext() )
- {
- final AMX amx = (AMX)iter.next();
- displayHierarchy( amx, indentCount );
- }
- }
-
- /**
- Display the hierarchy of {@link AMX} beginning with the specified one
- */
- public void
- displayHierarchy(
- final AMX amx,
- final int indentCount )
- {
- displayAMX( amx, indentCount );
-
- if ( amx instanceof Container )
- {
- // get Maps of all contained items
- final Map m = ((Container)amx).getMultiContaineeMap( null );
+ public DomainConfig
+ getDomainConfig()
+ {
+ return( getDomainRoot().getDomainConfig() );
+ }
- // for clarity of display, separate out those that are Containers,
- // and those that are not.
- final Set deferred = new HashSet();
- final Iterator mapsIter = m.values().iterator();
- while ( mapsIter.hasNext() )
- {
- final Map instancesMap = (Map)mapsIter.next();
- final AMX first = (AMX)instancesMap.values().iterator().next();
- if ( first instanceof Container )
- {
- deferred.add( instancesMap );
- }
- else
- {
- displayHierarchy( instancesMap.values(), indentCount + 2);
- }
- }
-
- // display deferred items
- final Iterator iter = deferred.iterator();
- while ( iter.hasNext() )
- {
- final Map instancesMap = (Map)iter.next();
- displayHierarchy( instancesMap.values(), indentCount + 2);
- }
- }
-
- }
-
- /**
- Display the entire MBean hierarchy.
- */
- public void
- displayHierarchy()
- {
- displayHierarchy( getDomainRoot(), 0);
- }
-
- /**
- Display the MBean hierarchy beginning with j2eeType.
- */
- public void
- displayHierarchy( final String j2eeType )
- {
- final Set items = getQueryMgr().queryJ2EETypeSet( j2eeType );
-
- if ( items.size() == 0 )
- {
- println( "No {@link AMX} of j2eeType " + SampleUtil.quote( j2eeType ) + " found" );
- }
- else
- {
- displayHierarchy( items, 0);
- }
- }
-
-
- /**
- Display all MBeans that have j2eeType=<j2eeType>
- */
- public void
- displayJ2EEType( final String j2eeType )
- {
- final Set items = queryForJ2EEType( j2eeType );
-
- println( "\n--- Queried for j2eeType=" + j2eeType + " ---" );
-
- final Iterator iter = items.iterator();
- while ( iter.hasNext() )
- {
- final AMX item = (AMX)iter.next();
-
- // they may or may not have unique names, so show ObjectNames
- println( Util.getObjectName( item ) );
- }
- println( "" );
- }
-
-
- /**
- Display all Attributes in the {@link AMX}.
- */
- public void
- displayAllAttributes( final AMX item )
- {
- println( "\n--- Attributes for " + item.getJ2EEType() + "=" + item.getName() + " ---" );
-
- final Extra extra = Util.getExtra( item );
-
- final Map attrs = extra.getAllAttributes();
-
- final Iterator iter = attrs.keySet().iterator();
- while ( iter.hasNext() )
- {
- final String name = (String)iter.next();
- final Object value = attrs.get( name );
-
- println( name + "=" + toString( value ) );
- }
- }
-
- /**
- Display all Attributes in the {@link AMX}.
- */
- public void
- displayAllAttributes( final String j2eeType )
- {
- final Set items = queryForJ2EEType( j2eeType );
-
- if ( items.size() == 0 )
- {
- println( "No {@link AMX} of j2eeType " + SampleUtil.quote( j2eeType ) + " found" );
- }
- else
- {
- final Iterator iter = items.iterator();
- while ( iter.hasNext() )
- {
- final AMX amx = (AMX)iter.next();
-
- displayAllAttributes( amx );
- println( "" );
- }
- }
- }
-
-
- /**
- Display all dotted names.
- */
- public void
- displayDottedNames()
- {
- final ConfigDottedNames configDottedNames = getDomainRoot().getConfigDottedNames();
- Attribute[] result = (Attribute[])configDottedNames.dottedNameGet( "*" );
- println( "--- ConfigDottedNames ---" );
- println( SampleUtil.arrayToString( result, "", "\n" ) );
-
- println( "\n--- MonitoringDottedNames ---" );
-
- final MonitoringDottedNames monDottedNames = getDomainRoot().getMonitoringDottedNames();
- result = (Attribute[])monDottedNames.dottedNameGet( "*" );
- println( SampleUtil.arrayToString( result, "", "\n" ) );
- }
-
-
- /**
- Demonstrate how to use the {@link com.sun.appserv.management.base.QueryMgr} facilities.
- */
- public void
- demoQuery()
- {
- displayWild( AMX.J2EE_TYPE_KEY, "X-*ResourceConfig" );
- displayWild( AMX.J2EE_TYPE_KEY, "X-*ServerConfig" );
-
- displayJ2EEType( XTypes.SSL_CONFIG );
- displayJ2EEType( XTypes.CLUSTER_CONFIG );
- }
+ public QueryMgr
+ getQueryMgr()
+ {
+ return( getDomainRoot().getQueryMgr() );
+ }
-
- private Object
- uploadArchive( final File archive )
- throws IOException
- {
- final FileInputStream input = new FileInputStream( archive );
- final long length = input.available();
- final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
- final Object uploadID = mgr.initiateFileUpload( length );
-
- try
- {
- final int chunkSize = 256 * 1024;
- long remaining = length;
- while ( remaining != 0 )
- {
- final int actual = remaining < chunkSize ? (int)remaining : chunkSize;
-
- final byte[] bytes = new byte[ actual ];
- final int num = input.read( bytes );
- if ( num != actual )
- {
- throw new IOException();
- }
+ /**
+ Print a message.
+ */
+ public void
+ println( Object o )
+ {
+ System.out.println( toString( o ) );
+ }
- mgr.uploadBytes( uploadID, bytes );
- remaining -= actual;
- }
- }
- finally
- {
- input.close();
- }
-
- return( uploadID );
- }
-
-
- private final String
- getAppName( final String archiveName )
- {
- String result = archiveName;
-
- final int idx = archiveName.lastIndexOf( "." );
- if ( idx > 1 )
- {
- result = archiveName.substring( 0, idx );
- }
-
- return( result );
- }
-
- /**
- Deploy an archive.
- <p>
- To deploy, you will need an archive to deploy. A recommended sample may be found at:
- <i>INSTALL_ROOT</i>/samples/ejb/stateless/apps/simple.ear
- <p>
- This sample deploys the archive to the domain, but does not create any references
- to it, so it will not actually be associated with any server.
- <p>
- To associate an application with a server, use
- {@link StandaloneServerConfig#createDeployedItemRefConfig}
- @see com.sun.appserv.management.config.StandaloneServerConfig
- @see com.sun.appserv.management.config.DeployedItemRefConfigCR
- */
- public void
- deploy( final File archive )
- throws IOException
- {
- final Object uploadID = uploadArchive( archive );
- final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
-
- final Object deployID = mgr.initDeploy( );
- final DeployNotificationListener myListener = new DeployNotificationListener( deployID);
- mgr.addNotificationListener( myListener, null, null);
-
- try
- {
- final Map options = new HashMap();
-
- final String archiveName = archive.getName();
- final String deployName = getAppName( archiveName );
- SampleUtil.println( "Deploying " + archiveName + " as " + deployName );
-
- options.put( DeploymentMgr.DEPLOY_OPTION_NAME_KEY, deployName );
- options.put( DeploymentMgr.DEPLOY_OPTION_VERIFY_KEY, Boolean.TRUE.toString() );
- options.put( DeploymentMgr.DEPLOY_OPTION_DESCRIPTION_KEY, "description" );
-
-
- mgr.startDeploy( deployID, uploadID, null, options);
-
- while ( ! myListener.isCompleted() )
- {
- try
- {
- println( "deploy: waiting for deploy of " + archive);
- Thread.sleep( 1000 );
- }
- catch( InterruptedException e )
- {
- }
- }
-
- final DeploymentStatus status = myListener.getDeploymentStatus();
- final int statusCode = status.getStatusCode();
- if ( statusCode == DeploymentStatus.STATUS_CODE_SUCCESS )
- {
- final Map additionalStatus = status.getAdditionalStatus();
- final String moduleID =
- (String)additionalStatus.get( DeploymentStatus.MODULE_ID_KEY );
-
- SampleUtil.println( "Deployed " + quote(archiveName) + " as " + quote(deployName) +
- ": status=" + status.getStageStatus() + ", moduleID = " + quote(moduleID) +
- ", AdditionalStatus=" + SampleUtil.mapToString( additionalStatus, " ") );
-
- if ( ! deployName.equals( moduleID ) )
- {
- SampleUtil.println( "WARNING: requested name of " + quote(deployName) +
- " has not been used, actual name = " + quote(moduleID) +
- ", see bug #6218714" );
- }
- }
- else
- {
- SampleUtil.println( "Deployment of " + quote( archiveName ) +
- " FAILED, status code = " + statusCode );
- }
-
- if ( status.getStageThrowable() != null )
- {
- status.getStageThrowable().printStackTrace();
- }
- }
- finally
- {
- try
- {
- mgr.removeNotificationListener( myListener );
- }
- catch( Exception e )
- {
- }
- }
- }
-
- private String
- quote( final String s )
- {
- return SampleUtil.quote( s );
- }
-
- /**
- Undeploys a deployed module.
- */
- public void
- undeploy( final String moduleName )
- throws IOException
- {
- final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
-
- final Map statusData = mgr.undeploy( moduleName, null );
- final DeploymentStatus status =
- DeploymentSupport.mapToDeploymentStatus( statusData );
-
- println( "Undeployment result: " + status.getStageStatus() );
- if ( status.getStageThrowable() != null )
- {
- status.getStageThrowable().printStackTrace();
- }
- }
-
- /**
- Get a J2EEServer by name.
- */
- public J2EEServer
- getJ2EEServer( final String serverName )
- {
- final J2EEDomain j2eeDomain = getDomainRoot().getJ2EEDomain();
- final Map servers = j2eeDomain.getServerMap();
- final J2EEServer server = (J2EEServer)servers.get( serverName );
-
- if ( server == null )
- {
- throw new IllegalArgumentException( serverName );
- }
-
- return( server );
- }
-
- /**
- Create a standalone server.
-
- @param configName
- */
- public ConfigConfig
- createConfig( final String configName )
- {
- final ConfigConfig config = getDomainConfig().createConfigConfig( configName, null );
- return( config );
- }
-
- /**
- Create a standalone server.
-
- @param serverName
- */
- public StandaloneServerConfig
- createServer(
- final String serverName,
- final String configName )
- {
- final String nodeAgentName = null;
-
- final StandaloneServerConfig server = (StandaloneServerConfig)
- getDomainConfig().createStandaloneServerConfig( serverName, nodeAgentName, configName, null );
-
- return( server );
- }
-
- public StandaloneServerConfig
- createServer( final String serverName )
- {
- final ConfigConfig config = createConfig( serverName + "-config" );
-
- final StandaloneServerConfig server = createServer( serverName, config.getName() );
- return( server );
- }
-
-
- /**
- Start a server.
- */
- public void
- startServer( final String serverName )
- {
- final J2EEServer server = getJ2EEServer( serverName );
-
- server.start();
- }
-
- /**
- Stop a server.
- */
- public void
- stopServer( final String serverName )
- {
- final J2EEServer server = getJ2EEServer( serverName );
-
- server.stop();
- }
-
-
- private static final Set LEGAL_MON =
- Collections.unmodifiableSet( SampleUtil.newSet( new String[]
- {
- ModuleMonitoringLevelValues.HIGH,
- ModuleMonitoringLevelValues.LOW,
- ModuleMonitoringLevelValues.OFF,
- } ));
-
- /**
- Sets the monitoring state for all available modules.
-
- @param configName configuration element on which to operate
- @param state one of HIGH, LOW, OFF
- */
- public void
- setMonitoring(
- final String configName,
- final String state )
- {
- if ( ! LEGAL_MON.contains( state ) )
- {
- throw new IllegalArgumentException( state );
- }
-
- final ConfigConfig config =
- (ConfigConfig)getDomainConfig().getConfigConfigMap().get( configName );
-
- final ModuleMonitoringLevelsConfig mon =
- config.getMonitoringServiceConfig().getModuleMonitoringLevelsConfig();
-
- // set all modules to the same state
- mon.setConnectorConnectionPool( state );
- mon.setThreadPool( state );
- mon.setHTTPService( state );
- mon.setJDBCConnectionPool( state );
- mon.setORB( state );
- mon.setTransactionService( state );
- mon.setWebContainer( state );
- mon.setEJBContainer( state );
- }
-
- /**
- Get a Map of <i>property-name</i>=<i>property-value</i>.
-
- @param pa a PropertiesAccess
- */
- public Map
- getProperties( final PropertiesAccess pa )
- {
- final HashMap m = new HashMap();
-
- final String[] names = pa.getPropertyNames();
- for( int i = 0; i < names.length; ++i )
- {
- m.put( names[ i ], pa.getPropertyValue( names[ i ] ) );
- }
-
- return( m );
- }
-
- /**
- Display all properties found on all {@link AMX}.
-
- @see #getProperties(PropertiesAccess)
- @see PropertiesAccess#getPropertyNames
- */
- public void
- displayAllProperties( )
- {
- final Iterator iter = getQueryMgr().queryAllSet().iterator();
- while ( iter.hasNext() )
- {
- final AMX amx = (AMX)iter.next();
-
- if ( amx instanceof PropertiesAccess )
- {
- final PropertiesAccess pa = (PropertiesAccess)amx;
-
- final Map props = getProperties( pa );
- if ( props.keySet().size() != 0 )
- {
- println( "\nProperties for: " + Util.getObjectName( (AMX)pa ) );
- println( SampleUtil.mapToString( getProperties( pa ), "\n") );
- }
- }
- }
- }
-
- private void
- mySleep( final long millis )
- {
- try
- {
- Thread.sleep( millis );
- }
- catch( InterruptedException e )
- {
- }
- }
-
-
- public final static String MBEAN_SERVER_DELEGATE =
- "JMImplementation:type=MBeanServerDelegate";
- public static ObjectName
- getMBeanServerDelegateObjectName()
- {
- return( Util.newObjectName( MBEAN_SERVER_DELEGATE ) );
- }
-
-
- private void
- waitNumNotifs( final Map notifs, final String type, final int numRequired )
- {
- while ( true )
- {
- final List list = (List)notifs.get( type );
- if ( list != null && list.size() >= numRequired )
- {
- break;
- }
+ /**
+ Turn an object into a useful String
+ */
+ public String
+ toString( Object o )
+ {
+ return( SampleUtil.toString( o ) );
+ }
- mySleep( 50 );
- }
- }
-
-
-
- private void
- waitMBeanServerNotification(
- final SampleListener listener,
- final String type,
- final ObjectName objectName )
- {
- List list = null;
- while ( (list = listener.getNotifsReceived( type )) == null )
- {
- mySleep( 50 );
- }
-
- boolean waiting = true;
- while ( waiting )
- {
- final Iterator iter = list.iterator();
- while ( iter.hasNext() )
- {
- final MBeanServerNotification notif = (MBeanServerNotification)iter.next();
- if ( notif.getMBeanName().equals( objectName ) )
- {
- waiting = false;
- break;
- }
- else
- {
- SampleUtil.println( "Unexpected ObjectName: " + objectName + " != " + notif.getMBeanName() );
- }
- }
- mySleep( 100 );
- }
- }
-
-
- /**
- Demonstrates the use of a javax.management.monitor MBean
- to be notified of changes in the value of an Attribute.
- */
- public void
- demoJMXMonitor()
- throws InstanceNotFoundException, IOException
- {
- final JMXMonitorMgr mgr = getDomainRoot().getJMXMonitorMgr();
-
- final String attrName = "SampleString";
- final String attrValue = "hello";
-
- // listen to the MBeanServerDelegate, too, so we can see our sample monitor
- // get registered.
- final SampleListener sampleListener = new SampleListener();
- final MBeanServerConnection conn =
- Util.getExtra( mgr ).getConnectionSource().getExistingMBeanServerConnection();
- conn.addNotificationListener(
- getMBeanServerDelegateObjectName(), sampleListener, null, null );
-
-
- final Sample sample = (Sample)getDomainRoot().getContainee( XTypes.SAMPLE );
-
- final String monitorName = "SampleStringMonitor";
- AMXStringMonitor mon = null;
- try
- {
- // cleanup in case it was left around by mistake...
- try { mgr.remove( monitorName ); } catch( Exception e ) {}
-
- // create a new one
- mon = mgr.createStringMonitor( monitorName );
- // observer that we've been notified (not required)
- waitMBeanServerNotification( sampleListener,
- MBeanServerNotification.REGISTRATION_NOTIFICATION, Util.getObjectName( mon ) );
-
- // we'll modify this Attribute's value, to force a change
- sample.addAttribute( attrName, attrValue );
-
- // listen to the monitor
- mon.addNotificationListener( sampleListener, null, null );
- mon.setObservedAttribute( attrName );
- mon.setStringToCompare( attrValue );
- mon.setNotifyDiffer( true );
- mon.setNotifyMatch( true );
-
- // tell the monitor to observe sample
- mon.addObservedObject( Util.getObjectName( sample ) );
-
- // since the Attribute was added dynamically, there is no
- // getter method, so we must access the Attribute via JMX
- final StdAttributesAccess attrs = Util.getExtra( sample );
- attrs.setAttribute( new Attribute( attrName, "goodbye" ) );
- // set it to original value
- attrs.setAttribute( new Attribute( attrName, attrValue ) );
-
- // we added it,so we should remove it
- sample.removeAttribute( attrName );
-
- // let the Notifications arrive...
- final Map notifs = sampleListener.getNotifsReceived();
- waitNumNotifs( notifs, AttributeChangeNotification.ATTRIBUTE_CHANGE, 4 );
- }
- catch( Throwable t )
- {
- t.printStackTrace();
- }
- finally
- {
- try
- {
- mon.removeNotificationListener( sampleListener );
-
- // don't leave monitors around
- if ( mon != null )
- {
- mgr.remove( mon.getName() );
- // observer that we've been notified (not required)
- waitMBeanServerNotification( sampleListener,
- MBeanServerNotification.UNREGISTRATION_NOTIFICATION,
- Util.getObjectName( mon ) );
- }
-
- conn.removeNotificationListener(
- getMBeanServerDelegateObjectName(), sampleListener );
- }
- catch( ListenerNotFoundException e )
- {
- }
- }
- }
+ /**
+ Display a Map to System.out.
+ */
+ private void
+ displayMap(
+ final String msg,
+ final Map m)
+ {
+ println( msg + ": " + toString( m.keySet() ) );
+ }
+
+ /**
+ Demonstrates how to access various types of {@link AMX} by obtaining a Map and then displaying it.
+ */
+ public void
+ handleList()
+ {
+ final DomainConfig dcp = getDomainConfig();
+
+ // Top-level items
+ println( "\n--- Top-level --- \n" );
+
+ displayMap( "ConfigConfig", dcp.getConfigConfigMap() );
+
+ displayMap( "ServerConfig", dcp.getServerConfigMap() );
+
+ displayMap( "StandaloneServerConfig", dcp.getStandaloneServerConfigMap() );
+
+ displayMap( "ClusteredServerConfig", dcp.getClusteredServerConfigMap() );
+
+ displayMap( "ClusterConfig", dcp.getClusterConfigMap() );
+
+
+ // deployed items
+ println( "\n--- DeployedItems --- \n" );
+ displayMap( "J2EEApplicationConfig", dcp.getJ2EEApplicationConfigMap() );
+ displayMap( "EJBModuleConfig", dcp.getEJBModuleConfigMap() );
+ displayMap( "WebModuleConfig", dcp.getWebModuleConfigMap() );
+ displayMap( "RARModuleConfig", dcp.getRARModuleConfigMap() );
+ displayMap( "AppClientModuleConfig", dcp.getAppClientModuleConfigMap() );
+ displayMap( "LifecycleModuleConfig", dcp.getLifecycleModuleConfigMap() );
+
+
+ // resources
+ println( "\n--- Resources --- \n" );
+
+ displayMap( "CustomResourceConfig", dcp.getCustomResourceConfigMap() );
+ displayMap( "PersistenceManagerFactoryResourceConfig",
+ dcp.getPersistenceManagerFactoryResourceConfigMap() );
+ displayMap( "JNDIResourceConfig", dcp.getJNDIResourceConfigMap() );
+ displayMap( "JMSResourceConfig", dcp.getJMSResourceConfigMap() );
+ displayMap( "JDBCResourceConfig", dcp.getJDBCResourceConfigMap() );
+ displayMap( "ConnectorResourceConfig", dcp.getConnectorResourceConfigMap() );
+ displayMap( "JDBCConnectionPoolConfig", dcp.getJDBCConnectionPoolConfigMap() );
+ displayMap( "PersistenceManagerFactoryResourceConfig",
+ dcp.getPersistenceManagerFactoryResourceConfigMap() );
+ displayMap( "ConnectorConnectionPoolConfig",
+ dcp.getConnectorConnectionPoolConfigMap() );
+ displayMap( "AdminObjectResourceConfig", dcp.getAdminObjectResourceConfigMap() );
+ displayMap( "ResourceAdapterConfig", dcp.getResourceAdapterConfigMap() );
+ displayMap( "MailResourceConfig", dcp.getMailResourceConfigMap() );
+
+
+ // get a ConfigConfig
+ final ConfigConfig config =
+ (ConfigConfig)dcp.getConfigConfigMap().get( "server-config" );
+
+
+ // HTTPService
+ println( "\n--- HTTPService --- \n" );
+
+ final HTTPServiceConfig httpService = config.getHTTPServiceConfig();
+ displayMap( "HTTPListeners", httpService.getHTTPListenerConfigMap() );
+ displayMap( "VirtualServers", httpService.getVirtualServerConfigMap() );
+ }
+
+ /**
+ Return a Set of {@link AMX} whose ObjectName has the property
+ <i>property-name</i>=<i>property-value</i>.
+
+ @param propertyName
+ @param propertyValue
+ @return Set of {@link AMX}
+ */
+ public Set
+ queryWild(
+ final String propertyName,
+ final String propertyValue)
+ {
+ final String[] propNames = new String[] { propertyName };
+ final String[] propValues = new String[]{ propertyValue };
+
+ final Set amxs = getQueryMgr().queryWildSet( propNames, propValues );
+
+ return( amxs );
+ }
+
+ /**
+ Call queryWild( propertyName, propertyValue ) and display the result.
+
+ @param propertyName
+ @param propertyValue
+ */
+ public void
+ displayWild(
+ final String propertyName,
+ final String propertyValue)
+ {
+ final Set items = queryWild( propertyName, propertyValue );
+
+ println( "\n--- Queried for " + propertyName + "=" + propertyValue + " ---" );
+ final Iterator iter = items.iterator();
+ while ( iter.hasNext() )
+ {
+ final AMX item = (AMX)iter.next();
+
+ println( "j2eeType=" + item.getJ2EEType() + "," + "name=" + item.getName() );
+ }
+ }
+
+ public Set
+ queryForJ2EEType( final String j2eeType )
+ {
+ final String prop = Util.makeJ2EETypeProp( j2eeType );
+ final Set items = getQueryMgr().queryPropsSet( prop );
+
+ return( items );
+ }
+
+ public void
+ displayAvailableChildTypes( final String j2eeType )
+ {
+ final DomainRoot domainRoot = getDomainRoot();
+
+ }
+
+ private String
+ getIndent( final int num )
+ {
+ final char[] indent = new char[ num ];
+ for( int i = 0; i < num; ++i )
+ {
+ indent[ i ] = ' ';
+ }
+ return( new String( indent ) );
+ }
+
+ /**
+ Display the j2eeType and name (if not {@link AMX#NO_NAME})
+ */
+ private void
+ displayAMX(
+ final AMX amx,
+ final int indentCount )
+ {
+ final String indent = getIndent( indentCount );
+
+ final String j2eeType = amx.getJ2EEType();
+ final String name = amx.getName();
+ if ( name.equals( AMX.NO_NAME ) )
+ {
+ println( indent + j2eeType );
+ }
+ else
+ {
+ println( indent + j2eeType + "=" + name );
+ }
+ }
+
+ private void
+ displayHierarchy(
+ final Collection amxSet,
+ final int indentCount )
+ {
+ final Iterator iter = amxSet.iterator();
+ while ( iter.hasNext() )
+ {
+ final AMX amx = (AMX)iter.next();
+ displayHierarchy( amx, indentCount );
+ }
+ }
+
+ /**
+ Display the hierarchy of {@link AMX} beginning with the specified one
+ */
+ public void
+ displayHierarchy(
+ final AMX amx,
+ final int indentCount )
+ {
+ displayAMX( amx, indentCount );
+
+ if ( amx instanceof Container )
+ {
+ // get Maps of all contained items
+ final Map m = ((Container)amx).getMultiContaineeMap( null );
+
+ // for clarity of display, separate out those that are Containers,
+ // and those that are not.
+ final Set deferred = new HashSet();
+ final Iterator mapsIter = m.values().iterator();
+ while ( mapsIter.hasNext() )
+ {
+ final Map instancesMap = (Map)mapsIter.next();
+ final AMX first = (AMX)instancesMap.values().iterator().next();
+ if ( first instanceof Container )
+ {
+ deferred.add( instancesMap );
+ }
+ else
+ {
+ displayHierarchy( instancesMap.values(), indentCount + 2);
+ }
+ }
+
+ // display deferred items
+ final Iterator iter = deferred.iterator();
+ while ( iter.hasNext() )
+ {
+ final Map instancesMap = (Map)iter.next();
+ displayHierarchy( instancesMap.values(), indentCount + 2);
+ }
+ }
+
+ }
+
+ /**
+ Display the entire MBean hierarchy.
+ */
+ public void
+ displayHierarchy()
+ {
+ displayHierarchy( getDomainRoot(), 0);
+ }
+
+ /**
+ Display the MBean hierarchy beginning with j2eeType.
+ */
+ public void
+ displayHierarchy( final String j2eeType )
+ {
+ final Set items = getQueryMgr().queryJ2EETypeSet( j2eeType );
+
+ if ( items.size() == 0 )
+ {
+ println( "No {@link AMX} of j2eeType " + SampleUtil.quote( j2eeType ) + " found" );
+ }
+ else
+ {
+ displayHierarchy( items, 0);
+ }
+ }
+
+
+ /**
+ Display all MBeans that have j2eeType=<j2eeType>
+ */
+ public void
+ displayJ2EEType( final String j2eeType )
+ {
+ final Set items = queryForJ2EEType( j2eeType );
+
+ println( "\n--- Queried for j2eeType=" + j2eeType + " ---" );
+
+ final Iterator iter = items.iterator();
+ while ( iter.hasNext() )
+ {
+ final AMX item = (AMX)iter.next();
+
+ // they may or may not have unique names, so show ObjectNames
+ println( Util.getObjectName( item ) );
+ }
+ println( "" );
+ }
+
+
+ /**
+ Display all Attributes in the {@link AMX}.
+ */
+ public void
+ displayAllAttributes( final AMX item )
+ {
+ println( "\n--- Attributes for " + item.getJ2EEType() + "=" + item.getName() + " ---" );
+
+ final Extra extra = Util.getExtra( item );
+
+ final Map attrs = extra.getAllAttributes();
+
+ final Iterator iter = attrs.keySet().iterator();
+ while ( iter.hasNext() )
+ {
+ final String name = (String)iter.next();
+ final Object value = attrs.get( name );
+
+ println( name + "=" + toString( value ) );
+ }
+ }
+
+ /**
+ Display all Attributes in the {@link AMX}.
+ */
+ public void
+ displayAllAttributes( final String j2eeType )
+ {
+ final Set items = queryForJ2EEType( j2eeType );
+
+ if ( items.size() == 0 )
+ {
+ println( "No {@link AMX} of j2eeType " + SampleUtil.quote( j2eeType ) + " found" );
+ }
+ else
+ {
+ final Iterator iter = items.iterator();
+ while ( iter.hasNext() )
+ {
+ final AMX amx = (AMX)iter.next();
+
+ displayAllAttributes( amx );
+ println( "" );
+ }
+ }
+ }
+
+
+ /**
+ Display all dotted names.
+ */
+ public void
+ displayDottedNames()
+ {
+ final ConfigDottedNames configDottedNames = getDomainRoot().getConfigDottedNames();
+ Attribute[] result = (Attribute[])configDottedNames.dottedNameGet( "*" );
+ println( "--- ConfigDottedNames ---" );
+ println( SampleUtil.arrayToString( result, "", "\n" ) );
+
+ println( "\n--- MonitoringDottedNames ---" );
+
+ final MonitoringDottedNames monDottedNames = getDomainRoot().getMonitoringDottedNames();
+ result = (Attribute[])monDottedNames.dottedNameGet( "*" );
+ println( SampleUtil.arrayToString( result, "", "\n" ) );
+ }
+
+
+ /**
+ Demonstrate how to use the {@link com.sun.appserv.management.base.QueryMgr} facilities.
+ */
+ public void
+ demoQuery()
+ {
+ displayWild( AMX.J2EE_TYPE_KEY, "X-*ResourceConfig" );
+ displayWild( AMX.J2EE_TYPE_KEY, "X-*ServerConfig" );
+
+ displayJ2EEType( XTypes.SSL_CONFIG );
+ displayJ2EEType( XTypes.CLUSTER_CONFIG );
+ }
+
+
+ private Object
+ uploadArchive( final File archive )
+ throws IOException
+ {
+ final FileInputStream input = new FileInputStream( archive );
+ final long length = input.available();
+ final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
+ final Object uploadID = mgr.initiateFileUpload( length );
+
+ try
+ {
+ final int chunkSize = 256 * 1024;
+ long remaining = length;
+ while ( remaining != 0 )
+ {
+ final int actual = remaining < chunkSize ? (int)remaining : chunkSize;
+
+ final byte[] bytes = new byte[ actual ];
+ final int num = input.read( bytes );
+ if ( num != actual )
+ {
+ throw new IOException();
+ }
+
+ mgr.uploadBytes( uploadID, bytes );
+ remaining -= actual;
+ }
+ }
+ finally
+ {
+ input.close();
+ }
+
+ return( uploadID );
+ }
+
+
+ private final String
+ getAppName( final String archiveName )
+ {
+ String result = archiveName;
+
+ final int idx = archiveName.lastIndexOf( "." );
+ if ( idx > 1 )
+ {
+ result = archiveName.substring( 0, idx );
+ }
+
+ return( result );
+ }
+
+ /**
+ Deploy an archive.
+ <p>
+ To deploy, you will need an archive to deploy. A recommended sample may be found at:
+ <i>INSTALL_ROOT</i>/samples/ejb/stateless/apps/simple.ear
+ <p>
+ This sample deploys the archive to the domain, but does not create any references
+ to it, so it will not actually be associated with any server.
+ <p>
+ To associate an application with a server, use
+ {@link StandaloneServerConfig#createDeployedItemRefConfig}
+ @see com.sun.appserv.management.config.StandaloneServerConfig
+ @see com.sun.appserv.management.config.DeployedItemRefConfigCR
+ */
+ public void
+ deploy( final File archive )
+ throws IOException
+ {
+ final Object uploadID = uploadArchive( archive );
+ final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
+
+ final Object deployID = mgr.initDeploy( );
+ final DeployNotificationListener myListener = new DeployNotificationListener( deployID);
+ mgr.addNotificationListener( myListener, null, null);
+
+ try
+ {
+ final Map options = new HashMap();
+
+ final String archiveName = archive.getName();
+ final String deployName = getAppName( archiveName );
+ SampleUtil.println( "Deploying " + archiveName + " as " + deployName );
+
+ options.put( DeploymentMgr.DEPLOY_OPTION_NAME_KEY, deployName );
+ options.put( DeploymentMgr.DEPLOY_OPTION_VERIFY_KEY, Boolean.TRUE.toString() );
+ options.put( DeploymentMgr.DEPLOY_OPTION_DESCRIPTION_KEY, "description" );
+
+
+ mgr.startDeploy( deployID, uploadID, null, options);
+
+ while ( ! myListener.isCompleted() )
+ {
+ try
+ {
+ println( "deploy: waiting for deploy of " + archive);
+ Thread.sleep( 1000 );
+ }
+ catch( InterruptedException e )
+ {
+ }
+ }
+
+ final DeploymentStatus status = myListener.getDeploymentStatus();
+ final int statusCode = status.getStatusCode();
+ if ( statusCode == DeploymentStatus.STATUS_CODE_SUCCESS )
+ {
+ final Map additionalStatus = status.getAdditionalStatus();
+ final String moduleID =
+ (String)additionalStatus.get( DeploymentStatus.MODULE_ID_KEY );
+
+ SampleUtil.println( "Deployed " + quote(archiveName) + " as " + quote(deployName) +
+ ": status=" + status.getStageStatus() + ", moduleID = " + quote(moduleID) +
+ ", AdditionalStatus=" + SampleUtil.mapToString( additionalStatus, " ") );
+
+ if ( ! deployName.equals( moduleID ) )
+ {
+ SampleUtil.println( "WARNING: requested name of " + quote(deployName) +
+ " has not been used, actual name = " + quote(moduleID) +
+ ", see bug #6218714" );
+ }
+ }
+ else
+ {
+ SampleUtil.println( "Deployment of " + quote( archiveName ) +
+ " FAILED, status code = " + statusCode );
+ }
+
+ if ( status.getStageThrowable() != null )
+ {
+ status.getStageThrowable().printStackTrace();
+ }
+ }
+ finally
+ {
+ try
+ {
+ mgr.removeNotificationListener( myListener );
+ }
+ catch( Exception e )
+ {
+ }
+ }
+ }
+
+ private String
+ quote( final String s )
+ {
+ return SampleUtil.quote( s );
+ }
+
+ /**
+ Undeploys a deployed module.
+ */
+ public void
+ undeploy( final String moduleName )
+ throws IOException
+ {
+ final DeploymentMgr mgr = getDomainRoot().getDeploymentMgr();
+
+ final Map statusData = mgr.undeploy( moduleName, null );
+ final DeploymentStatus status =
+ DeploymentSupport.mapToDeploymentStatus( statusData );
+
+ println( "Undeployment result: " + status.getStageStatus() );
+ if ( status.getStageThrowable() != null )
+ {
+ status.getStageThrowable().printStackTrace();
+ }
+ }
+
+ /**
+ Get a J2EEServer by name.
+ */
+ public J2EEServer
+ getJ2EEServer( final String serverName )
+ {
+ final J2EEDomain j2eeDomain = getDomainRoot().getJ2EEDomain();
+ final Map servers = j2eeDomain.getServerMap();
+ final J2EEServer server = (J2EEServer)servers.get( serverName );
+
+ if ( server == null )
+ {
+ throw new IllegalArgumentException( serverName );
+ }
+
+ return( server );
+ }
+
+ /**
+ Create a standalone server.
+
+ @param configName
+ */
+ public ConfigConfig
+ createConfig( final String configName )
+ {
+ final ConfigConfig config = getDomainConfig().createConfigConfig( configName, null );
+ return( config );
+ }
+
+ /**
+ Create a standalone server.
+
+ @param serverName
+ */
+ public StandaloneServerConfig
+ createServer(
+ final String serverName,
+ final String configName )
+ {
+ final String nodeAgentName = null;
+
+ final StandaloneServerConfig server = (StandaloneServerConfig)
+ getDomainConfig().createStandaloneServerConfig( serverName, nodeAgentName, configName, null );
+
+ return( server );
+ }
+
+ public StandaloneServerConfig
+ createServer( final String serverName )
+ {
+ final ConfigConfig config = createConfig( serverName + "-config" );
+
+ final StandaloneServerConfig server = createServer( serverName, config.getName() );
+ return( server );
+ }
+
+
+ /**
+ Start a server.
+ */
+ public void
+ startServer( final String serverName )
+ {
+ final J2EEServer server = getJ2EEServer( serverName );
+
+ server.start();
+ }
+
+ /**
+ Stop a server.
+ */
+ public void
+ stopServer( final String serverName )
+ {
+ final J2EEServer server = getJ2EEServer( serverName );
+
+ server.stop();
+ }
+
+
+ private static final Set LEGAL_MON =
+ Collections.unmodifiableSet( SampleUtil.newSet( new String[]
+ {
+ ModuleMonitoringLevelValues.HIGH,
+ ModuleMonitoringLevelValues.LOW,
+ ModuleMonitoringLevelValues.OFF,
+ } ));
+
+ /**
+ Sets the monitoring state for all available modules.
+
+ @param configName configuration element on which to operate
+ @param state one of HIGH, LOW, OFF
+ */
+ public void
+ setMonitoring(
+ final String configName,
+ final String state )
+ {
+ if ( ! LEGAL_MON.contains( state ) )
+ {
+ throw new IllegalArgumentException( state );
+ }
+
+ final ConfigConfig config =
+ (ConfigConfig)getDomainConfig().getConfigConfigMap().get( configName );
+
+ final ModuleMonitoringLevelsConfig mon =
+ config.getMonitoringServiceConfig().getModuleMonitoringLevelsConfig();
+
+ // set all modules to the same state
+ mon.setConnectorConnectionPool( state );
+ mon.setThreadPool( state );
+ mon.setHTTPService( state );
+ mon.setJDBCConnectionPool( state );
+ mon.setORB( state );
+ mon.setTransactionService( state );
+ mon.setWebContainer( state );
+ mon.setEJBContainer( state );
+ }
+
+ /**
+ Get a Map of <i>property-name</i>=<i>property-value</i>.
+
+ @param pa a PropertiesAccess
+ */
+ public Map
+ getProperties( final PropertiesAccess pa )
+ {
+ final HashMap m = new HashMap();
+
+ final String[] names = pa.getPropertyNames();
+ for( int i = 0; i < names.length; ++i )
+ {
+ m.put( names[ i ], pa.getPropertyValue( names[ i ] ) );
+ }
+
+ return( m );
+ }
+
+ /**
+ Display all properties found on all {@link AMX}.
+
+ @see #getProperties(PropertiesAccess)
+ @see PropertiesAccess#getPropertyNames
+ */
+ public void
+ displayAllProperties( )
+ {
+ final Iterator iter = getQueryMgr().queryAllSet().iterator();
+ while ( iter.hasNext() )
+ {
+ final AMX amx = (AMX)iter.next();
+
+ if ( amx instanceof PropertiesAccess )
+ {
+ final PropertiesAccess pa = (PropertiesAccess)amx;
+
+ final Map props = getProperties( pa );
+ if ( props.keySet().size() != 0 )
+ {
+ println( "\nProperties for: " + Util.getObjectName( (AMX)pa ) );
+ println( SampleUtil.mapToString( getProperties( pa ), "\n") );
+ }
+ }
+ }
+ }
+
+ private void
+ mySleep( final long millis )
+ {
+ try
+ {
+ Thread.sleep( millis );
+ }
+ catch( InterruptedException e )
+ {
+ }
+ }
+
+
+ public final static String MBEAN_SERVER_DELEGATE =
+ "JMImplementation:type=MBeanServerDelegate";
+ public static ObjectName
+ getMBeanServerDelegateObjectName()
+ {
+ return( Util.newObjectName( MBEAN_SERVER_DELEGATE ) );
+ }
+
+
+ private void
+ waitNumNotifs( final Map notifs, final String type, final int numRequired )
+ {
+ while ( true )
+ {
+ final List list = (List)notifs.get( type );
+ if ( list != null && list.size() >= numRequired )
+ {
+ break;
+ }
+
+ mySleep( 50 );
+ }
+ }
+
+
+
+ private void
+ waitMBeanServerNotification(
+ final SampleListener listener,
+ final String type,
+ final ObjectName objectName )
+ {
+ List list = null;
+ while ( (list = listener.getNotifsReceived( type )) == null )
+ {
+ mySleep( 50 );
+ }
+
+ boolean waiting = true;
+ while ( waiting )
+ {
+ final Iterator iter = list.iterator();
+ while ( iter.hasNext() )
+ {
+ final MBeanServerNotification notif = (MBeanServerNotification)iter.next();
+ if ( notif.getMBeanName().equals( objectName ) )
+ {
+ waiting = false;
+ break;
+ }
+ else
+ {
+ SampleUtil.println( "Unexpected ObjectName: " + objectName + " != " + notif.getMBeanName() );
+ }
+ }
+ mySleep( 100 );
+ }
+ }
+
+
+ /**
+ Demonstrates the use of a javax.management.monitor MBean
+ to be notified of changes in the value of an Attribute.
+ */
+ public void
+ demoJMXMonitor()
+ throws InstanceNotFoundException, IOException
+ {
+ final JMXMonitorMgr mgr = getDomainRoot().getJMXMonitorMgr();
+
+ final String attrName = "SampleString";
+ final String attrValue = "hello";
+
+ // listen to the MBeanServerDelegate, too, so we can see our sample monitor
+ // get registered.
+ final SampleListener sampleListener = new SampleListener();
+ final MBeanServerConnection conn =
+ Util.getExtra( mgr ).getConnectionSource().getExistingMBeanServerConnection();
+ conn.addNotificationListener(
+ getMBeanServerDelegateObjectName(), sampleListener, null, null );
+
+
+ final Sample sample = (Sample)getDomainRoot().getContainee( XTypes.SAMPLE );
+
+ final String monitorName = "SampleStringMonitor";
+ AMXStringMonitor mon = null;
+ try
+ {
+ // cleanup in case it was left around by mistake...
+ try { mgr.remove( monitorName ); } catch( Exception e ) {}
+
+ // create a new one
+ mon = mgr.createStringMonitor( monitorName );
+ // observer that we've been notified (not required)
+ waitMBeanServerNotification( sampleListener,
+ MBeanServerNotification.REGISTRATION_NOTIFICATION, Util.getObjectName( mon ) );
+
+ // we'll modify this Attribute's value, to force a change
+ sample.addAttribute( attrName, attrValue );
+
+ // listen to the monitor
+ mon.addNotificationListener( sampleListener, null, null );
+ mon.setObservedAttribute( attrName );
+ mon.setStringToCompare( attrValue );
+ mon.setNotifyDiffer( true );
+ mon.setNotifyMatch( true );
+
+ // tell the monitor to observe sample
+ mon.addObservedObject( Util.getObjectName( sample ) );
+
+ // since the Attribute was added dynamically, there is no
+ // getter method, so we must access the Attribute via JMX
+ final StdAttributesAccess attrs = Util.getExtra( sample );
+ attrs.setAttribute( new Attribute( attrName, "goodbye" ) );
+ // set it to original value
+ attrs.setAttribute( new Attribute( attrName, attrValue ) );
+
+ // we added it,so we should remove it
+ sample.removeAttribute( attrName );
+
+ // let the Notifications arrive...
+ final Map notifs = sampleListener.getNotifsReceived();
+ waitNumNotifs( notifs, AttributeChangeNotification.ATTRIBUTE_CHANGE, 4 );
+ }
+ catch( Throwable t )
+ {
+ t.printStackTrace();
+ }
+ finally
+ {
+ try
+ {
+ mon.removeNotificationListener( sampleListener );
+
+ // don't leave monitors around
+ if ( mon != null )
+ {
+ mgr.remove( mon.getName() );
+ // observer that we've been notified (not required)
+ waitMBeanServerNotification( sampleListener,
+ MBeanServerNotification.UNREGISTRATION_NOTIFICATION,
+ Util.getObjectName( mon ) );
+ }
+
+ conn.removeNotificationListener(
+ getMBeanServerDelegateObjectName(), sampleListener );
+ }
+ catch( ListenerNotFoundException e )
+ {
+ }
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/build.properties
index 54534e9..423039a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/build.properties
@@ -15,7 +15,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="cluster.name" value="ee-event-cluster"/>
<property name="nodeagent.name" value="ee-event-agent"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/build.properties
index 08b67db..8433e16 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/build.properties
@@ -15,30 +15,30 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="ee" value="enterprise edition"/>
<property name="module" value="notification"/>
-<property name="appname" value="${module}-lookup"/>
+<property name="appname" value="${module}-lookup"/> \u0020
-<property name="assemble"
- value="${build.classes.dir}/archive"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
-<property name="appclient.jar"
- value="${assemble.dir}/${appname}-client.jar"/>
+<property name="assemble"\u0020
+ value="${build.classes.dir}/archive"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
+<property name="appclient.jar"\u0020
+ value="${assemble.dir}/${appname}-client.jar"/> \u0020
-<property name="test.client"
- value="com.sun.devtest.admin.notification.lookup.client.LookupClient"/>
+<property name="test.client"\u0020
+ value="com.sun.devtest.admin.notification.lookup.client.LookupClient"/>
<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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.xml"/>
<property name="app.type" value="application"/>
<property name="client.jar.location" value="${admin.domain.dir}/${admin.domain}/applications/j2ee-apps/${appname}Client.jar"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/build.xml
index 1460d8f..d2bfa8b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/build.xml
@@ -42,7 +42,7 @@
<target name="setup"/>
<target name="unsetup"/>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -54,8 +54,8 @@
<target name="build" depends="compile">
<antcall target="build-ear-common"/>
- </target>
-
+ </target>
+
<target name="deploy" depends="init-common">
<antcall target="deploy-ee">
<param name="appserver.instance.name" value="ee-event-cluster"/>
@@ -77,7 +77,7 @@
</antcall>
</target>
- <target name="deploy-ee" depends="init-common" if="ee">
+ <target name="deploy-ee" depends="init-common" if="ee">
<echo message="So you are using Enterprise Version eh ?"/>
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
@@ -96,7 +96,7 @@
<echo message="Deployment on target server ${appserver.instance.name} successful"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="run-test-0" />
<antcall target="run-test-1" />
@@ -375,31 +375,31 @@
<target name="run-standalone-client" depends="init-common">
<property name="jndi.name" value="lookupbean"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<!--
- <property name="ctxfactory"
- value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
+ <property name="ctxfactory"
+ value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
-->
- <echo message="provider.url used is ${provider.url}"/>
+ <echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
- <jvmarg value="-DtestId=${test.id}"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <jvmarg value="-DtestId=${test.id}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
</java>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common">
<param name="appserver.instance.name" value="ee-event-cluster"/>
</antcall>
<antcall target="restart-cluster"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/client/LookupClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/client/LookupClient.java
index 289e978..882aa20 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/client/LookupClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/client/LookupClient.java
@@ -26,12 +26,12 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
/**
- * A simple java client. This uses the services provided by the
+ * A simple java client. This uses the services provided by the
* <code>LookupBean</code>.
*/
public class LookupClient {
- private SimpleReporterAdapter stat =
+ private SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
LookupClient() {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/application.xml
index a9155aa..5bb6d84 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/descriptor/application.xml
@@ -23,7 +23,7 @@
<small-icon></small-icon>
<large-icon></large-icon>
</icon>
- <display-name>notification-lookupApp</display-name>
+ <display-name>notification-lookupApp</display-name>
<module>
<java>notification-lookup-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/ejb/LookupBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/ejb/LookupBean.java
index 818365f..9229af5 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/ejb/LookupBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/notification/lookup/ejb/LookupBean.java
@@ -27,7 +27,7 @@
/**
*/
public class LookupBean implements SessionBean {
-
+
SessionContext sessionContext_;
BigDecimal yenRate = new BigDecimal("121.6000");
@@ -88,7 +88,7 @@
* Loads the state of the bean from secondary storage. Required by EJB spec.
*/
public void ejbActivate() {}
-
+
/**
* Keeps the state of the bean to secondary storage. Required by EJB spec.
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/build.properties
index 9f84851..7e3dbd2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/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="apiClient"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.s1asdev.ejb.stress.passivateactivate.client.Client"/>
+<property name="test.client"\u0020
+ value="com.sun.s1asdev.ejb.stress.passivateactivate.client.Client"/>
<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/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/build.xml
index 9d6a28b..d887ca1 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/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="**/*Client*.class, **/*SFSB*.class" />
</antcall>
- </target>
-
+ </target>
+
<target name="deploy" depends="init-common">
<antcall target="deploy-to-cluster">
<param name="appserver.instance.name" value="${cluster.name}"/>
@@ -78,7 +78,7 @@
</antcall>
-->
</target>
-
+
<target name="delete-resources" depends="init-common">
<!--
<antcall target="asadmin-batch-common">
@@ -107,15 +107,15 @@
<target name="run" depends="init-common">
<antcall target="runtest"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common">
<param name="appserver.instance.name" value="${cluster.name}"/>
</antcall>
- </target>
+ </target>
<!-- This should be a common target FIX IT -->
- <target name="deploy-to-cluster" depends="init-common">
+ <target name="deploy-to-cluster" depends="init-common">
<echo message="So you are using Enterprise Version eh ?"/>
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
@@ -130,7 +130,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"/>
<antcall target="stop-default-cluster-common"/>
<antcall target="start-default-cluster-common"/>
@@ -144,20 +144,20 @@
<target name="run-standalone-client" depends="init-common">
<property name="jndi.name" value="ejb/apiClient"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<!--
- <property name="ctxfactory"
- value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
+ <property name="ctxfactory"
+ value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
-->
- <echo message="provider.url used is ${provider.url}"/>
+ <echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
- <jvmarg value="-Dj2eelogin.name=${test.user}"/>
- <jvmarg value="-Dj2eelogin.password=${test.passwd}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <jvmarg value="-Dj2eelogin.name=${test.user}"/>
+ <jvmarg value="-Dj2eelogin.password=${test.passwd}"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
@@ -172,7 +172,7 @@
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant create-resources Create all destinations and connection factories
ant delete-resources Delete all destinations and connection factories
</echo>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/client/Client.java
index 48a517f..cdc3c30 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/client/Client.java
@@ -33,8 +33,8 @@
public static String kTestNotRun = "TEST NOT RUN";
public static String kTestPassed = "TEST PASSED";
public static String kTestFailed = "TEST FAILED";
-
- private static SimpleReporterAdapter stat =
+
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
@@ -47,7 +47,7 @@
stat.addStatus("client initSFSB-- wrong number of arguments", stat.FAIL);
System.out.println("Usage: SyncClientTest provider-url ctxFactory jndi-name <instanceName:string> <get|put> <source:string> <destination dir/file:string>");
return;
- }
+ }
if ( !args[4].equals("get") && !args[4].equals("put") ) {
stat.addStatus( "client initSFSB-- command can be either put or get. Please retry", stat.FAIL);
@@ -60,11 +60,11 @@
client.doTest(args);
System.out.println("[apiClient] DONE doTest()...");
stat.printSummary("synchronization");
- }
-
+ }
+
public Client (String[] args) {
}
-
+
public void doTest(String[] args) {
initSFSB(args);
@@ -77,7 +77,7 @@
try {
Context ic = null;
Object objref = null;
- if ((args[0] == null) || (args[1] == null)) {
+ if ((args[0] == null) || (args[1] == null)) {
ic = new InitialContext();
System.out.println("[apiClient] Lookingup Bean apiClient ");
objref = ic.lookup("java:comp/env/ejb/apiClient");
@@ -115,12 +115,12 @@
}
if ( r)
- System.out.println( args[4] + " of " + args[5] +
+ System.out.println( args[4] + " of " + args[5] +
" to " + args[6] + " passed.");
else
- System.out.println( args[4] + " of " + args[5] +
+ System.out.println( args[4] + " of " + args[5] +
" to " + args[6] + " failed.");
-
+
stat.addStatus("ejbclient accessSFSB", stat.PASS);
} catch (Exception ex) {
stat.addStatus("ejbclient accessSFSB", stat.FAIL);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/Synchronization.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/Synchronization.java
index 2a1e6ea..8a8ebc5 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/Synchronization.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/Synchronization.java
@@ -26,11 +26,11 @@
extends EJBObject
{
- public boolean getFile(String instanceName, String sourceFile,
- String destLoc) throws RemoteException;
+ public boolean getFile(String instanceName, String sourceFile,
+ String destLoc) throws RemoteException;
- public boolean putFile(String instanceName, String sourceFile,
- String destDir) throws RemoteException;
+ public boolean putFile(String instanceName, String sourceFile,
+ String destDir) throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/SynchronizationEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/SynchronizationEJB.java
index 2d4a13c..a7c78b1 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/SynchronizationEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/SynchronizationEJB.java
@@ -32,61 +32,61 @@
import com.sun.enterprise.ee.synchronization.SynchronizationException;
public class SynchronizationEJB
- implements SessionBean
+ implements SessionBean
{
- private SessionContext context;
+ private SessionContext context;
private Context initialCtx;
- public void ejbCreate() {
+ public void ejbCreate() {
}
- public boolean getFile(String instanceName, String sourceFile,
- String destLoc) {
- try {
- SynchronizationClient sc =
+ public boolean getFile(String instanceName, String sourceFile,
+ String destLoc) {
+ try {
+ SynchronizationClient sc =
SynchronizationFactory.createSynchronizationClient( instanceName);
sc.connect();
sc.get(sourceFile, destLoc);
sc.disconnect();
return true;
- } catch(Exception e) {
- e.printStackTrace();
- return false;
- }
+ } catch(Exception e) {
+ e.printStackTrace();
+ return false;
+ }
}
- public boolean putFile(String instanceName, String sourceFile,
- String destDir) {
- try {
- SynchronizationClient sc =
+ public boolean putFile(String instanceName, String sourceFile,
+ String destDir) {
+ try {
+ SynchronizationClient sc =
SynchronizationFactory.createSynchronizationClient( instanceName);
sc.connect();
String s = sc.put(sourceFile, destDir);
sc.disconnect();
System.out.println("Upload file at " + s);
return true;
- } catch(Exception e) {
- e.printStackTrace();
- return false;
- }
+ } catch(Exception e) {
+ e.printStackTrace();
+ return false;
+ }
}
- public void setSessionContext(SessionContext sc) {
- this.context = sc;
+ public void setSessionContext(SessionContext sc) {
+ this.context = sc;
try {
this.initialCtx = new InitialContext();
} catch (Throwable th) {
th.printStackTrace();
}
- }
+ }
- public void ejbRemove() {}
+ public void ejbRemove() {}
- public void ejbActivate() {
+ public void ejbActivate() {
System.out.println ("In SFSB.ejbActivate() " );
}
- public void ejbPassivate() {
+ public void ejbPassivate() {
System.out.println ("In SFSB.ejbPassivate() ");
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/SynchronizationHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/SynchronizationHome.java
index e72c8ba..43bcf69 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/SynchronizationHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/client/ejb/SynchronizationHome.java
@@ -23,6 +23,6 @@
public interface SynchronizationHome
extends EJBHome
{
- public Synchronization create()
+ public Synchronization create()
throws CreateException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/common.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/common.xml
index 8a119ba..193cb52 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/common.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/common.xml
@@ -19,9 +19,9 @@
<!-- common security tasks -->
<target name="create-user">
<antcall target="create-user-common">
- <param name="user" value="harpreet"/>
- <param name="password" value="harpreet"/>
- <param name="groups" value="employee"/>
+ <param name="user" value="harpreet"/>
+ <param name="password" value="harpreet"/>
+ <param name="groups" value="employee"/>
</antcall>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/build.properties
index c50f79e..5dd573d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/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="apiDeployment"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.s1asdev.ejb.stress.passivateactivate.client.Client"/>
+<property name="test.client"\u0020
+ value="com.sun.s1asdev.ejb.stress.passivateactivate.client.Client"/>
<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/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/build.xml
index 785b959..0753c3c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/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"/>
@@ -53,16 +53,16 @@
<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="**/*Client*.class, **/*SFSB*.class" />
</antcall>
- </target>
-
+ </target>
+
<target name="deploy" depends="init-common">
- <!-- All the modules deployments must be done after test case deployment-->
+ <!-- All the modules deployments must be done after test case deployment-->
<antcall target="deploy-to-das">
<param name="deployed.app" value="${env.S1AS_HOME}/samples/connectors/apps/mailconnector/mailconnector.rar"/>
</antcall>
@@ -90,7 +90,7 @@
</antcall>
-->
</target>
-
+
<target name="delete-resources" depends="init-common">
<!--
<antcall target="asadmin-batch-common">
@@ -124,7 +124,7 @@
<target name="run" depends="init-common">
<antcall target="runtest"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common">
<param name="deployedapp.name" value="timersession"/>
@@ -135,10 +135,10 @@
<antcall target="undeploy-common">
<param name="appserver.instance.name" value="${cluster.name}"/>
</antcall>
- </target>
+ </target>
<!-- This should be a common target FIX IT -->
- <target name="deploy-to-cluster" depends="init-common">
+ <target name="deploy-to-cluster" depends="init-common">
<echo message="So you are using Enterprise Version eh ?"/>
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
@@ -154,14 +154,14 @@
<!-- 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"/>
<antcall target="stop-default-cluster-common"/>
<antcall target="start-default-cluster-common"/>
</target>
- <target name="deploy-to-das" depends="init-common">
+ <target name="deploy-to-das" depends="init-common">
<exec executable="${ASADMIN}" failonerror="false">
<arg line="deploy"/>
<arg line="--user ${admin.user}"/>
@@ -173,7 +173,7 @@
<arg line="--retrieve ${assemble.dir}"/>
<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>
@@ -183,20 +183,20 @@
<target name="run-standalone-client" depends="init-common">
<property name="jndi.name" value="ejb/apiDeployment"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<!--
- <property name="ctxfactory"
- value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
+ <property name="ctxfactory"
+ value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
-->
- <echo message="provider.url used is ${provider.url}"/>
+ <echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
- <jvmarg value="-Dj2eelogin.name=${test.user}"/>
- <jvmarg value="-Dj2eelogin.password=${test.passwd}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <jvmarg value="-Dj2eelogin.name=${test.user}"/>
+ <jvmarg value="-Dj2eelogin.password=${test.passwd}"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
@@ -212,7 +212,7 @@
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant create-resources Create all destinations and connection factories
ant delete-resources Delete all destinations and connection factories
</echo>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/client/Client.java
index 7cea5de..7258bcd 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/client/Client.java
@@ -33,8 +33,8 @@
public static String kTestNotRun = "TEST NOT RUN";
public static String kTestPassed = "TEST PASSED";
public static String kTestFailed = "TEST FAILED";
-
- private static SimpleReporterAdapter stat =
+
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
@@ -47,7 +47,7 @@
stat.addStatus("client initSFSB-- wrong number of arguments", stat.FAIL);
System.out.println("Usage: SyncClientTest provider-url ctxFactory jndi-name <instanceName:string> <get|put> <source:string> <destination dir/file:string>");
return;
- }
+ }
if ( !args[4].equals("get") && !args[4].equals("put") ) {
stat.addStatus( "client initSFSB-- command can be either put or get. Please retry", stat.FAIL);
@@ -60,11 +60,11 @@
client.doTest(args);
System.out.println("[deploymentClient] DONE doTest()...");
stat.printSummary("synchronization");
- }
-
+ }
+
public Client (String[] args) {
}
-
+
public void doTest(String[] args) {
initSFSB(args);
@@ -77,7 +77,7 @@
try {
Context ic = null;
Object objref = null;
- if ((args[0] == null) || (args[1] == null)) {
+ if ((args[0] == null) || (args[1] == null)) {
ic = new InitialContext();
objref = ic.lookup("java:comp/env/ejb/apiDeployment");
} else {
@@ -114,16 +114,16 @@
}
if ( r) {
- System.out.println( args[4] + " of " + args[5] +
+ System.out.println( args[4] + " of " + args[5] +
" to " + args[6] + " passed.");
stat.addStatus("Synchronization of application bits", stat.PASS);
}
else {
- System.out.println( args[4] + " of " + args[5] +
+ System.out.println( args[4] + " of " + args[5] +
" to " + args[6] + " failed.");
stat.addStatus("Synchronization of applications bits", stat.FAIL);
}
-
+
} catch (Exception ex) {
stat.addStatus("ejbclient accessSFSB", stat.FAIL);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/Synchronization.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/Synchronization.java
index 173435b..9259511 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/Synchronization.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/Synchronization.java
@@ -26,14 +26,14 @@
extends EJBObject
{
- public boolean getFile(String instanceName, String sourceFile,
- String destLoc) throws RemoteException;
+ public boolean getFile(String instanceName, String sourceFile,
+ String destLoc) throws RemoteException;
- public boolean get(String instanceName, String name, String type,
- String destLoc) throws RemoteException;
+ public boolean get(String instanceName, String name, String type,
+ String destLoc) throws RemoteException;
- public boolean putFile(String instanceName, String sourceFile,
- String destDir) throws RemoteException;
+ public boolean putFile(String instanceName, String sourceFile,
+ String destDir) throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/SynchronizationEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/SynchronizationEJB.java
index 4435192..854c7e8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/SynchronizationEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/SynchronizationEJB.java
@@ -35,16 +35,16 @@
import com.sun.enterprise.config.ConfigContext;
public class SynchronizationEJB
- implements SessionBean
+ implements SessionBean
{
- private SessionContext context;
+ private SessionContext context;
private Context initialCtx;
- public void ejbCreate() {
+ public void ejbCreate() {
}
- public boolean getFile(String instanceName, String sourceFile,
- String destLoc) {
+ public boolean getFile(String instanceName, String sourceFile,
+ String destLoc) {
try {
ConfigContext ctx = ApplicationServer.getServerContext().
getConfigContext();
@@ -59,7 +59,7 @@
}
}
- public boolean get(String instanceName, String name, String type,
+ public boolean get(String instanceName, String name, String type,
String destLoc) {
try {
ConfigContext ctx = ApplicationServer.getServerContext().
@@ -67,7 +67,7 @@
ApplicationsMgr appSynchMgr = SynchronizationFactory.
createSynchronizationContext(ctx).getApplicationsMgr();
- if (type == null) {
+ if (type == null) {
return false;
}
@@ -108,10 +108,10 @@
}
}
- public boolean putFile(String instanceName, String sourceFile,
- String destDir) {
+ public boolean putFile(String instanceName, String sourceFile,
+ String destDir) {
try {
- SynchronizationClient sc =
+ SynchronizationClient sc =
SynchronizationFactory.createSynchronizationClient( instanceName);
sc.connect();
String s = sc.put(sourceFile, destDir);
@@ -124,22 +124,22 @@
}
}
- public void setSessionContext(SessionContext sc) {
- this.context = sc;
+ public void setSessionContext(SessionContext sc) {
+ this.context = sc;
try {
this.initialCtx = new InitialContext();
} catch (Throwable th) {
th.printStackTrace();
}
- }
+ }
- public void ejbRemove() {}
+ public void ejbRemove() {}
- public void ejbActivate() {
+ public void ejbActivate() {
System.out.println ("In SFSB.ejbActivate() " );
}
- public void ejbPassivate() {
+ public void ejbPassivate() {
System.out.println ("In SFSB.ejbPassivate() ");
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/SynchronizationHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/SynchronizationHome.java
index 97feae2..2625302 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/SynchronizationHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/deployment/ejb/SynchronizationHome.java
@@ -23,6 +23,6 @@
public interface SynchronizationHome
extends EJBHome
{
- public Synchronization create()
+ public Synchronization create()
throws CreateException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/build.properties
index 5d6355c..1041634 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/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="apiSecurity"/>
<property name="app.type" value="application"/>
@@ -26,7 +26,7 @@
<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="appname" value="apiSecurity"/>
+<property name="appname" value="apiSecurity"/> \u0020
<property name="test.client"
value="com.sun.devtest.admin.synchronization.api.security.client.RpaClient"/>
<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/build.xml
index ab07acd..6db11c3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/build.xml
@@ -37,7 +37,7 @@
&testProperties;
&localTestProperties;
&commonSecurity;
-
+
<target name="all" depends="build, setup, deploy,run, undeploy, unsetup"/>
<target name="setup"/>
@@ -133,7 +133,7 @@
</antcall>
</target>
- <target name="deploy-to-cluster" depends="init-common" if="ee">
+ <target name="deploy-to-cluster" depends="init-common" if="ee">
<echo message="So you are using Enterprise Version eh ?"/>
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
@@ -149,7 +149,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"/>
<antcall target="stop-default-cluster-common"/>
<antcall target="start-default-cluster-common"/>
@@ -159,18 +159,18 @@
<target name="run-standalone-client" depends="init-common">
<property name="jndi.name" value="ejb/apiSecurity"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<exec executable="${APPCLIENT}">
<arg value="-client" />
<arg value="${assemble.dir}/${appname}AppClient.jar"/>
- <arg value="-xml"/>
- <arg value="sun-acc-1.xml"/>
- <arg value="-textauth"/>
- <arg value="-user"/>
- <arg value="${test.user}"/>
- <arg value="-password"/>
- <arg value="${test.passwd}"/>
+ <arg value="-xml"/>
+ <arg value="sun-acc-1.xml"/>
+ <arg value="-textauth"/>
+ <arg value="-user"/>
+ <arg value="${test.user}"/>
+ <arg value="-password"/>
+ <arg value="${test.passwd}"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
@@ -180,18 +180,18 @@
<target name="run-standalone-client-file" depends="init-common">
<property name="jndi.name" value="ejb/apiSecurity"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<exec executable="${APPCLIENT}">
<arg value="-client" />
<arg value="${assemble.dir}/${appname}AppClient.jar"/>
- <arg value="-xml"/>
- <arg value="sun-acc-1.xml"/>
- <arg value="-textauth"/>
- <arg value="-user"/>
- <arg value="${test.user}"/>
- <arg value="-passwordfile"/>
- <arg value="${test.passwd}"/>
+ <arg value="-xml"/>
+ <arg value="sun-acc-1.xml"/>
+ <arg value="-textauth"/>
+ <arg value="-user"/>
+ <arg value="${test.user}"/>
+ <arg value="-passwordfile"/>
+ <arg value="${test.passwd}"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
@@ -204,21 +204,21 @@
<target name="run-standalone-client-temp" depends="init-common">
<property name="jndi.name" value="ejb/apiSecurity"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<!--
- <property name="ctxfactory"
- value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
+ <property name="ctxfactory"
+ value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
-->
- <echo message="provider.url used is ${provider.url}"/>
+ <echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
- <jvmarg value="-Xlint:unchecked"/>
- <!--jvmarg value="-Dj2eelogin.name=${test.user}"/>
- <jvmarg value="-Dj2eelogin.password=${test.passwd}"/-->
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <jvmarg value="-Xlint:unchecked"/>
+ <!--jvmarg value="-Dj2eelogin.name=${test.user}"/>
+ <jvmarg value="-Dj2eelogin.password=${test.passwd}"/-->
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/client/RpaClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/client/RpaClient.java
index 69b8fc7..1841f6e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/client/RpaClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/client/RpaClient.java
@@ -32,8 +32,8 @@
public static String kTestNotRun = "TEST NOT RUN";
public static String kTestPassed = "TEST PASSED";
public static String kTestFailed = "TEST FAILED";
-
- //private static SimpleReporterAdapter stat =
+
+ //private static SimpleReporterAdapter stat =
// new SimpleReporterAdapter("appserv-tests");
@@ -46,18 +46,18 @@
//stat.addStatus("client initSFSB-- wrong number of arguments", stat.FAIL);
System.out.println("Usage: SyncClientTest provider-url ctxFactory jndi-name");
return;
- }
+ }
RpaClient client = new RpaClient(args);
System.out.println("[apiClient] doTest()...");
client.doTest(args);
System.out.println("[apiClient] DONE doTest()...");
//stat.printSummary("synchronization");
- }
-
+ }
+
public RpaClient (String[] args) {
}
-
+
public void doTest(String[] args) {
initSFSB(args);
@@ -70,7 +70,7 @@
try {
Context ic = null;
Object objref = null;
- if ((args[0] == null) || (args[1] == null)) {
+ if ((args[0] == null) || (args[1] == null)) {
ic = new InitialContext();
System.out.println("[apiClient] Lookingup Bean apiClient ");
objref = ic.lookup("java:comp/env/ejb/apiSecurity");
@@ -98,11 +98,11 @@
}
public void testSynch(String[] args) {
- // invoke 3 overloaded methods on the EJB
+ // invoke 3 overloaded methods on the EJB
try{
- System.out.println ("Calling authorized method - addItem");
- hr.addItem("lipstick", 30);
- hr.addItem("mascara", 40);
+ System.out.println ("Calling authorized method - addItem");
+ hr.addItem("lipstick", 30);
+ hr.addItem("mascara", 40);
hr.addItem("lipstick2", 50);
hr.addItem("sandals", 200);
System.out.println(hr.getTotalCost());
@@ -118,9 +118,9 @@
} catch(Exception re){
re.printStackTrace();
- System.out.println("RealmPerApp:RpaLoginBean Test Failed");
+ System.out.println("RealmPerApp:RpaLoginBean Test Failed");
System.exit(-1);
- }
+ }
System.out.println("RealmPerApp:RpaLoginBean Test Passed");
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaBean.java
index ecbb0ba..03edd82 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaBean.java
@@ -36,26 +36,26 @@
*/
public class RpaBean implements SessionBean {
-
+
private String shopper = "anonymous";
private String principal = "harpreet";
private int totalPrice = 0;
-
+
private int totalItems = 0;
-
+
private Vector items;
-
+
private Vector itemPrice;
-
+
private SessionContext sc = null;
-
+
/** Creates a new instance of ShoppingEJB */
public void ejbCreate(String shopperName) {
shopper = shopperName;
items = new Vector();
itemPrice = new Vector();
}
-
+
public void addItem(java.lang.String item, int price) throws EJBException,
RemoteException{
checkCallerPrincipal();
@@ -67,26 +67,26 @@
+ item +" for price ="+ price +" .Total Items = "+totalItems +
" .TotalPrice = " + totalPrice);
}
-
- public void deleteItem(java.lang.String item) throws EJBException,
+
+ public void deleteItem(java.lang.String item) throws EJBException,
RemoteException{
checkCallerPrincipal();
int index = items.indexOf(item);
items.remove(item);
Integer price = (Integer) itemPrice.get(index);
- System.out.println("Shopping Cart: Removing item "+ item +" @price "+
+ System.out.println("Shopping Cart: Removing item "+ item +" @price "+
price.intValue());
totalPrice -= price.shortValue();
- itemPrice.remove(index);
+ itemPrice.remove(index);
System.out.println(" Shopping Cart: Shopper "+ shopper +" .Total Items = "+totalItems +
" .TotalPrice = " + totalPrice);
}
-
+
public double getTotalCost() throws EJBException{
checkCallerPrincipal();
return totalPrice;
}
-
+
public String[] getItems() throws EJBException{
checkCallerPrincipal();
@@ -98,26 +98,26 @@
}
return itemNames;
}
-
+
public void ejbActivate() {
System.out.println("In Rpa ejbActivate");
}
-
-
+
+
public void ejbPassivate() {
System.out.println("In Rpa ejbPassivate");
}
-
-
+
+
public void ejbRemove() {
System.out.println("In Rpa ejbRemove");
}
-
-
+
+
public void setSessionContext(jakarta.ejb.SessionContext sessionContext) {
sc = sessionContext;
}
-
+
private void checkCallerPrincipal() throws EJBException {
System.out.println("Caller Princial = " + sc.getCallerPrincipal() +
" comparing against " + principal);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaHome.java
index 3dbcf57..ca6a194 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaHome.java
@@ -27,8 +27,8 @@
* @author Harpreet Singh
*/
public interface RpaHome extends EJBHome{
-
- public RpaRemote create(java.lang.String shopperName)
+
+ public RpaRemote create(java.lang.String shopperName)
throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaRemote.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaRemote.java
index 12bf795..72fe030 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaRemote.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/shopping/RpaRemote.java
@@ -23,17 +23,17 @@
package com.sun.devtest.admin.synchronization.api.security.shopping;
import jakarta.ejb.EJBObject;
/**
- * Shopping Cart Stateful Session Bean. Just tests -Dj2eelogin.name
+ * Shopping Cart Stateful Session Bean. Just tests -Dj2eelogin.name
* -Dj2eelogin.password system properties.
* @author hsingh
*/
public interface RpaRemote extends EJBObject {
-
+
public void addItem(java.lang.String item, int price) throws java.rmi.RemoteException;
-
+
public void deleteItem(java.lang.String item) throws java.rmi.RemoteException;
-
+
public double getTotalCost() throws java.rmi.RemoteException;
-
+
public java.lang.String[] getItems() throws java.rmi.RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/sun-acc-1.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/sun-acc-1.xml
index de31417..6a032cf 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/sun-acc-1.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/sun-acc-1.xml
@@ -18,8 +18,8 @@
-->
<!--
- Please remember to customize this file for your environment. The defaults for
- following fields may not be appropriate.
+ Please remember to customize this file for your environment. The defaults for
+ following fields may not be appropriate.
- target-server name, address and port
- Property security.config in message-security-config
-->
@@ -30,11 +30,11 @@
<target-server name="localhost" address="localhost" port="33700"/>
<log-service file="" level="WARNING"/>
<message-security-config auth-layer="SOAP">
- <!-- turned off by default -->
- <provider-config class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-id="ClientProvider" provider-type="client">
- <request-policy auth-source="content"/>
- <response-policy auth-source="content"/>
- <property name="security.config" value="wss-client-config.xml"/>
+ <!-- turned off by default -->
+ <provider-config class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-id="ClientProvider" provider-type="client">
+ <request-policy auth-source="content"/>
+ <response-policy auth-source="content"/>
+ <property name="security.config" value="wss-client-config.xml"/>
</provider-config>
</message-security-config>
</client-container>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/wss-client-config.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/wss-client-config.xml
index af946be..683fec0 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/wss-client-config.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/api/security/wss-client-config.xml
@@ -16,19 +16,19 @@
-->
-<xwss:SecurityConfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config"
- dumpMessages="false">
+<xwss:SecurityConfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config"
+ dumpMessages="false">
<xwss:Timestamp/>
- <xwss:RequireUsernameToken nonceRequired="false" passwordDigestRequired="false"/>
+ <xwss:RequireUsernameToken nonceRequired="false" passwordDigestRequired="false"/>
<xwss:RequireEncryption>
<xwss:Target type="qname">{http://schemas.xmlsoap.org/soap/envelope/}Body</xwss:Target>
</xwss:RequireEncryption>
<xwss:RequireSignature>
<xwss:Target type="qname">{http://schemas.xmlsoap.org/soap/envelope/}Body</xwss:Target>
- </xwss:RequireSignature>
+ </xwss:RequireSignature>
<xwss:Encrypt>
<xwss:X509Token certificateAlias="s1as"/>
- </xwss:Encrypt>
+ </xwss:Encrypt>
<xwss:Sign>
<xwss:X509Token certificateAlias="s1as"/>
</xwss:Sign>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/build.properties
index 74fad6a..55e10dc 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/build.properties
@@ -15,7 +15,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="cluster.name" value="ee-synchronization-cluster"/>
<property name="nodeagent.name" value="ee-synchronization-agent"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/build.properties
index a9bf4da..628c861 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/build.properties
@@ -15,30 +15,30 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="ee" value="enterprise edition"/>
<property name="module" value="synchronization-cleaner"/>
-<property name="appname" value="${module}-application"/>
+<property name="appname" value="${module}-application"/> \u0020
-<property name="assemble"
- value="${build.classes.dir}/archive"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
-<property name="appclient.jar"
- value="${assemble.dir}/${appname}-client.jar"/>
+<property name="assemble"\u0020
+ value="${build.classes.dir}/archive"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
+<property name="appclient.jar"\u0020
+ value="${assemble.dir}/${appname}-client.jar"/> \u0020
-<property name="test.client"
- value="com.sun.devtest.admin.notification.lookup.client.LookupClient"/>
+<property name="test.client"\u0020
+ value="com.sun.devtest.admin.notification.lookup.client.LookupClient"/>
<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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.xml"/>
<property name="app.type" value="application"/>
<property name="client.jar.location" value="${admin.domain.dir}/${admin.domain}/applications/j2ee-apps/${appname}Client.jar"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/build.xml
index e593946..0fc5322 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/build.xml
@@ -57,7 +57,7 @@
<target name="setup"/>
<target name="unsetup"/>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -69,8 +69,8 @@
<target name="build" depends="compile">
<antcall target="build-ear-common"/>
- </target>
-
+ </target>
+
<target name="deploy" depends="init-common">
<antcall target="deploy-ee">
<param name="appserver.instance.name" value="ee-synchronization-cluster"/>
@@ -86,7 +86,7 @@
</antcall>
<antcall target="remove-cleaner-cookie"/>
<antcall target="restart-cluster"/>
- </target>
+ </target>
<target name="copy-client-jar" depends="init-common">
<copy file="${admin.domain.dir}/${admin.domain}/applications/j2ee-apps/${appname}App/${appname}AppClient.jar" todir="${assemble.dir}" failonerror="false"/>
@@ -105,7 +105,7 @@
</antcall>
</target>
- <target name="deploy-ee" depends="init-common" if="ee">
+ <target name="deploy-ee" depends="init-common" if="ee">
<echo message="Deploy ${appname}App.ear to ${appserver.instance.name}"/>
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
@@ -123,26 +123,26 @@
</exec>
<echo message="Deployment on target server ${appserver.instance.name} successful"/>
</target>
-
+
<!-- =============================================== -->
<!-- Target to run the standalone client without ACC -->
<!-- =============================================== -->
<target name="run-standalone-client" depends="init-common">
<property name="jndi.name" value="lookupbean"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<!--
- <property name="ctxfactory"
- value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
+ <property name="ctxfactory"
+ value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
-->
- <echo message="provider.url used is ${provider.url}"/>
+ <echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
- <jvmarg value="-DtestId=${test.id}"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <jvmarg value="-DtestId=${test.id}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
@@ -197,19 +197,19 @@
</path>
<target name="compile-test" depends="init-common"
- description="Compile test sources">
+ description="Compile test sources">
<echo message="JUnit Jar ${junit.jar}" />
-
- <javac srcdir="${testsrc.dir}"
+
+ <javac srcdir="${testsrc.dir}"
destdir="${build.classes.dir}"
- debug="${javac.debug}"
+ debug="${javac.debug}"
optimize="${javac.optimize}"
deprecation="${javac.deprecation}"
failonerror="true">
<classpath>
<path refid="test.classpath"/>
</classpath>
- <include name="**/*.java"/>
+ <include name="**/*.java"/>
</javac>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/client/LookupClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/client/LookupClient.java
index 289e978..882aa20 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/client/LookupClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/client/LookupClient.java
@@ -26,12 +26,12 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
/**
- * A simple java client. This uses the services provided by the
+ * A simple java client. This uses the services provided by the
* <code>LookupBean</code>.
*/
public class LookupClient {
- private SimpleReporterAdapter stat =
+ private SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
LookupClient() {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/application.xml
index a69ef90..3148dec 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/descriptor/application.xml
@@ -23,7 +23,7 @@
<small-icon></small-icon>
<large-icon></large-icon>
</icon>
- <display-name>synchronization-cleaner-applicationApp</display-name>
+ <display-name>synchronization-cleaner-applicationApp</display-name>
<module>
<java>synchronization-cleaner-application-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/ejb/LookupBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/ejb/LookupBean.java
index 818365f..9229af5 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/ejb/LookupBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/ejb/LookupBean.java
@@ -27,7 +27,7 @@
/**
*/
public class LookupBean implements SessionBean {
-
+
SessionContext sessionContext_;
BigDecimal yenRate = new BigDecimal("121.6000");
@@ -88,7 +88,7 @@
* Loads the state of the bean from secondary storage. Required by EJB spec.
*/
public void ejbActivate() {}
-
+
/**
* Keeps the state of the bean to secondary storage. Required by EJB spec.
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/testsrc/SynchronizationCleanerTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/testsrc/SynchronizationCleanerTest.java
index c26962e..ba34dd2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/testsrc/SynchronizationCleanerTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/ee/admin/synchronization/cleaner/application/testsrc/SynchronizationCleanerTest.java
@@ -27,9 +27,9 @@
* @author Nazrul Islam
*/
public class SynchronizationCleanerTest extends TestCase {
-
+
public SynchronizationCleanerTest(String name) {
- super(name);
+ super(name);
}
protected void setUp() {
@@ -68,15 +68,15 @@
fail(ex.toString());
}
}
-
+
/*
public static TestSuite suite() {
//To run all tests
return new TestSuite(SynchronizationMementoTest.class);
//To run a subset of the tests
TestSuite suite = new TestSuite();
- suite.addTest(new SynchronizationMementoTest("testEmptySync"));
- suite.addTest(new SynchronizationMementoTest("testEmptySync2"));
+ suite.addTest(new SynchronizationMementoTest("testEmptySync"));
+ suite.addTest(new SynchronizationMementoTest("testEmptySync2"));
return suite;
}
public static void main(String args[]) {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/common-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/common-web.xml
index c47d999..60764cc 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/common-web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/common-web.xml
@@ -17,26 +17,26 @@
-->
<!--
- This is the top level build file that should be
- imported into all the leaf level build files
+ This is the top level build file that should be
+ imported into all the leaf level build files
-->
<property name="test.embedded.mode" value="true"/>
<!-- ================================================================ -->
<!-- Targets to clean class files and jars files -->
-<!--
-Variables used:
- ${build.classes.dir}
+<!--
+Variables used:
+ ${build.classes.dir}
${assemble.dir}
-->
<!-- ================================================================ -->
<target name="clean-classes-common" depends="init-common">
- <echo message="common.xml: Cleaning test source files: ${build.base.dir}"
+ <echo message="common.xml: Cleaning test source files: ${build.base.dir}"
level="verbose"/>
<delete dir="${build.base.dir}"/>
</target>
-
+
<target name="clean-jars-common" depends="init-common">
<delete dir="${assemble.dir}"/>
</target>
@@ -48,9 +48,9 @@
<!-- ================================================================ -->
<!-- Target to compile the java source files -->
-<!--
-Variables used:
- ${build.classes.dir}
+<!--
+Variables used:
+ ${build.classes.dir}
${s1astest.classpath}
${src}
-->
@@ -77,7 +77,7 @@
Variables Used:
${war.file}
${build.classes.dir}
- ${appname}
+ ${appname}
${assemble.dir}
${web.xml}
${tlds}
@@ -98,17 +98,17 @@
<target name="publish-war-common" depends="init-common">
<mkdir dir="${build.webapps.dir}"/>
- <copy file="${assemble.dir}/${appname}-web.war"
- tofile="${build.webapps.dir}/${appname}.war"
+ <copy file="${assemble.dir}/${appname}-web.war"
+ tofile="${build.webapps.dir}/${appname}.war"
overwrite="true" />
</target>
<target name="clean-webapps-common" depends="init-common">
- <delete dir="${build.webapps.dir}" quiet="true" />
+ <delete dir="${build.webapps.dir}" quiet="true" />
</target>
<target name="clear">
- <delete file="${war.file}"/>
+ <delete file="${war.file}"/>
</target>
<target name="copy-tlds" if="tlds-exist" depends="clear,test-tlds-exist">
@@ -137,17 +137,17 @@
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/>
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/lib"/>
<mkdir dir="lib"/>
- <copy file="${glassfish-web.xml}"
+ <copy file="${glassfish-web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/glassfish-web.xml" failonerror="false"/>
- <copy file="${sun-web.xml}"
+ <copy file="${sun-web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/sun-web.xml" failonerror="false"/>
- <copy file="${glassfish-ejb-jar.xml}"
+ <copy file="${glassfish-ejb-jar.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/glassfish-ejb-jar.xml" failonerror="false"/>
- <copy file="${sun-ejb-jar.xml}"
+ <copy file="${sun-ejb-jar.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/sun-ejb-jar.xml" failonerror="false"/>
- <copy file="${weblogic.xml}"
+ <copy file="${weblogic.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/weblogic.xml" failonerror="false"/>
- <copy file="${glassfish-resources.xml}"
+ <copy file="${glassfish-resources.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/glassfish-resources.xml" failonerror="false"/>
<copy todir="${build.classes.dir}/tmp/WEB-INF/lib" failonerror="false">
<fileset dir="lib">
@@ -155,32 +155,32 @@
<include name="**/*.zip"/>
</fileset>
</copy>
- <copy file="${webservices.xml}"
+ <copy file="${webservices.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/webservices.xml"
failonerror="false"/>
- <copy file="${mappingfile.location}/${mappingfile.name}"
+ <copy file="${mappingfile.location}/${mappingfile.name}"
tofile="${build.classes.dir}/tmp/${mappingfile.name}"
failonerror="false"/>
- <copy file="${wsdlfile.location}/${wsdlfile.name}"
+ <copy file="${wsdlfile.location}/${wsdlfile.name}"
tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}"
failonerror="false"/>
- <copy file="${tagPlugins.xml}"
+ <copy file="${tagPlugins.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/tagPlugins.xml"
failonerror="false"/>
- <copy file="${web.xml}"
+ <copy file="${web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/web.xml"
failonerror="false"/>
- <copy file="${persistence.xml}"
+ <copy file="${persistence.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/classes/META-INF/persistence.xml"
failonerror="false"/>
- <copy file="${beans.xml}"
+ <copy file="${beans.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/beans.xml"
failonerror="false"/>
<copy file="${context.xml}"
tofile="${build.classes.dir}/tmp/META-INF/context.xml" failonerror="false"/>
<copy file="${cdi-extension.service}"
tofile="${build.classes.dir}/tmp/WEB-INF/classes/META-INF/services/jakarta.enterprise.inject.spi.Extension" failonerror="false"/>
-
+
<copy todir="${build.classes.dir}/tmp/WEB-INF/classes">
<fileset dir="${war.classes}">
<include name="**/*.class"/>
@@ -227,10 +227,10 @@
<include name="WEB-INF/classes/META-INF/services/jakarta.enterprise.inject.spi.Extension"/>
<include name="WEB-INF/classes/META-INF/persistence.xml"/>
</fileset>
- </jar>
+ </jar>
<echo message="created war file ${war.file}" level="verbose"/>
- <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
- <echo message="my webclient war classes are:${webclient.war.classes}"
+ <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
+ <echo message="my webclient war classes are:${webclient.war.classes}"
level="verbose"/>
</target>
@@ -248,35 +248,35 @@
Variables Used:
${ejb.jar}
${build.classes.dir}
- ${ejb-jar.xml}
+ ${ejb-jar.xml}
${beans.xml}
- ${persistence-orm.xml}
- ${sun-ejb-jar.xml}
- ${glassfish-ejb-jar.xml}
- ${sun-cmp-mappings.xml}
- ${metainf.dir}
+ ${persistence-orm.xml}
+ ${sun-ejb-jar.xml}
+ ${glassfish-ejb-jar.xml}
+ ${sun-cmp-mappings.xml}
+ ${metainf.dir}
${ejbjar.files}
${dbschema}
-->
<!-- ================================================================ -->
<target name="package-ejbjar-common">
<delete file="${ejb.jar}"/>
- <echo message="common.xml: Generating ejb-jar inside build directory"
+ <echo message="common.xml: Generating ejb-jar inside build directory"
level="verbose"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
- <copy file="${ejb-jar.xml}"
+ <copy file="${ejb-jar.xml}"
tofile="${build.classes.dir}/META-INF/ejb-jar.xml"
failonerror="false"/>
- <copy file="${persistence-orm.xml}"
+ <copy file="${persistence-orm.xml}"
tofile="${build.classes.dir}/META-INF/persistence-orm.xml"
failonerror="false"/>
- <copy file="${webservices.xml}"
+ <copy file="${webservices.xml}"
tofile="${build.classes.dir}/META-INF/webservices.xml"
failonerror="false"/>
- <copy file="${sun-ejb-jar.xml}"
+ <copy file="${sun-ejb-jar.xml}"
tofile="${build.classes.dir}/META-INF/sun-ejb-jar.xml"
failonerror="false"/>
- <copy file="${glassfish-ejb-jar.xml}"
+ <copy file="${glassfish-ejb-jar.xml}"
tofile="${build.classes.dir}/META-INF/glassfish-ejb-jar.xml"
failonerror="false"/>
<copy file="${glassfish-resources.xml}"
@@ -301,42 +301,42 @@
<include name="sun-cmp-mappings.xml"/>
<include name="beans.xml"/>
</metainf>
- </jar>
+ </jar>
<delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
<delete file="${build.classes.dir}/*.dbschema" failonerror="false"/>
-</target>
+</target>
<!-- ================================================================ -->
<!-- Target to package the appclient application to jar file -->
<!--
Variables Used:
${appclient.jar}
- ${appclientjar.classes}
- ${appclientjar.files}
+ ${appclientjar.classes}
+ ${appclientjar.files}
${build.classes.dir}
- ${application-client.xml}
- ${sun-application-client.xml}
+ ${application-client.xml}
+ ${sun-application-client.xml}
-->
<!-- ================================================================ -->
<target name="package-appclientjar-common">
<delete file="${appclient.jar}"/>
- <echo message="common.xml: Generating appclient-jar inside build directory"
+ <echo message="common.xml: Generating appclient-jar inside build directory"
level="verbose"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
<copy file="${application-client.xml}"
- tofile="${build.classes.dir}/META-INF/application-client.xml"
+ tofile="${build.classes.dir}/META-INF/application-client.xml"
failonerror="false"/>
<copy file="${sun-application-client.xml}" tofile="${build.classes.dir}/META-INF/sun-application-client.xml"
failonerror="false"/>
- <jar jarfile="${appclient.jar}" basedir="${appclientjar.files}"
- update="true" includes ="${appclientjar.classes}"
- manifest="./client/MANIFEST.MF">
+ <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>
-</target>
+ </jar>
+</target>
<!-- ================================================================ -->
<!-- Target to create the ejb application jar file -->
@@ -347,7 +347,7 @@
<param name="ejbjar.files" value="${build.classes.dir}"/>
<param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/>
</antcall>
-</target>
+</target>
<!-- ================================================================ -->
<!-- Target to create the appclient jar file -->
@@ -355,9 +355,9 @@
<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>
@@ -386,22 +386,22 @@
<target name="build-ear-common" depends="fixFiles,package-persistence-common,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"/>
- <copy file="${application.xml}" tofile="${build.classes.dir}/META-INF/application.xml" failonerror="false"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${sun-application.xml}" tofile="${build.classes.dir}/META-INF/sun-application.xml" failonerror="false"/>
+ <copy file="${application.xml}" tofile="${build.classes.dir}/META-INF/application.xml" failonerror="false"/>
<copy file="${glassfish-resources-ear.xml}" tofile="${build.classes.dir}/META-INF/glassfish-resources.xml" failonerror="false" filtering="true"/>
- <jar jarfile="${assemble.dir}/${appname}App.ear">
+ <jar jarfile="${assemble.dir}/${appname}App.ear">
<fileset dir="${assemble.dir}">
<include name="*.jar"/>
<include name="*.war"/>
</fileset>
<fileset dir="${build.classes.dir}">
- <include name="META-INF/sun-application.xml"/>
- <include name="META-INF/application.xml"/>
+ <include name="META-INF/sun-application.xml"/>
+ <include name="META-INF/application.xml"/>
<include name="META-INF/glassfish-resources.xml"/>
</fileset>
<fileset dir="${env.APS_HOME}" includes="lib/reporter.jar"/>
- </jar>
+ </jar>
</target>
@@ -411,21 +411,21 @@
<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"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${sun-application.xml}" tofile="${build.classes.dir}/META-INF/sun-application.xml" failonerror="false"/>
<copy file="${glassfish-resources-ear.xml}" tofile="${build.classes.dir}/META-INF/glassfish-resources.xml" failonerror="false" filtering="true"/>
- <ear earfile="${assemble.dir}/${appname}App.ear"
+ <ear earfile="${assemble.dir}/${appname}App.ear"
appxml="${application.xml}">
<fileset dir="${assemble.dir}">
<include name="*.jar"/>
<include name="*.war"/>
</fileset>
<fileset dir="${build.classes.dir}">
- <include name="META-INF/sun-application.xml"/>
+ <include name="META-INF/sun-application.xml"/>
<include name="META-INF/glassfish-resources.xml"/>
</fileset>
<fileset dir="${env.APS_HOME}" includes="lib/reporter.jar"/>
- </ear>
+ </ear>
</target>
@@ -474,7 +474,7 @@
<!-- Target to execute a batchfile of asadmin commands -->
<!-- ================================================================ -->
<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"/>
<property name="user.password.file" value="asadminuserpassword.txt"/>
<echo file="${user.password.file}" append="false">
@@ -485,11 +485,11 @@
</echo>
<exec executable="${ASADMIN}" failonerror="true">
<arg line="--user ${admin.user} --passwordfile ${user.password.file} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
- <arg line="multimode --file ${asadmin.file}" />
+ <arg line="multimode --file ${asadmin.file}" />
</exec>
<delete file="${user.password.file}" failonerror="false"/>
</target>
-
+
<!-- ================================================================ -->
<!-- ================================================================ -->
@@ -510,7 +510,7 @@
</antcall>
<delete file="${user.password.file}" failonerror="false"/>
</target>
-
+
<!-- ================================================================ -->
<!-- Target to delete the user in file realm the AppServ -->
<!-- ================================================================ -->
@@ -524,7 +524,7 @@
</target>
<!-- ================================================================ -->
-<!-- J2EE Connector related targets -->
+<!-- J2EE Connector related targets -->
<!-- ================================================================ -->
<target name="create-connector-connpool-common"
@@ -611,7 +611,7 @@
<!-- Target to create JDBC connection pool -->
<!-- ================================================================ -->
<target name="create-jdbc-connpool-common" depends="init-common">
-<echo message="created jdbc connection pool ${jdbc.conpool.name}"
+<echo message="created jdbc connection pool ${jdbc.conpool.name}"
level="verbose"/>
<property name="extra-params" value=""/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -627,7 +627,7 @@
</target>
<target name="create-jdbc-driver-connpool-common" depends="init-common">
-<echo message="created jdbc connection pool ${jdbc.conpool.name}"
+<echo message="created jdbc connection pool ${jdbc.conpool.name}"
level="verbose"/>
<property name="extra-params" value=""/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -664,7 +664,7 @@
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command" value="set" />
<param name="operand.props"
- value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
+ value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
</antcall>
</target>
@@ -715,7 +715,7 @@
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command" value="set" />
<param name="operand.props"
- value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
+ value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
</antcall>
</target>
@@ -731,14 +731,14 @@
<arg line="--target ${appserver.instance.name}"/>
<arg line="${jdbc.conpool.name}"/>
</exec>
- <echo message="cmd executed for ${appserver.instance.name}"/>
+ <echo message="cmd executed for ${appserver.instance.name}"/>
</target>
<!-- ================================================================ -->
<!-- Target to create JDBC resource -->
<!-- ================================================================ -->
<target name="create-jdbc-resource-common" depends="init-common">
-<echo message="Creating jdbc resource pool ${jdbc.resource.name}"
+<echo message="Creating jdbc resource pool ${jdbc.resource.name}"
level="verbose"/>
<echo message="asadmin create-jdbc-resource ${as.props} --connectionpoolid ${jdbc.conpool.name} --target ${appserver.instance.name} ${jdbc.resource.name}"/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -790,7 +790,7 @@
<!-- Target to create persistence resource -->
<!-- ================================================================ -->
<target name="create-persistence-resource-common" depends="init-common">
-<echo message="Creating pm resource at ${pm.resource.name}"
+<echo message="Creating pm resource at ${pm.resource.name}"
level="verbose"/>
<echo message="asadmin create-persistence-resource ${as.props} --target ${appserver.instance.name} ${pm.resource.name}"/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -800,7 +800,7 @@
<arg line="--target ${appserver.instance.name}"/>
<arg line="${pm.resource.name}"/>
</exec>
- <echo message="Created ${pm.resource.name} --target ${appserver.instance.name}"/>
+ <echo message="Created ${pm.resource.name} --target ${appserver.instance.name}"/>
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command" value="set"/>
<param name="operand.props"
@@ -819,14 +819,14 @@
<target name="delete-persistence-resource-common" depends="init-common">
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command"
- value="delete-persistence-resource
+ value="delete-persistence-resource
--target ${appserver.instance.name}" />
<param name="operand.props" value="${pm.resource.name}" />
</antcall>
</target>
<target name="execute-sql-common" depends="init-common">
-<echo message="Executing sql statement at ${basedir} from ${sql.file}"
+<echo message="Executing sql statement at ${basedir} from ${sql.file}"
level="verbose"/>
<echo message="${s1astest.classpath}"/>
<sql
@@ -842,7 +842,7 @@
<target name="execute-ejb-sql-common" depends="init-common">
-<echo message="Executing sql statement at ${basedir} from ${sql.file}"
+<echo message="Executing sql statement at ${basedir} from ${sql.file}"
level="verbose"/>
<sql
driver="${db.driver}"
@@ -858,8 +858,8 @@
<!-- ================================================================ -->
<!-- Target to create/delete javamail resources -->
-<!--
- Properties required:
+<!--
+ Properties required:
mailhost
fromaddress
debug
@@ -900,7 +900,7 @@
<!-- Target to create database table through SQL file -->
<!-- ================================================================ -->
<target name="create-sql-common" depends="init-common">
-<echo message="creating tables from ${basedir}/sql/${db.create}"
+<echo message="creating tables from ${basedir}/sql/${db.create}"
level="verbose"/>
<sql
driver="${db.driver}"
@@ -919,7 +919,7 @@
<!-- Target to delete database table through SQL file -->
<!-- ================================================================ -->
<target name="delete-sql-common" depends="init-common">
-<echo message="dropping tables from ${basedir}/sql/${db.drop}"
+<echo message="dropping tables from ${basedir}/sql/${db.drop}"
level="verbose"/>
<sql
driver="${db.driver}"
@@ -938,11 +938,11 @@
<!-- Taget to create JMS Connection -->
<!-- ======================================================= -->
<target name="create-jms-connection-common" depends="init-common">
- <echo message="Creating JMS connection factory with name ${jms.factory.name}"
+ <echo message="Creating JMS connection factory with name ${jms.factory.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
<arg line="create-jms-resource "/>
- <arg line="--restype ${jms.factory.type}"/>
+ <arg line="--restype ${jms.factory.type}"/>
<arg line="${as.props}"/>
<arg line="--target ${appserver.instance.name}"/>
<arg line="${jms.factory.name}" />
@@ -953,23 +953,23 @@
<!-- Taget to delete JMS Connection -->
<!-- ======================================================= -->
<target name="delete-jms-connection-common" depends="init-common">
- <echo message="Delete JMS connection factory with name ${jms.factory.name}"
+ <echo message="Delete JMS connection factory with name ${jms.factory.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
- <arg line="delete-jms-resource "/>
+ <arg line="delete-jms-resource "/>
<arg line="${as.props}"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${jms.factory.name}"/>
</exec>
</target>
<!-- JMS: create/delete Destination Resource Targets -->
<target name="create-jms-resource-common" depends="init-common">
- <echo message="Creating JMS resource with name ${jms.resource.name}"
+ <echo message="Creating JMS resource with name ${jms.resource.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
- <arg line="create-jmsdest --desttype ${dest.type} "/>
+ <arg line="create-jmsdest --desttype ${dest.type} "/>
<arg line="${as.props}"/>
<arg line="${dest.name}"/>
</exec>
@@ -978,24 +978,24 @@
<arg line="create-jms-resource "/>
<arg line="--restype ${jms.resource.type}"/>
<arg line="--property imqDestinationName=${dest.name}"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${as.props}"/>
<arg line="${jms.resource.name}"/>
</exec>
</target>
<target name="delete-jms-resource-common" depends="init-common">
- <echo message="Delete JMS resource with name ${jms.resource.name}"
+ <echo message="Delete JMS resource with name ${jms.resource.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
<arg line="delete-jms-resource "/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${as.props} ${jms.resource.name}"/>
</exec>
<exec executable="${ASADMIN}">
- <arg line="delete-jmsdest --desttype ${dest.type} "/>
+ <arg line="delete-jmsdest --desttype ${dest.type} "/>
<arg line="${as.props} ${dest.name}"/>
</exec>
</target>
@@ -1038,7 +1038,7 @@
<target name="deploy-verify-common" depends="init-common">
<antcall target="deploy-verify-common-pe"/>
<antcall target="deploy-verify-common-ee"/>
-</target>
+</target>
<target name="deploy-verify-common-pe" depends="init-common" unless="ee">
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
@@ -1079,9 +1079,9 @@
<arg line="--precompilejsp=${precompilejsp}"/>
<arg line="--upload true"/>
<arg line="--retrieve ${assemble.dir}"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
</exec>
-</target>
+</target>
<target name="deploy-war-name" depends="init-common">
<echo message="Deploying ${warname} from ${basedir}."
@@ -1124,10 +1124,10 @@
<arg line="deploy"/>
<arg line="${as.props}"/>
<arg line="--upload=true"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${assemble.dir}/${appname}-ejb.jar"/>
</exec>
-</target>
+</target>
<!-- deploy the standalone jar in AppServ -->
<target name="deploy-client-common" depends="init-common">
@@ -1135,11 +1135,11 @@
<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}/${appname}-client.jar"/>
</exec>
-</target>
+</target>
<target name="undeploy-war-name" depends="init-common">
<echo> === Embedded UNDEPLOYING ${warname} === </echo>
@@ -1163,7 +1163,7 @@
<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="${appname}-ejb"/>
</exec>
</target>
@@ -1173,10 +1173,10 @@
<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="${appname}-client"/>
</exec>
-</target>
+</target>
<!-- run appclient in AppServ -->
<target name="runclient-common" depends="init-common">
@@ -1218,11 +1218,11 @@
<arg value="${testsuite.id}"/>
</java>
</target>
-
+
<!-- prepare Pointbase servers -->
<target name="preparePB" depends="init-common">
<echo message="Starting Pointbase servers" level="verbose"/>
- <copy file="${env.APS_HOME}/lib/pointbase.ini"
+ <copy file="${env.APS_HOME}/lib/pointbase.ini"
tofile="${db.dir}/pointbase.ini"/>
<replace file="${db.dir}/pointbase.ini" token="@@@" value="${db.dir}"/>
</target>
@@ -1245,12 +1245,12 @@
<!-- target name="startPB" depends="preparePB">
<parallel>
- <java classname="com.pointbase.net.netServer"
+ <java classname="com.pointbase.net.netServer"
classpath="${db.classpath}" failonerror="false" fork="true">
<arg line="/port:9092"/>
<arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
</java>
- <java classname="com.pointbase.net.netServer"
+ <java classname="com.pointbase.net.netServer"
classpath="${db.classpath}" failonerror="true" fork="true">
<arg line="/port:9093"/>
<arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
@@ -1261,7 +1261,7 @@
<!-- start Derby Database -->
<target name="startDerby">
<condition property="darwin">
- <os name="Mac OS X"/>
+ <os name="Mac OS X"/>
</condition>
<antcall target="startDerbyNonMac"/>
<antcall target="startDerbyMac"/>
@@ -1278,7 +1278,7 @@
classpath="${db.classpath}" fork="true" spawn="true">
<arg line="-h localhost -p ${db.port.2} start"/>
</java>
- </parallel>
+ </parallel>
</target>
<target name="startDerbyMac" depends="init-common" if="darwin">
@@ -1291,7 +1291,7 @@
</java>
<java classname="org.apache.derby.drda.NetworkServerControl"
classpath="${db.classpath}" fork="true" spawn="true">
- <sysproperty key="derby.storage.fileSyncTransactionLog" value="true"/>
+ <sysproperty key="derby.storage.fileSyncTransactionLog" value="true"/>
<arg line="-h localhost -p ${db.port.2} start"/>
</java>
</parallel>
@@ -1319,10 +1319,10 @@
<!-- setup IMQ for RI Build -->
<target name="setup-mq-common" depends="init-common">
- <echo message="Executing Datastore setup for S1MQ. Required only for RI"
+ <echo message="Executing Datastore setup for S1MQ. Required only for RI"
level="verbose"/>
- <echo message="${IMQDBMGR} -javahome ${java.home}
- -b ${admin.domain}_${appserver.instance.name} create all"
+ <echo message="${IMQDBMGR} -javahome ${java.home}
+ -b ${admin.domain}_${appserver.instance.name} create all"
level="verbose"/>
<exec executable="${IMQDBMGR}" failonerror="true">
<arg line="-javahome ${java.home} -b ${admin.domain}_${appserver.instance.name} create all" />
@@ -1383,13 +1383,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>
@@ -1415,13 +1415,13 @@
<target name="restart-instance">
<echo message="Restarting remote server instance,until this gets fixed"/>
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="stop-instance"/>
<arg line="${as.props}"/>
<arg line="${appserver.instance.name}"/>
</exec>
<sleep seconds="30"/>
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="start-instance"/>
<arg line="${as.props}"/>
<arg line="${appserver.instance.name}"/>
@@ -1444,7 +1444,7 @@
</target>
<target name="setupTimer" depends="init-common" if="ee">
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="create-resource-ref"/>
<arg line="${as.props}"/>
<arg line="--target server"/>
@@ -1471,13 +1471,13 @@
</target>
<target name="unsetupTimer" depends="init-common" if="ee">
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="delete-resource-ref"/>
<arg line="${as.props}"/>
<arg line="--target server"/>
<arg line="${jdbc.resource.name}"/>
</exec>
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="unset"/>
<arg line="${appserver.instance.name}-config.ejb-container.ejb-timer-service.timer-datasource"/>
</exec>
@@ -1622,7 +1622,7 @@
<!-- Target to Flush connection pool -->
<!-- ================================================================ -->
<target name="flush-connpool-common" depends="init-common">
-<echo message="Flush connection pool ${jdbc.conpool.name}"
+<echo message="Flush connection pool ${jdbc.conpool.name}"
level="verbose"/>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="flush-connection-pool"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/common.xml b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/common.xml
index cc17a92..8b42228 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/common.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/common.xml
@@ -17,26 +17,26 @@
-->
<!--
- This is the top level build file that should be
- imported into all the leaf level build files
+ This is the top level build file that should be
+ imported into all the leaf level build files
-->
<property name="test.embedded.mode" value="true"/>
<!-- ================================================================ -->
<!-- Targets to clean class files and jars files -->
-<!--
-Variables used:
- ${build.classes.dir}
+<!--
+Variables used:
+ ${build.classes.dir}
${assemble.dir}
-->
<!-- ================================================================ -->
<target name="clean-classes-common" depends="init-common">
- <echo message="common.xml: Cleaning test source files: ${build.base.dir}"
+ <echo message="common.xml: Cleaning test source files: ${build.base.dir}"
level="verbose"/>
<delete dir="${build.base.dir}"/>
</target>
-
+
<target name="clean-jars-common" depends="init-common">
<delete dir="${assemble.dir}"/>
</target>
@@ -48,9 +48,9 @@
<!-- ================================================================ -->
<!-- Target to compile the java source files -->
-<!--
-Variables used:
- ${build.classes.dir}
+<!--
+Variables used:
+ ${build.classes.dir}
${s1astest.classpath}
${src}
-->
@@ -77,7 +77,7 @@
Variables Used:
${war.file}
${build.classes.dir}
- ${appname}
+ ${appname}
${assemble.dir}
${web.xml}
${tlds}
@@ -98,17 +98,17 @@
<target name="publish-war-common" depends="init-common">
<mkdir dir="${build.webapps.dir}"/>
- <copy file="${assemble.dir}/${appname}-web.war"
- tofile="${build.webapps.dir}/${appname}.war"
+ <copy file="${assemble.dir}/${appname}-web.war"
+ tofile="${build.webapps.dir}/${appname}.war"
overwrite="true" />
</target>
<target name="clean-webapps-common" depends="init-common">
- <delete dir="${build.webapps.dir}" quiet="true" />
+ <delete dir="${build.webapps.dir}" quiet="true" />
</target>
<target name="clear">
- <delete file="${war.file}"/>
+ <delete file="${war.file}"/>
</target>
<target name="copy-tlds" if="tlds-exist" depends="clear,test-tlds-exist">
@@ -137,17 +137,17 @@
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/>
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/lib"/>
<mkdir dir="lib"/>
- <copy file="${glassfish-web.xml}"
+ <copy file="${glassfish-web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/glassfish-web.xml" failonerror="false"/>
- <copy file="${sun-web.xml}"
+ <copy file="${sun-web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/sun-web.xml" failonerror="false"/>
- <copy file="${glassfish-ejb-jar.xml}"
+ <copy file="${glassfish-ejb-jar.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/glassfish-ejb-jar.xml" failonerror="false"/>
- <copy file="${sun-ejb-jar.xml}"
+ <copy file="${sun-ejb-jar.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/sun-ejb-jar.xml" failonerror="false"/>
- <copy file="${weblogic.xml}"
+ <copy file="${weblogic.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/weblogic.xml" failonerror="false"/>
- <copy file="${glassfish-resources.xml}"
+ <copy file="${glassfish-resources.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/glassfish-resources.xml" failonerror="false"/>
<copy todir="${build.classes.dir}/tmp/WEB-INF/lib" failonerror="false">
<fileset dir="lib">
@@ -155,32 +155,32 @@
<include name="**/*.zip"/>
</fileset>
</copy>
- <copy file="${webservices.xml}"
+ <copy file="${webservices.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/webservices.xml"
failonerror="false"/>
- <copy file="${mappingfile.location}/${mappingfile.name}"
+ <copy file="${mappingfile.location}/${mappingfile.name}"
tofile="${build.classes.dir}/tmp/${mappingfile.name}"
failonerror="false"/>
- <copy file="${wsdlfile.location}/${wsdlfile.name}"
+ <copy file="${wsdlfile.location}/${wsdlfile.name}"
tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}"
failonerror="false"/>
- <copy file="${tagPlugins.xml}"
+ <copy file="${tagPlugins.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/tagPlugins.xml"
failonerror="false"/>
- <copy file="${web.xml}"
+ <copy file="${web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/web.xml"
failonerror="false"/>
- <copy file="${persistence.xml}"
+ <copy file="${persistence.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/classes/META-INF/persistence.xml"
failonerror="false"/>
- <copy file="${beans.xml}"
+ <copy file="${beans.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/beans.xml"
failonerror="false"/>
<copy file="${context.xml}"
tofile="${build.classes.dir}/tmp/META-INF/context.xml" failonerror="false"/>
<copy file="${cdi-extension.service}"
tofile="${build.classes.dir}/tmp/WEB-INF/classes/META-INF/services/jakarta.enterprise.inject.spi.Extension" failonerror="false"/>
-
+
<copy todir="${build.classes.dir}/tmp/WEB-INF/classes">
<fileset dir="${war.classes}">
<include name="**/*.class"/>
@@ -227,10 +227,10 @@
<include name="WEB-INF/classes/META-INF/services/jakarta.enterprise.inject.spi.Extension"/>
<include name="WEB-INF/classes/META-INF/persistence.xml"/>
</fileset>
- </jar>
+ </jar>
<echo message="created war file ${war.file}" level="verbose"/>
- <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
- <echo message="my webclient war classes are:${webclient.war.classes}"
+ <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
+ <echo message="my webclient war classes are:${webclient.war.classes}"
level="verbose"/>
</target>
@@ -248,35 +248,35 @@
Variables Used:
${ejb.jar}
${build.classes.dir}
- ${ejb-jar.xml}
+ ${ejb-jar.xml}
${beans.xml}
- ${persistence-orm.xml}
- ${sun-ejb-jar.xml}
- ${glassfish-ejb-jar.xml}
- ${sun-cmp-mappings.xml}
- ${metainf.dir}
+ ${persistence-orm.xml}
+ ${sun-ejb-jar.xml}
+ ${glassfish-ejb-jar.xml}
+ ${sun-cmp-mappings.xml}
+ ${metainf.dir}
${ejbjar.files}
${dbschema}
-->
<!-- ================================================================ -->
<target name="package-ejbjar-common">
<delete file="${ejb.jar}"/>
- <echo message="common.xml: Generating ejb-jar inside build directory"
+ <echo message="common.xml: Generating ejb-jar inside build directory"
level="verbose"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
- <copy file="${ejb-jar.xml}"
+ <copy file="${ejb-jar.xml}"
tofile="${build.classes.dir}/META-INF/ejb-jar.xml"
failonerror="false"/>
- <copy file="${persistence-orm.xml}"
+ <copy file="${persistence-orm.xml}"
tofile="${build.classes.dir}/META-INF/persistence-orm.xml"
failonerror="false"/>
- <copy file="${webservices.xml}"
+ <copy file="${webservices.xml}"
tofile="${build.classes.dir}/META-INF/webservices.xml"
failonerror="false"/>
- <copy file="${sun-ejb-jar.xml}"
+ <copy file="${sun-ejb-jar.xml}"
tofile="${build.classes.dir}/META-INF/sun-ejb-jar.xml"
failonerror="false"/>
- <copy file="${glassfish-ejb-jar.xml}"
+ <copy file="${glassfish-ejb-jar.xml}"
tofile="${build.classes.dir}/META-INF/glassfish-ejb-jar.xml"
failonerror="false"/>
<copy file="${glassfish-resources.xml}"
@@ -301,42 +301,42 @@
<include name="sun-cmp-mappings.xml"/>
<include name="beans.xml"/>
</metainf>
- </jar>
+ </jar>
<delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
<delete file="${build.classes.dir}/*.dbschema" failonerror="false"/>
-</target>
+</target>
<!-- ================================================================ -->
<!-- Target to package the appclient application to jar file -->
<!--
Variables Used:
${appclient.jar}
- ${appclientjar.classes}
- ${appclientjar.files}
+ ${appclientjar.classes}
+ ${appclientjar.files}
${build.classes.dir}
- ${application-client.xml}
- ${sun-application-client.xml}
+ ${application-client.xml}
+ ${sun-application-client.xml}
-->
<!-- ================================================================ -->
<target name="package-appclientjar-common">
<delete file="${appclient.jar}"/>
- <echo message="common.xml: Generating appclient-jar inside build directory"
+ <echo message="common.xml: Generating appclient-jar inside build directory"
level="verbose"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
<copy file="${application-client.xml}"
- tofile="${build.classes.dir}/META-INF/application-client.xml"
+ tofile="${build.classes.dir}/META-INF/application-client.xml"
failonerror="false"/>
<copy file="${sun-application-client.xml}" tofile="${build.classes.dir}/META-INF/sun-application-client.xml"
failonerror="false"/>
- <jar jarfile="${appclient.jar}" basedir="${appclientjar.files}"
- update="true" includes ="${appclientjar.classes}"
- manifest="./client/MANIFEST.MF">
+ <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>
-</target>
+ </jar>
+</target>
<!-- ================================================================ -->
<!-- Target to create the ejb application jar file -->
@@ -347,7 +347,7 @@
<param name="ejbjar.files" value="${build.classes.dir}"/>
<param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/>
</antcall>
-</target>
+</target>
<!-- ================================================================ -->
<!-- Target to create the appclient jar file -->
@@ -355,9 +355,9 @@
<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>
@@ -386,22 +386,22 @@
<target name="build-ear-common" depends="fixFiles,package-persistence-common,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"/>
- <copy file="${application.xml}" tofile="${build.classes.dir}/META-INF/application.xml" failonerror="false"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${sun-application.xml}" tofile="${build.classes.dir}/META-INF/sun-application.xml" failonerror="false"/>
+ <copy file="${application.xml}" tofile="${build.classes.dir}/META-INF/application.xml" failonerror="false"/>
<copy file="${glassfish-resources-ear.xml}" tofile="${build.classes.dir}/META-INF/glassfish-resources.xml" failonerror="false" filtering="true"/>
- <jar jarfile="${assemble.dir}/${appname}App.ear">
+ <jar jarfile="${assemble.dir}/${appname}App.ear">
<fileset dir="${assemble.dir}">
<include name="*.jar"/>
<include name="*.war"/>
</fileset>
<fileset dir="${build.classes.dir}">
- <include name="META-INF/sun-application.xml"/>
- <include name="META-INF/application.xml"/>
+ <include name="META-INF/sun-application.xml"/>
+ <include name="META-INF/application.xml"/>
<include name="META-INF/glassfish-resources.xml"/>
</fileset>
<fileset dir="${env.APS_HOME}" includes="lib/reporter.jar"/>
- </jar>
+ </jar>
</target>
@@ -411,21 +411,21 @@
<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"/>
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${sun-application.xml}" tofile="${build.classes.dir}/META-INF/sun-application.xml" failonerror="false"/>
<copy file="${glassfish-resources-ear.xml}" tofile="${build.classes.dir}/META-INF/glassfish-resources.xml" failonerror="false" filtering="true"/>
- <ear earfile="${assemble.dir}/${appname}App.ear"
+ <ear earfile="${assemble.dir}/${appname}App.ear"
appxml="${application.xml}">
<fileset dir="${assemble.dir}">
<include name="*.jar"/>
<include name="*.war"/>
</fileset>
<fileset dir="${build.classes.dir}">
- <include name="META-INF/sun-application.xml"/>
+ <include name="META-INF/sun-application.xml"/>
<include name="META-INF/glassfish-resources.xml"/>
</fileset>
<fileset dir="${env.APS_HOME}" includes="lib/reporter.jar"/>
- </ear>
+ </ear>
</target>
@@ -468,7 +468,7 @@
<!-- Target to execute a batchfile of asadmin commands -->
<!-- ================================================================ -->
<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"/>
<property name="user.password.file" value="asadminuserpassword.txt"/>
<echo file="${user.password.file}" append="false">
@@ -479,11 +479,11 @@
</echo>
<exec executable="${ASADMIN}" failonerror="true">
<arg line="--user ${admin.user} --passwordfile ${user.password.file} --host ${admin.host} --port ${admin.port} --echo=true --terse=true"/>
- <arg line="multimode --file ${asadmin.file}" />
+ <arg line="multimode --file ${asadmin.file}" />
</exec>
<delete file="${user.password.file}" failonerror="false"/>
</target>
-
+
<!-- ================================================================ -->
<!-- ================================================================ -->
@@ -504,7 +504,7 @@
</antcall>
<delete file="${user.password.file}" failonerror="false"/>
</target>
-
+
<!-- ================================================================ -->
<!-- Target to delete the user in file realm the AppServ -->
<!-- ================================================================ -->
@@ -518,7 +518,7 @@
</target>
<!-- ================================================================ -->
-<!-- J2EE Connector related targets -->
+<!-- J2EE Connector related targets -->
<!-- ================================================================ -->
<target name="create-connector-connpool-common"
@@ -605,7 +605,7 @@
<!-- Target to create JDBC connection pool -->
<!-- ================================================================ -->
<target name="create-jdbc-connpool-common" depends="init-common">
-<echo message="created jdbc connection pool ${jdbc.conpool.name}"
+<echo message="created jdbc connection pool ${jdbc.conpool.name}"
level="verbose"/>
<property name="extra-params" value=""/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -621,7 +621,7 @@
</target>
<target name="create-jdbc-driver-connpool-common" depends="init-common">
-<echo message="created jdbc connection pool ${jdbc.conpool.name}"
+<echo message="created jdbc connection pool ${jdbc.conpool.name}"
level="verbose"/>
<property name="extra-params" value=""/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -658,7 +658,7 @@
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command" value="set" />
<param name="operand.props"
- value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
+ value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
</antcall>
</target>
@@ -709,7 +709,7 @@
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command" value="set" />
<param name="operand.props"
- value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
+ value="${resources.dottedname.prefix}.jdbc-connection-pool.${jdbc.conpool.name}.property.URL=${db.url};user=${db.user};password=${db.pwd}"/>
</antcall>
</target>
@@ -725,14 +725,14 @@
<arg line="--target ${appserver.instance.name}"/>
<arg line="${jdbc.conpool.name}"/>
</exec>
- <echo message="cmd executed for ${appserver.instance.name}"/>
+ <echo message="cmd executed for ${appserver.instance.name}"/>
</target>
<!-- ================================================================ -->
<!-- Target to create JDBC resource -->
<!-- ================================================================ -->
<target name="create-jdbc-resource-common" depends="init-common">
-<echo message="Creating jdbc resource pool ${jdbc.resource.name}"
+<echo message="Creating jdbc resource pool ${jdbc.resource.name}"
level="verbose"/>
<echo message="asadmin create-jdbc-resource ${as.props} --connectionpoolid ${jdbc.conpool.name} --target ${appserver.instance.name} ${jdbc.resource.name}"/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -784,7 +784,7 @@
<!-- Target to create persistence resource -->
<!-- ================================================================ -->
<target name="create-persistence-resource-common" depends="init-common">
-<echo message="Creating pm resource at ${pm.resource.name}"
+<echo message="Creating pm resource at ${pm.resource.name}"
level="verbose"/>
<echo message="asadmin create-persistence-resource ${as.props} --target ${appserver.instance.name} ${pm.resource.name}"/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -794,7 +794,7 @@
<arg line="--target ${appserver.instance.name}"/>
<arg line="${pm.resource.name}"/>
</exec>
- <echo message="Created ${pm.resource.name} --target ${appserver.instance.name}"/>
+ <echo message="Created ${pm.resource.name} --target ${appserver.instance.name}"/>
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command" value="set"/>
<param name="operand.props"
@@ -813,14 +813,14 @@
<target name="delete-persistence-resource-common" depends="init-common">
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command"
- value="delete-persistence-resource
+ value="delete-persistence-resource
--target ${appserver.instance.name}" />
<param name="operand.props" value="${pm.resource.name}" />
</antcall>
</target>
<target name="execute-sql-common" depends="init-common">
-<echo message="Executing sql statement at ${basedir} from ${sql.file}"
+<echo message="Executing sql statement at ${basedir} from ${sql.file}"
level="verbose"/>
<echo message="${s1astest.classpath}"/>
<sql
@@ -836,7 +836,7 @@
<target name="execute-ejb-sql-common" depends="init-common">
-<echo message="Executing sql statement at ${basedir} from ${sql.file}"
+<echo message="Executing sql statement at ${basedir} from ${sql.file}"
level="verbose"/>
<sql
driver="${db.driver}"
@@ -852,8 +852,8 @@
<!-- ================================================================ -->
<!-- Target to create/delete javamail resources -->
-<!--
- Properties required:
+<!--
+ Properties required:
mailhost
fromaddress
debug
@@ -894,7 +894,7 @@
<!-- Target to create database table through SQL file -->
<!-- ================================================================ -->
<target name="create-sql-common" depends="init-common">
-<echo message="creating tables from ${basedir}/sql/${db.create}"
+<echo message="creating tables from ${basedir}/sql/${db.create}"
level="verbose"/>
<sql
driver="${db.driver}"
@@ -913,7 +913,7 @@
<!-- Target to delete database table through SQL file -->
<!-- ================================================================ -->
<target name="delete-sql-common" depends="init-common">
-<echo message="dropping tables from ${basedir}/sql/${db.drop}"
+<echo message="dropping tables from ${basedir}/sql/${db.drop}"
level="verbose"/>
<sql
driver="${db.driver}"
@@ -932,11 +932,11 @@
<!-- Taget to create JMS Connection -->
<!-- ======================================================= -->
<target name="create-jms-connection-common" depends="init-common">
- <echo message="Creating JMS connection factory with name ${jms.factory.name}"
+ <echo message="Creating JMS connection factory with name ${jms.factory.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
<arg line="create-jms-resource "/>
- <arg line="--restype ${jms.factory.type}"/>
+ <arg line="--restype ${jms.factory.type}"/>
<arg line="${as.props}"/>
<arg line="--target ${appserver.instance.name}"/>
<arg line="${jms.factory.name}" />
@@ -947,23 +947,23 @@
<!-- Taget to delete JMS Connection -->
<!-- ======================================================= -->
<target name="delete-jms-connection-common" depends="init-common">
- <echo message="Delete JMS connection factory with name ${jms.factory.name}"
+ <echo message="Delete JMS connection factory with name ${jms.factory.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
- <arg line="delete-jms-resource "/>
+ <arg line="delete-jms-resource "/>
<arg line="${as.props}"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${jms.factory.name}"/>
</exec>
</target>
<!-- JMS: create/delete Destination Resource Targets -->
<target name="create-jms-resource-common" depends="init-common">
- <echo message="Creating JMS resource with name ${jms.resource.name}"
+ <echo message="Creating JMS resource with name ${jms.resource.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
- <arg line="create-jmsdest --desttype ${dest.type} "/>
+ <arg line="create-jmsdest --desttype ${dest.type} "/>
<arg line="${as.props}"/>
<arg line="${dest.name}"/>
</exec>
@@ -972,24 +972,24 @@
<arg line="create-jms-resource "/>
<arg line="--restype ${jms.resource.type}"/>
<arg line="--property imqDestinationName=${dest.name}"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${as.props}"/>
<arg line="${jms.resource.name}"/>
</exec>
</target>
<target name="delete-jms-resource-common" depends="init-common">
- <echo message="Delete JMS resource with name ${jms.resource.name}"
+ <echo message="Delete JMS resource with name ${jms.resource.name}"
level="verbose"/>
<exec executable="${ASADMIN}">
<arg line="delete-jms-resource "/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${as.props} ${jms.resource.name}"/>
</exec>
<exec executable="${ASADMIN}">
- <arg line="delete-jmsdest --desttype ${dest.type} "/>
+ <arg line="delete-jmsdest --desttype ${dest.type} "/>
<arg line="${as.props} ${dest.name}"/>
</exec>
</target>
@@ -1032,7 +1032,7 @@
<target name="deploy-verify-common" depends="init-common">
<antcall target="deploy-verify-common-pe"/>
<antcall target="deploy-verify-common-ee"/>
-</target>
+</target>
<target name="deploy-verify-common-pe" depends="init-common" unless="ee">
<property name="deployed.app" value="${assemble.dir}/${appname}App.ear"/>
@@ -1073,9 +1073,9 @@
<arg line="--precompilejsp=${precompilejsp}"/>
<arg line="--upload true"/>
<arg line="--retrieve ${assemble.dir}"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
</exec>
-</target>
+</target>
<target name="deploy-war-name" depends="init-common">
<echo message="Deploying ${warname} from ${basedir}."
@@ -1128,10 +1128,10 @@
<arg line="deploy"/>
<arg line="${as.props}"/>
<arg line="--upload=true"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${assemble.dir}/${appname}-ejb.jar"/>
</exec>
-</target>
+</target>
<!-- deploy the standalone jar in AppServ -->
<target name="deploy-client-common" depends="init-common">
@@ -1139,11 +1139,11 @@
<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}/${appname}-client.jar"/>
</exec>
-</target>
+</target>
<target name="undeploy-war-name" depends="init-common">
<echo> === Embedded UNDEPLOYING ${warname} === </echo>
@@ -1167,7 +1167,7 @@
<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="${appname}-ejb"/>
</exec>
</target>
@@ -1177,10 +1177,10 @@
<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="${appname}-client"/>
</exec>
-</target>
+</target>
<!-- run appclient in AppServ -->
<target name="runclient-common" depends="init-common">
@@ -1222,11 +1222,11 @@
<arg value="${testsuite.id}"/>
</java>
</target>
-
+
<!-- prepare Pointbase servers -->
<target name="preparePB" depends="init-common">
<echo message="Starting Pointbase servers" level="verbose"/>
- <copy file="${env.APS_HOME}/lib/pointbase.ini"
+ <copy file="${env.APS_HOME}/lib/pointbase.ini"
tofile="${db.dir}/pointbase.ini"/>
<replace file="${db.dir}/pointbase.ini" token="@@@" value="${db.dir}"/>
</target>
@@ -1249,12 +1249,12 @@
<!-- target name="startPB" depends="preparePB">
<parallel>
- <java classname="com.pointbase.net.netServer"
+ <java classname="com.pointbase.net.netServer"
classpath="${db.classpath}" failonerror="false" fork="true">
<arg line="/port:9092"/>
<arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
</java>
- <java classname="com.pointbase.net.netServer"
+ <java classname="com.pointbase.net.netServer"
classpath="${db.classpath}" failonerror="true" fork="true">
<arg line="/port:9093"/>
<arg line="/pointbase.ini=${db.dir}/pointbase.ini"/>
@@ -1265,7 +1265,7 @@
<!-- start Derby Database -->
<target name="startDerby">
<condition property="darwin">
- <os name="Mac OS X"/>
+ <os name="Mac OS X"/>
</condition>
<antcall target="startDerbyNonMac"/>
<antcall target="startDerbyMac"/>
@@ -1282,7 +1282,7 @@
classpath="${db.classpath}" fork="true" spawn="true">
<arg line="-h localhost -p ${db.port.2} start"/>
</java>
- </parallel>
+ </parallel>
</target>
<target name="startDerbyMac" depends="init-common" if="darwin">
@@ -1295,7 +1295,7 @@
</java>
<java classname="org.apache.derby.drda.NetworkServerControl"
classpath="${db.classpath}" fork="true" spawn="true">
- <sysproperty key="derby.storage.fileSyncTransactionLog" value="true"/>
+ <sysproperty key="derby.storage.fileSyncTransactionLog" value="true"/>
<arg line="-h localhost -p ${db.port.2} start"/>
</java>
</parallel>
@@ -1323,10 +1323,10 @@
<!-- setup IMQ for RI Build -->
<target name="setup-mq-common" depends="init-common">
- <echo message="Executing Datastore setup for S1MQ. Required only for RI"
+ <echo message="Executing Datastore setup for S1MQ. Required only for RI"
level="verbose"/>
- <echo message="${IMQDBMGR} -javahome ${java.home}
- -b ${admin.domain}_${appserver.instance.name} create all"
+ <echo message="${IMQDBMGR} -javahome ${java.home}
+ -b ${admin.domain}_${appserver.instance.name} create all"
level="verbose"/>
<exec executable="${IMQDBMGR}" failonerror="true">
<arg line="-javahome ${java.home} -b ${admin.domain}_${appserver.instance.name} create all" />
@@ -1387,13 +1387,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>
@@ -1419,13 +1419,13 @@
<target name="restart-instance">
<echo message="Restarting remote server instance,until this gets fixed"/>
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="stop-instance"/>
<arg line="${as.props}"/>
<arg line="${appserver.instance.name}"/>
</exec>
<sleep seconds="30"/>
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="start-instance"/>
<arg line="${as.props}"/>
<arg line="${appserver.instance.name}"/>
@@ -1448,7 +1448,7 @@
</target>
<target name="setupTimer" depends="init-common" if="ee">
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="create-resource-ref"/>
<arg line="${as.props}"/>
<arg line="--target server"/>
@@ -1475,13 +1475,13 @@
</target>
<target name="unsetupTimer" depends="init-common" if="ee">
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="delete-resource-ref"/>
<arg line="${as.props}"/>
<arg line="--target server"/>
<arg line="${jdbc.resource.name}"/>
</exec>
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="unset"/>
<arg line="${appserver.instance.name}-config.ejb-container.ejb-timer-service.timer-datasource"/>
</exec>
@@ -1627,7 +1627,7 @@
<!-- Target to Flush connection pool -->
<!-- ================================================================ -->
<target name="flush-connpool-common" depends="init-common">
-<echo message="Flush connection pool ${jdbc.conpool.name}"
+<echo message="Flush connection pool ${jdbc.conpool.name}"
level="verbose"/>
<exec executable="${ASADMIN}" failonerror="false">
<arg line="flush-connection-pool"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/jaxrpc-hello-web-build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/jaxrpc-hello-web-build.xml
index afffa2a..72cf6c6 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/jaxrpc-hello-web-build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/jaxrpc-hello-web-build.xml
@@ -51,22 +51,22 @@
</path>
<target name="all" depends="clean,deploy,assemble-client,deploy-client,runtest,undeploy"/>
-
+
<target name="create-war" description="Packages the WAR file">
<echo message="Creating the WAR...."/>
<delete file="${assemble.war}/${war.file}" />
<delete dir="${assemble.war}/WEB-INF" />
<copy todir="${assemble.war}/WEB-INF/classes/">
- <fileset dir="${build}/"
- includes="**/*.class"
+ <fileset dir="${build}/"
+ includes="**/*.class"
excludes="**/*Client.class, **/*.wsdl, **/*mapping.xml"/>
</copy>
<copy file="${build}/MyHelloService.wsdl" todir="${assemble.war}/WEB-INF/wsdl" />
<copy file="${build}/mapping.xml" todir="${assemble.war}/${build}/" />
<copy file="sun-web.xml" todir="${assemble.war}/WEB-INF" />
<copy file="webservices.xml" todir="${assemble.war}/WEB-INF" />
- <war destfile="${assemble.war}/${war.file}"
+ <war destfile="${assemble.war}/${war.file}"
webxml="./web.xml" filesonly="true" >
<fileset dir="${assemble.war}" includes="WEB-INF/**, build/**" />
</war>
@@ -79,7 +79,7 @@
<target name="deploy" depends="set-asadmin,build,create-war">
<echo message="Deploying ${war.file} from ${basedir}." level="verbose"/>
- <glassfish-embedded-start />
+ <glassfish-embedded-start />
<glassfish-embedded-deploy app="${war.file}" />
</target>
@@ -87,9 +87,9 @@
<target name="undeploy-war1" depends="init-common">
<echo message="Undeploying ${war.file} from ${basedir}." level="verbose"/>
- <glassfish-embedded-undeploy name="${warname}"/>
+ <glassfish-embedded-undeploy name="${warname}"/>
</target>
-
+
<!-- <target name="build-client" depends="build-static"
description="Executes the targets needed to build a static stub client.">
@@ -120,7 +120,7 @@
<param name="src" value="client"/>
</antcall>
<mkdir dir="${build.classes.dir}/META-INF/wsdl"/>
- <copy file="${assemble.war}/WEB-INF/wsdl/MyHelloService.wsdl" todir="${build.classes.dir}/META-INF/wsdl"/>
+ <copy file="${assemble.war}/WEB-INF/wsdl/MyHelloService.wsdl" todir="${build.classes.dir}/META-INF/wsdl"/>
<unjar src="${env.APS_HOME}/lib/reporter.jar"
dest="${build.classes.dir}"/>
<antcall target="appclient-jar-common">
@@ -164,15 +164,15 @@
<target name="deploy-client" depends="init-common">
<property name="client.war" value="${assemble.dir}/wsclient.war"/>
<echo message="Deploying wsclient.war from ${assemble.dir}." level="verbose"/>
- <glassfish-embedded-deploy app="${client.war}" />
+ <glassfish-embedded-deploy app="${client.war}" />
</target>
<target name="undeploy-client" depends="init-common">
- <glassfish-embedded-undeploy name="wsclient" />
+ <glassfish-embedded-undeploy name="wsclient" />
</target>
<target name="undeploy" depends="undeploy-war1,undeploy-client"/>
-
+
<target name="runtest" depends="init-common">
<mkdir dir="${build.classes.dir}/client"/>
<javac srcdir="." destdir="${build.classes.dir}/client"
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/properties-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/properties-web.xml
index 1e05bbd..e090286 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/properties-web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/properties-web.xml
@@ -22,10 +22,10 @@
<target name="init-common" depends="setToolProperty, start-server-embedded-with-web-jar">
<!-- Appserver setup properties -->
-<echo message="Loading props from file ${env.APS_HOME}/config.properties"
+<echo message="Loading props from file ${env.APS_HOME}/config.properties"
level="verbose"/>
<property name="pe" value="Platform Edition of S1AS"/>
- <property file="${env.APS_HOME}/config.properties"/>
+ <property file="${env.APS_HOME}/config.properties"/>
<echo message="admin.domain ${admin.domain}" level="verbose"/>
<echo message="admin.user ${admin.user}" level="verbose"/>
<echo message="admin.port ${admin.port}" level="verbose"/>
@@ -70,21 +70,21 @@
<property name="appclient.application.args" value="" />
<!-- Test Harnes properties -->
- <property name="build.base.dir"
+ <property name="build.base.dir"
value="${env.APS_HOME}/build/module"/>
- <property name="build.webapps.dir"
+ <property name="build.webapps.dir"
value="${env.APS_HOME}/build/wars"/>
- <property name="build.classes.dir"
+ <property name="build.classes.dir"
value="${build.base.dir}/classes"/>
- <property name="assemble.dir"
+ <property name="assemble.dir"
value="${build.base.dir}/archive"/>
- <property name="results.dir"
+ <property name="results.dir"
value="${build.base.dir}/results"/>
<property name="s1astest.classpath"
value="${build.classes.dir}:${env.APS_HOME}/lib/reporter.jar:${db.classpath}:${Derby.classpath}"/>
- <property name="ejbjar.classes"
+ <property name="ejbjar.classes"
value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Bean*.class" />
- <property name="appclientjar.classes"
+ <property name="appclientjar.classes"
value="**/*Local*.class,**/*Home*.class,**/*Remote*.class,**/*Client*.class" />
<property name="webclient.war.files"
value="${build.classes.dir}"/>
@@ -117,15 +117,15 @@
<property name="cert.nickname" value="s1as"/>
</target>
-<target name="setToolProperty"
+<target name="setToolProperty"
depends="setOSConditions,setToolWin,setToolUnix">
</target>
<!--
- This was needed to make sure that we can
- differentiate between .exe/.bat for windows and .sh for solaris.
+ This was needed to make sure that we can
+ differentiate between .exe/.bat for windows and .sh for solaris.
-->
-<target name="setOSConditions">
+<target name="setOSConditions">
<condition property="isUnix">
<os family="unix"/>
</condition>
@@ -135,18 +135,18 @@
</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="ASADMIN" value="${env.S1AS_HOME}/bin/asadmin"/>-->
<property name="ASANT" value="${env.S1AS_HOME}/bin/asant.bat"/>
- <property name="CAPTURESCHEMA"
+ <property name="CAPTURESCHEMA"
value="${env.S1AS_HOME}/bin/capture-schema.bat"/>
<property name="CHECKPATCH" value="${env.S1AS_HOME}/bin/checkpatch.bat"/>
<property name="INSTALLPATCH" value="${env.S1AS_HOME}/bin/installpatch.bat"/>
<property name="JSPC" value="${env.S1AS_HOME}/bin/jspc.bat"/>
<property name="LISTPATCH" value="${env.S1AS_HOME}/bin/listpatch.bat"/>
- <property name="PACKAGE-APPCLIENT"
+ <property name="PACKAGE-APPCLIENT"
value="${env.S1AS_HOME}/bin/package-appclient.bat"/>
<property name="VERIFIER" value="${env.S1AS_HOME}/bin/verifier.bat"/>
<property name="RMIC" value="${env.S1AS_HOME}/jdk/bin/rmic.exe"/>
@@ -154,15 +154,15 @@
<property name="WSCOMPILE" value="${env.S1AS_HOME}/bin/wscompile.bat"/>
<property name="WSIMPORT" value="${env.S1AS_HOME}/bin/wsimport.bat"/>
- <property name="pb.start.server"
+ <property name="pb.start.server"
value="${env.S1AS_HOME}/pointbase/server/StartServer.bat"/>
- <property name="pb.start.server1"
+ <property name="pb.start.server1"
value="${env.S1AS_HOME}/pointbase/server/StartServer1.bat"/>
<property name="IMQDBMGR" value="${env.S1AS_HOME}/imq/bin/imqdbmgr.bat"/>
<property name="ld.library.path" location="${env.S1AS_HOME}/lib;${env.S1AS_HOME}/bin"/>
</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="ASANT" value="${env.S1AS_HOME}/bin/asant"/>
@@ -171,23 +171,23 @@
<property name="INSTALLPATCH" value="${env.S1AS_HOME}/bin/installpatch"/>
<property name="JSPC" value="${env.S1AS_HOME}/bin/jspc"/>
<property name="LISTPATCH" value="${env.S1AS_HOME}/bin/listpatch"/>
- <property name="PACKAGE-APPCLIENT"
+ <property name="PACKAGE-APPCLIENT"
value="${env.S1AS_HOME}/bin/package-appclient"/>
<property name="VERIFIER" value="${env.S1AS_HOME}/bin/verifier"/>
<property name="RMIC" value="${env.S1AS_HOME}/jdk/bin/rmic"/>
<property name="TNAMESERV" value="${env.S1AS_HOME}/jdk/bin/tnameserv"/>
<property name="WSCOMPILE" value="${env.S1AS_HOME}/bin/wscompile"/>
<property name="WSIMPORT" value="${env.S1AS_HOME}/bin/wsimport"/>
- <property name="pb.start.server"
+ <property name="pb.start.server"
value="${env.S1AS_HOME}/pointbase/server/StartServer"/>
- <property name="pb.start.server1"
+ <property name="pb.start.server1"
value="${env.S1AS_HOME}/pointbase/server/StartServer1"/>
<property name="IMQDBMGR" value="${env.S1AS_HOME}/imq/bin/imqdbmgr"/>
<property name="ld.library.path" location="${env.S1AS_HOME}/lib:${env.S1AS_HOME}/bin"/>
</target>
<!--
-the fixFiles target removes all ^M charectars from the end of
+the fixFiles target removes all ^M charectars from the end of
lines of MANIFEST.MF files since they are very sensitive to it.
-->
<target name="fixFiles" depends="setOSConditions" >
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/properties.xml b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/properties.xml
index ccb093f..8f4e56e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/properties.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/properties.xml
@@ -22,10 +22,10 @@
<target name="init-common" depends="setToolProperty,start-server-embedded-with-static-shell, start-server-embedded-with-uber-jar">
<!-- Appserver setup properties -->
-<echo message="Loading props from file ${env.APS_HOME}/config.properties"
+<echo message="Loading props from file ${env.APS_HOME}/config.properties"
level="verbose"/>
<property name="pe" value="Platform Edition of S1AS"/>
- <property file="${env.APS_HOME}/config.properties"/>
+ <property file="${env.APS_HOME}/config.properties"/>
<echo message="admin.domain ${admin.domain}" level="verbose"/>
<echo message="admin.user ${admin.user}" level="verbose"/>
<echo message="admin.port ${admin.port}" level="verbose"/>
@@ -70,21 +70,21 @@
<property name="appclient.application.args" value="" />
<!-- Test Harnes properties -->
- <property name="build.base.dir"
+ <property name="build.base.dir"
value="${env.APS_HOME}/build/module"/>
- <property name="build.webapps.dir"
+ <property name="build.webapps.dir"
value="${env.APS_HOME}/build/wars"/>
- <property name="build.classes.dir"
+ <property name="build.classes.dir"
value="${build.base.dir}/classes"/>
- <property name="assemble.dir"
+ <property name="assemble.dir"
value="${build.base.dir}/archive"/>
- <property name="results.dir"
+ <property name="results.dir"
value="${build.base.dir}/results"/>
<property name="s1astest.classpath"
value="${build.classes.dir}:${env.APS_HOME}/lib/reporter.jar:${db.classpath}:${Derby.classpath}"/>
- <property name="ejbjar.classes"
+ <property name="ejbjar.classes"
value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Bean*.class" />
- <property name="appclientjar.classes"
+ <property name="appclientjar.classes"
value="**/*Local*.class,**/*Home*.class,**/*Remote*.class,**/*Client*.class" />
<property name="webclient.war.files"
value="${build.classes.dir}"/>
@@ -117,15 +117,15 @@
<property name="cert.nickname" value="s1as"/>
</target>
-<target name="setToolProperty"
+<target name="setToolProperty"
depends="setOSConditions,setToolWin,setToolUnix">
</target>
<!--
- This was needed to make sure that we can
- differentiate between .exe/.bat for windows and .sh for solaris.
+ This was needed to make sure that we can
+ differentiate between .exe/.bat for windows and .sh for solaris.
-->
-<target name="setOSConditions">
+<target name="setOSConditions">
<condition property="isUnix">
<os family="unix"/>
</condition>
@@ -135,18 +135,18 @@
</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="ASADMIN" value="${env.S1AS_HOME}/bin/asadmin"/>-->
<property name="ASANT" value="${env.S1AS_HOME}/bin/asant.bat"/>
- <property name="CAPTURESCHEMA"
+ <property name="CAPTURESCHEMA"
value="${env.S1AS_HOME}/bin/capture-schema.bat"/>
<property name="CHECKPATCH" value="${env.S1AS_HOME}/bin/checkpatch.bat"/>
<property name="INSTALLPATCH" value="${env.S1AS_HOME}/bin/installpatch.bat"/>
<property name="JSPC" value="${env.S1AS_HOME}/bin/jspc.bat"/>
<property name="LISTPATCH" value="${env.S1AS_HOME}/bin/listpatch.bat"/>
- <property name="PACKAGE-APPCLIENT"
+ <property name="PACKAGE-APPCLIENT"
value="${env.S1AS_HOME}/bin/package-appclient.bat"/>
<property name="VERIFIER" value="${env.S1AS_HOME}/bin/verifier.bat"/>
<property name="RMIC" value="${env.S1AS_HOME}/jdk/bin/rmic.exe"/>
@@ -154,15 +154,15 @@
<property name="WSCOMPILE" value="${env.S1AS_HOME}/bin/wscompile.bat"/>
<property name="WSIMPORT" value="${env.S1AS_HOME}/bin/wsimport.bat"/>
- <property name="pb.start.server"
+ <property name="pb.start.server"
value="${env.S1AS_HOME}/pointbase/server/StartServer.bat"/>
- <property name="pb.start.server1"
+ <property name="pb.start.server1"
value="${env.S1AS_HOME}/pointbase/server/StartServer1.bat"/>
<property name="IMQDBMGR" value="${env.S1AS_HOME}/imq/bin/imqdbmgr.bat"/>
<property name="ld.library.path" location="${env.S1AS_HOME}/lib;${env.S1AS_HOME}/bin"/>
</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="ASANT" value="${env.S1AS_HOME}/bin/asant"/>
@@ -171,23 +171,23 @@
<property name="INSTALLPATCH" value="${env.S1AS_HOME}/bin/installpatch"/>
<property name="JSPC" value="${env.S1AS_HOME}/bin/jspc"/>
<property name="LISTPATCH" value="${env.S1AS_HOME}/bin/listpatch"/>
- <property name="PACKAGE-APPCLIENT"
+ <property name="PACKAGE-APPCLIENT"
value="${env.S1AS_HOME}/bin/package-appclient"/>
<property name="VERIFIER" value="${env.S1AS_HOME}/bin/verifier"/>
<property name="RMIC" value="${env.S1AS_HOME}/jdk/bin/rmic"/>
<property name="TNAMESERV" value="${env.S1AS_HOME}/jdk/bin/tnameserv"/>
<property name="WSCOMPILE" value="${env.S1AS_HOME}/bin/wscompile"/>
<property name="WSIMPORT" value="${env.S1AS_HOME}/bin/wsimport"/>
- <property name="pb.start.server"
+ <property name="pb.start.server"
value="${env.S1AS_HOME}/pointbase/server/StartServer"/>
- <property name="pb.start.server1"
+ <property name="pb.start.server1"
value="${env.S1AS_HOME}/pointbase/server/StartServer1"/>
<property name="IMQDBMGR" value="${env.S1AS_HOME}/imq/bin/imqdbmgr"/>
<property name="ld.library.path" location="${env.S1AS_HOME}/lib:${env.S1AS_HOME}/bin"/>
</target>
<!--
-the fixFiles target removes all ^M charectars from the end of
+the fixFiles target removes all ^M charectars from the end of
lines of MANIFEST.MF files since they are very sensitive to it.
-->
<target name="fixFiles" depends="setOSConditions" >
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/run-web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/run-web.xml
index 3bcb9e2..dab20d3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/run-web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/run-web.xml
@@ -33,10 +33,10 @@
</or>
</waitfor>
<antcall target="${target-to-run}"/>
- <antcall target="report"/>
- <antcall target="mail"/>
+ <antcall target="report"/>
+ <antcall target="mail"/>
<!--
- <antcall target="stopAS"/>
+ <antcall target="stopAS"/>
-->
</sequential>
</parallel>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/run.xml b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/run.xml
index 073df11..c63cb59 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/run.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/config/run.xml
@@ -33,10 +33,10 @@
</or>
</waitfor>
<antcall target="${target-to-run}"/>
- <antcall target="report"/>
- <antcall target="mail"/>
+ <antcall target="report"/>
+ <antcall target="mail"/>
<!--
- <antcall target="stopAS"/>
+ <antcall target="stopAS"/>
-->
</sequential>
</parallel>
@@ -66,10 +66,10 @@
<echo> === EMBEDDED STARTING === </echo>
<glassfish-embedded-start/>
<!--
- <glassfish-embedded-start1>
- instanceRoot="${env.S1AS_HOME}/domains/domain1"
- installRoot="${env.S1AS_HOME}"
- configFile="${env.S1AS_HOME}/domains/domain1/config/domain.xml"/>
+ <glassfish-embedded-start1>
+ instanceRoot="${env.S1AS_HOME}/domains/domain1"
+ installRoot="${env.S1AS_HOME}"
+ configFile="${env.S1AS_HOME}/domains/domain1/config/domain.xml"/>
</glassfish-embedded-start1>
-->
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/build.properties
index 12ef4ba..214c62b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/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="web"/>
-<property name="appname" value="${module}-requestdispatcher"/>
+<property name="appname" value="${module}-requestdispatcher"/> \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="apptype" value="web"/>
+<property name="apptype" value="web"/> \u0020
<property name="web.xml" value="descriptor/web.xml"/>
<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
<property name="contextroot" value="/web-requestdispatcher"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/build.xml
index 404c86c..cfc789f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/build.xml
@@ -44,7 +44,7 @@
<target name="clean" depends="init-common">
<delete dir="*tmp"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="servlet"/>
@@ -52,10 +52,10 @@
</target>
<target name="build" depends="compile">
- <property name="hasWebclient" value="yes"/>
+ <property name="hasWebclient" value="yes"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
- <param name="webclient.war.classes" value="**/*.class"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
</antcall>
<javac
@@ -63,10 +63,10 @@
classpath="${env.APS_HOME}/lib/reporter.jar"
includes="WebTest.java"/>
- </target>
+ </target>
<target name="build-publish-war" depends="build, publish-war-common" />
-
+
<target name="re-deploy" depends="init-common">
<antcall target="deploy-war-common"/>
</target>
@@ -76,7 +76,7 @@
level="verbose"/>
<glassfish-embedded-deploy file="${assemble.dir}/${appname}-web.war" force="${force}" name="${appname}" contextRoot="${contextroot}"/>
</target>
-
+
<target name="run" depends="init-common">
<java classname="WebTest">
<arg value="${http.host}"/>
@@ -90,11 +90,11 @@
</target>
<target name="clobber" depends="init-common">
<antcall target="undeploy-war-common"/>
- </target>
-
+ </target>
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-war-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/descriptor/web.xml
index f9861df..1f84cee 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/descriptor/web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/descriptor/web.xml
@@ -22,37 +22,37 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
-
+
<filter>
<filter-name>FilterTest</filter-name>
<filter-class>test.FilterTest</filter-class>
- </filter>
-
+ </filter>
+
<filter-mapping>
<filter-name>FilterTest</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
- <dispatcher>FORWARD</dispatcher>
- <dispatcher>ERROR</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>ERROR</dispatcher>
</filter-mapping>
-
+
<servlet>
<display-name>ServletTest</display-name>
<servlet-name>ServletTest</servlet-name>
<servlet-class>test.ServletTest</servlet-class>
- </servlet>
+ </servlet>
<servlet>
<display-name>ServletTest2</display-name>
<servlet-name>ServletTest2</servlet-name>
<servlet-class>test.ServletTest2</servlet-class>
- </servlet>
+ </servlet>
<servlet>
<display-name>ServletTest3</display-name>
<servlet-name>ServletTest3</servlet-name>
<servlet-class>test.ServletTest3</servlet-class>
- </servlet>
-
+ </servlet>
+
<servlet-mapping>
<servlet-name>ServletTest</servlet-name>
<url-pattern>/ServletTest</url-pattern>
@@ -65,7 +65,7 @@
<servlet-name>ServletTest3</servlet-name>
<url-pattern>/ServletTest3</url-pattern>
</servlet-mapping>
-
+
<session-config>
<session-timeout>10</session-timeout>
</session-config>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/FilterTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/FilterTest.java
index fcf3624..eec957e 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/FilterTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/FilterTest.java
@@ -19,25 +19,25 @@
import jakarta.servlet.*;
import jakarta.servlet.http.*;
public class FilterTest implements Filter{
-
+
private ServletContext context;
-
+
public void destroy() {
System.out.println("[Filter.destroy]");
- }
-
+ }
+
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws java.io.IOException, jakarta.servlet.ServletException {
System.out.println("[Filter.doFilter]");
-
+
((HttpServletRequest)request).getSession().setAttribute("FILTER", "PASS");
filterChain.doFilter(request, response);
-
- }
-
-
+
+ }
+
+
public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException {
System.out.println("[Filter.init]");
context = filterConfig.getServletContext();
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest.java
index d4a3174..daa8053 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest.java
@@ -46,13 +46,13 @@
public class ServletTest extends HttpServlet implements HttpSessionListener {
private ServletContext context;
-
+
public void init(ServletConfig config) throws ServletException {
super.init(config);
- System.out.println("[Servlet.init]");
+ System.out.println("[Servlet.init]");
context = config.getServletContext();
System.out.println("[Servlet.init] " + context.getMajorVersion());
-
+
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
@@ -60,23 +60,23 @@
doPost(request, response);
}
- public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("[Servlet.doPost]");
-
+
response.setContentType("text/html");
PrintWriter out = response.getWriter();
-
+
request.getSession().setAttribute("FILTER-REQUEST", request.getSession().getAttribute("FILTER"));
- request.getSession().setAttribute("FILTER", "FAIL");
-
+ request.getSession().setAttribute("FILTER", "FAIL");
+
RequestDispatcher rd = context.getRequestDispatcher("/ServletTest2");
- rd.forward(request, response);
+ rd.forward(request, response);
}
public void sessionCreated(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) {
System.out.println("[Servlet.sessionCreated]");
}
-
+
public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) {
System.out.println("[Servlet.sessionDestroyed]");
System.out.println("Attributes: " + httpSessionEvent.getSession().getAttribute("test"));
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest2.java b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest2.java
index db2cb50..00775a6 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest2.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest2.java
@@ -25,10 +25,10 @@
public class ServletTest2 extends HttpServlet implements HttpSessionListener {
private ServletContext context;
-
+
public void init(ServletConfig config) throws ServletException {
super.init(config);
- System.out.println("[Servlet2.init]");
+ System.out.println("[Servlet2.init]");
context = config.getServletContext();
}
@@ -37,23 +37,23 @@
doPost(request, response);
}
- public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("[Servlet2.doPost]");
-
+
response.setContentType("text/html");
PrintWriter out = response.getWriter();
-
+
request.getSession().setAttribute("FILTER-FORWARD",request.getSession().getAttribute("FILTER"));
- request.getSession().setAttribute("FILTER", "FAIL");
-
+ request.getSession().setAttribute("FILTER", "FAIL");
+
RequestDispatcher rd = request.getRequestDispatcher("/ServletTest3");
- rd.include(request, response);
+ rd.include(request, response);
}
-
+
public void sessionCreated(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) {
System.out.println("[Servlet.sessionCreated]");
}
-
+
public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) {
System.out.println("[Servlet.sessionDestroyed]");
System.out.println("Attributes: " + httpSessionEvent.getSession().getAttribute("test"));
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest3.java b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest3.java
index 3e8d25b..e78fec2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest3.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/embedded/standalonewar/servlet/ServletTest3.java
@@ -46,11 +46,11 @@
public class ServletTest3 extends HttpServlet{
private ServletContext context;
-
+
public void init(ServletConfig config) throws ServletException {
super.init(config);
- System.out.println("[Servlet3.init]");
- context = config.getServletContext();
+ System.out.println("[Servlet3.init]");
+ context = config.getServletContext();
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
@@ -58,12 +58,12 @@
doPost(request, response);
}
- public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("[Servlet3.doPost]");
-
+
response.setContentType("text/html");
PrintWriter out = response.getWriter();
-
+
out.println("FILTER-REQUEST:" + request.getSession().getAttribute("FILTER-REQUEST"));
out.println("FILTER-FORWARD:" + request.getSession().getAttribute("FILTER-FORWARD"));
out.println("FILTER-INCLUDE:" + request.getSession().getAttribute("FILTER"));
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/build.xml
index 611a245..f13cc5b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/build.xml
@@ -37,15 +37,15 @@
<target name="all">
- <antcall target="setup"/>
- <antcall target="test-all"/>
- <antcall target="unsetup"/>
+ <antcall target="setup"/>
+ <antcall target="test-all"/>
+ <antcall target="unsetup"/>
<antcall target="report"/>
</target>
<target name="setup">
- <antcall target="start-database"/>
+ <antcall target="start-database"/>
<ant target="startDomain"/>
<ant target="clean-result"/>
@@ -72,7 +72,7 @@
<echo message="Stopping app server instance"/>
<ant target="stopDomain"/>
- <antcall target="stop-database"/>
+ <antcall target="stop-database"/>
<record name="hk2.output" action="stop" />
@@ -80,17 +80,17 @@
<target name="start-database" depends="init-common">
<echo message="Starting database --dbport ${db.port}"/>
- <!-- spawn is added to prevent a hang on Windows -->
- <exec spawn="true" executable="${ASADMIN}" failonerror="false">
+ <!-- spawn is added to prevent a hang on Windows -->
+ <exec spawn="true" executable="${ASADMIN}" failonerror="false">
<arg line="start-database --dbport ${db.port}"/>
- </exec>
+ </exec>
</target>
<target name="stop-database" depends="init-common">
<echo message="Stopping database --dbport ${db.port}"/>
- <exec executable="${ASADMIN}" failonerror="false">
+ <exec executable="${ASADMIN}" failonerror="false">
<arg line="stop-database --dbport ${db.port}"/>
- </exec>
+ </exec>
</target>
<target name="report-result" depends="init-common">
@@ -112,23 +112,23 @@
</target>
<target name="usage">
- <echo>
- Usage:
- ant all (Executes all the ejb tests)
+ <echo>
+ Usage:
+ ant all (Executes all the ejb tests)
ant orb_integration (Executes all ejb-related orb integration tests
- ant allowedmethods (Executes the ejb allowedmethods tests)
- ant bmp (Executes the ejb bmp tests)
- ant ejbc (Executes the ejb ejbc tests)
- ant jms (Executes the ejb jms tests)
- ant mdb (Executes the ejb mdb tests)
- ant stubs (Executes the ejb stubs tests)
- ant timer (Executes the ejb timer tests)
- ant txprop (Executes the ejb txprop tests)
- ant sfsb (Executes the ejb sfsb tests)
- ant stress (Executes the ejb stress tests)
- ant ejb30 (Executes the ejb30 tests)
- ant ejb31 (Executes the ejb31 tests)
- </echo>
+ ant allowedmethods (Executes the ejb allowedmethods tests)
+ ant bmp (Executes the ejb bmp tests)
+ ant ejbc (Executes the ejb ejbc tests)
+ ant jms (Executes the ejb jms tests)
+ ant mdb (Executes the ejb mdb tests)
+ ant stubs (Executes the ejb stubs tests)
+ ant timer (Executes the ejb timer tests)
+ ant txprop (Executes the ejb txprop tests)
+ ant sfsb (Executes the ejb sfsb tests)
+ ant stress (Executes the ejb stress tests)
+ ant ejb30 (Executes the ejb30 tests)
+ ant ejb31 (Executes the ejb31 tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/build.xml
index ad13532..ab44044 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/build.xml
@@ -39,9 +39,9 @@
</target>
<target name="usage">
- <echo>
- Usage:
- ant all (Executes all the hk2-ejb tests)
- </echo>
+ <echo>
+ Usage:
+ ant all (Executes all the hk2-ejb tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/build.properties
index dbdc8c4..4bacc9e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/build.properties
@@ -15,13 +15,13 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="hk2-ejb-isolation"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="app.type" value="application"/>
<property name="application.xml" value="descriptor/application1.xml"/>
<property name="application-client.xml"
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/build.xml
index 76a7773..031139e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/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/one/src/main/java"/>
@@ -46,14 +46,14 @@
<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 name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -61,10 +61,10 @@
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</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/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/client/Client.java
index 1b773b7..acebc21 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/hk2/ejb/isolation/client/Client.java
@@ -27,7 +27,7 @@
import com.oracle.hk2devtest.isolation1.Isolation1;
public class Client {
- private static SimpleReporterAdapter stat =
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
@EJB(lookup="java:app/env/forappclient")
@@ -39,18 +39,18 @@
Client client = new Client(args);
client.doTest();
stat.printSummary("hk2-ejb-isolationID");
- }
-
+ }
+
public Client (String[] args) {
}
-
+
public void doTest() {
try {
Context ic = new InitialContext();
-
+
System.out.println("Looking up ejb ref " + isolation1);
- // create EJB using factory from container
+ // create EJB using factory from container
// Object objref = ic.lookup("java:comp/env/ejb/foo");
stat.addStatus("ejbclient main", stat.PASS);
@@ -59,8 +59,8 @@
e.printStackTrace();
stat.addStatus("ejbclient main" , stat.FAIL);
}
-
- return;
+
+ return;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.properties
index 90a772e..1a5f942 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/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="jaxr"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.xml
index ef58efe..0ee7db8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/build.xml
@@ -33,7 +33,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="jaxr"/>
@@ -45,8 +45,8 @@
<target name="build" depends="compile">
<antcall target="build-ear-common"/>
- </target>
-
+ </target>
+
<target name="deploy" depends="init-common">
<antcall target="asadmin-common-ignore-fail">
<param name="admin.command"
@@ -83,8 +83,8 @@
</target>
<!-- <antcall target="deploy-common">
- <param name="generate.stubs" value="true"/>
- </antcall>
+ <param name="generate.stubs" value="true"/>
+ </antcall>
</target>
-->
<target name="run" depends="init-common">
@@ -99,27 +99,27 @@
<property name="jndi.name" value="jaxrra"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
<!--
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
-->
- <property name="ctxfactory"
- value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
- <echo message="provider.url used is ${provider.url}"/>
+ <property name="ctxfactory"
+ value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
+ <echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
- <jvmarg value="-Djavax.rmi.CORBA.UtilClass=com.sun.corba.ee.impl.javax.rmi.CORBA.Util"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBClass=com.sun.corba.ee.impl.orb.ORBImpl"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.ee.impl.orb.ORBSingleton"/>
+ <jvmarg value="-Djavax.rmi.CORBA.UtilClass=com.sun.corba.ee.impl.javax.rmi.CORBA.Util"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBClass=com.sun.corba.ee.impl.orb.ORBImpl"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.ee.impl.orb.ORBSingleton"/>
</java>
</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/v2-tests/appserv-tests/devtests/jaxr/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/application.xml
index fa9bbc2..56dd371 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/application.xml
@@ -19,11 +19,11 @@
-->
<application>
- <display-name>JaxrraApp</display-name>
+ <display-name>JaxrraApp</display-name>
<module>
- <java>jaxrra-client.jar</java>
+ <java>jaxrra-client.jar</java>
</module>
<module>
- <ejb>jaxrra-ejb.jar</ejb>
+ <ejb>jaxrra-ejb.jar</ejb>
</module>
</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/ejb-jar.xml
index b76a9b3..241b57d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/ejb-jar.xml
@@ -29,44 +29,44 @@
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
- <env-entry-name>JaxrQueryURL</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>http://uddi.ibm.com/testregistry/inquiryapi</env-entry-value>
+ <env-entry-name>JaxrQueryURL</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>http://uddi.ibm.com/testregistry/inquiryapi</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>JaxrPublishURL</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>https://uddi.ibm.com/testregistry/publishapi</env-entry-value>
+ <env-entry-name>JaxrPublishURL</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>https://uddi.ibm.com/testregistry/publishapi</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>JaxrProxyHost</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>http://webcache.sfbay.sun.com</env-entry-value>
+ <env-entry-name>JaxrProxyHost</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>http://webcache.sfbay.sun.com</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>JaxrProxyPort</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>8080</env-entry-value>
+ <env-entry-name>JaxrProxyPort</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>8080</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>username</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>jaxrsqa1a</env-entry-value>
+ <env-entry-name>username</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>jaxrsqa1a</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>password</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>testpass</env-entry-value>
+ <env-entry-name>password</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>testpass</env-entry-value>
</env-entry>
<security-identity>
<use-caller-identity/>
</security-identity>
- <resource-ref>
- <res-ref-name>S1asJaxrFactory</res-ref-name>
- <res-type>javax.xml.registry.ConnectionFactory</res-type>
- <res-auth>Application</res-auth>
- </resource-ref>
+ <resource-ref>
+ <res-ref-name>S1asJaxrFactory</res-ref-name>
+ <res-type>javax.xml.registry.ConnectionFactory</res-type>
+ <res-auth>Application</res-auth>
+ </resource-ref>
</session>
@@ -74,12 +74,12 @@
<assembly-descriptor>
<container-transaction>
<method>
- <ejb-name>MyJaxr</ejb-name>
+ <ejb-name>MyJaxr</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getCompanyInformation</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- </method-params>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/sun-ejb-jar.xml
index fc597cf..42a9a9e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/descriptor/sun-ejb-jar.xml
@@ -25,8 +25,8 @@
<ejb-name>MyJaxr</ejb-name>
<jndi-name>jaxrra</jndi-name>
<resource-ref>
- <res-ref-name>S1asJaxrFactory</res-ref-name>
- <jndi-name>eis/jaxr</jndi-name>
+ <res-ref-name>S1asJaxrFactory</res-ref-name>
+ <jndi-name>eis/jaxr</jndi-name>
</resource-ref>
</ejb>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrBean.java
index d6f3bee..d26662e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrBean.java
@@ -17,7 +17,7 @@
package jaxr;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import jakarta.ejb.SessionBean;
import jakarta.ejb.SessionContext;
import jakarta.ejb.EJBException;
@@ -38,109 +38,109 @@
String username = "jaxrsqa3a";
String password = "testpass";
public JaxrBean(){}
-
- public void ejbCreate() throws RemoteException {
- try{
- System.out.println (" IN EJBCREATE ");
- InitialContext ic = new InitialContext();
-
- String username = "jaxrsqa1a";
- // (String)ic.lookup("java:comp/env/username");
- String password = "testpass";
- // (String)ic.lookup("java:comp/env/password");
- String regurl = "http://uddi.ibm.com/testregistry/inquiryapi";
- //(String)ic.lookup("java:comp/env/JaxrQueryURL");
- String regurlp = "https://uddi.ibm.com/testregistry/publishapi";
- //(String)ic.lookup("java:comp/env/JaxrQueryURL");
- String httpProxyHost = "webcache.sfbay.sun.com";
- //(String)ic.lookup("java:comp/env/JaxrProxyHost");
- String httpProxyPort = "8080";
- //(String)ic.lookup("java:comp/env/JaxrProxyPort");;
- Properties props = new Properties();
- props.setProperty("javax.xml.registry.queryManagerURL", regurl);
- props.setProperty("javax.xml.registry.lifeCycleManagerURL", regurlp);
- props.setProperty("com.sun.xml.registry.https.proxyHost", httpProxyHost);
- props.setProperty("com.sun.xml.registry.http.proxyHost", httpProxyHost);
- props.setProperty("com.sun.xml.registry.https.proxyPort", httpProxyPort);
- props.setProperty("com.sun.xml.registry.http.proxyPort", httpProxyPort);
- cnfct = (javax.xml.registry.ConnectionFactory)ic.lookup("eis/jaxr");
- System.out.println (" Connection Factory = "+cnfct);
- cnfct.setProperties(props);
- } catch(JAXRException e){
- e.printStackTrace();
- throw new RemoteException("Cannot instantiate the factory " ,e);
- } catch(Exception e){
- e.printStackTrace();
- throw new RemoteException("Error in ejbCreate !!!", e);
- }
- System.out.println("In ejbCreate !! - created ConnectionFactory ");
+ public void ejbCreate() throws RemoteException {
+ try{
+ System.out.println (" IN EJBCREATE ");
+ InitialContext ic = new InitialContext();
+
+ String username = "jaxrsqa1a";
+ // (String)ic.lookup("java:comp/env/username");
+ String password = "testpass";
+ // (String)ic.lookup("java:comp/env/password");
+ String regurl = "http://uddi.ibm.com/testregistry/inquiryapi";
+ //(String)ic.lookup("java:comp/env/JaxrQueryURL");
+ String regurlp = "https://uddi.ibm.com/testregistry/publishapi";
+ //(String)ic.lookup("java:comp/env/JaxrQueryURL");
+ String httpProxyHost = "webcache.sfbay.sun.com";
+ //(String)ic.lookup("java:comp/env/JaxrProxyHost");
+ String httpProxyPort = "8080";
+ //(String)ic.lookup("java:comp/env/JaxrProxyPort");;
+ Properties props = new Properties();
+ props.setProperty("javax.xml.registry.queryManagerURL", regurl);
+ props.setProperty("javax.xml.registry.lifeCycleManagerURL", regurlp);
+ props.setProperty("com.sun.xml.registry.https.proxyHost", httpProxyHost);
+ props.setProperty("com.sun.xml.registry.http.proxyHost", httpProxyHost);
+ props.setProperty("com.sun.xml.registry.https.proxyPort", httpProxyPort);
+ props.setProperty("com.sun.xml.registry.http.proxyPort", httpProxyPort);
+
+ cnfct = (javax.xml.registry.ConnectionFactory)ic.lookup("eis/jaxr");
+ System.out.println (" Connection Factory = "+cnfct);
+ cnfct.setProperties(props);
+ } catch(JAXRException e){
+ e.printStackTrace();
+ throw new RemoteException("Cannot instantiate the factory " ,e);
+ } catch(Exception e){
+ e.printStackTrace();
+ throw new RemoteException("Error in ejbCreate !!!", e);
+ }
+ System.out.println("In ejbCreate !! - created ConnectionFactory ");
}
- public String getCompanyInformation(String company) throws EJBException,
- RemoteException{
- if(cnfct == null){
- return "ConnectionFactory was not instantiated. Test Failed";
- }
- if(company == null)
- throw new EJBException("Company name not specified");
- // create a jaxr connection instance
+ public String getCompanyInformation(String company) throws EJBException,
+ RemoteException{
+ if(cnfct == null){
+ return "ConnectionFactory was not instantiated. Test Failed";
+ }
+ if(company == null)
+ throw new EJBException("Company name not specified");
+ // create a jaxr connection instance
try {
- // System.setProperty("org.apache.commons.logging.simplelog.log.com.sun.xml.registry", "trace");
- System.out.println (" Connection factory = "+ cnfct);
- System.out.println (" Getting connection");
- con = cnfct.createConnection();
- if (con == null) {
- System.out.println (" Connection is null");
- throw new EJBException("Connection could not be created");
- }
- System.out.println("Got the connection = "+ con);
- RegistryService rs = con.getRegistryService();
- System.out.println("Got the registry service = "+ rs);
- BusinessQueryManager bqm = rs.getBusinessQueryManager();
- System.out.println (" Business Query Manager = "+bqm);
- ArrayList names = new ArrayList();
- names.add(company);
-
- Collection fqualifiers = new ArrayList();
- fqualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
- System.out.println (" Before findOrganizations ");
- BulkResponse br = bqm.findOrganizations(fqualifiers, names, null,
- null, null, null);
+ // System.setProperty("org.apache.commons.logging.simplelog.log.com.sun.xml.registry", "trace");
+ System.out.println (" Connection factory = "+ cnfct);
+ System.out.println (" Getting connection");
+ con = cnfct.createConnection();
+ if (con == null) {
+ System.out.println (" Connection is null");
+ throw new EJBException("Connection could not be created");
+ }
+ System.out.println("Got the connection = "+ con);
+ RegistryService rs = con.getRegistryService();
+ System.out.println("Got the registry service = "+ rs);
+ BusinessQueryManager bqm = rs.getBusinessQueryManager();
+ System.out.println (" Business Query Manager = "+bqm);
+ ArrayList names = new ArrayList();
+ names.add(company);
- System.out.println (" Bulk Response = "+br);
- if(br.getStatus() == JAXRResponse.STATUS_SUCCESS){
- System.out.println (" Results found for ("+company+")");
- Collection orgs = br.getCollection();
- Iterator rit = orgs.iterator();
- while(rit.hasNext()){
- Organization org = (Organization)rit.next();
- result.append(org.getName().getValue()+"\n");
- System.out.println (" Name = "+org.getName().getValue());
- System.out.println ("Description = "+ org.getDescription().getValue());
- result.append(org.getDescription().getValue()+"\n\n");
- }
-
- } else{
- System.out.println (" Could not query the registry due to the following exceptions :");
- Collection ex = br.getExceptions();
- Iterator it = ex.iterator();
- while(it.hasNext()){
- Exception e = (Exception) it.next();
- System.out.println (e.toString());
- result.append(e.toString());
- }
- }
+ Collection fqualifiers = new ArrayList();
+ fqualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
+ System.out.println (" Before findOrganizations ");
+ BulkResponse br = bqm.findOrganizations(fqualifiers, names, null,
+ null, null, null);
- // publish to the registry...
- BusinessLifeCycleManager blcm = rs.getBusinessLifeCycleManager();
+ System.out.println (" Bulk Response = "+br);
+ if(br.getStatus() == JAXRResponse.STATUS_SUCCESS){
+ System.out.println (" Results found for ("+company+")");
+ Collection orgs = br.getCollection();
+ Iterator rit = orgs.iterator();
+ while(rit.hasNext()){
+ Organization org = (Organization)rit.next();
+ result.append(org.getName().getValue()+"\n");
+ System.out.println (" Name = "+org.getName().getValue());
+ System.out.println ("Description = "+ org.getDescription().getValue());
+ result.append(org.getDescription().getValue()+"\n\n");
+ }
+
+ } else{
+ System.out.println (" Could not query the registry due to the following exceptions :");
+ Collection ex = br.getExceptions();
+ Iterator it = ex.iterator();
+ while(it.hasNext()){
+ Exception e = (Exception) it.next();
+ System.out.println (e.toString());
+ result.append(e.toString());
+ }
+ }
+
+ // publish to the registry...
+ BusinessLifeCycleManager blcm = rs.getBusinessLifeCycleManager();
// Get authorization from the registry
PasswordAuthentication passwdAuth =
new PasswordAuthentication(username,
password.toCharArray());
-
+
Set creds = new HashSet();
creds.add(passwdAuth);
con.setCredentials(creds);
@@ -150,21 +150,21 @@
} catch (Throwable ex) {
ex.printStackTrace();
- System.out.println (" Test Failed");
- result.append("Test Failed");
- throw new java.rmi.RemoteException(ex.toString());
+ System.out.println (" Test Failed");
+ result.append("Test Failed");
+ throw new java.rmi.RemoteException(ex.toString());
}
return result.toString();
}
-
+
public void setSessionContext(SessionContext sc) {
-
+
this.sc = sc;
}
-
+
public void ejbRemove() throws RemoteException {}
-
+
public void ejbActivate() {}
-
+
public void ejbPassivate() {}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrClient.java
index b1dae96..f841681 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/jaxr/JaxrClient.java
@@ -35,7 +35,7 @@
JaxrClient client = new JaxrClient(args);
client.doTest();
}
-
+
public JaxrClient (String[] args) {
if (args.length == 3) {
url = args[0];
@@ -45,10 +45,10 @@
}
public String doTest() {
-
+
String res = "fail";
-
- try {
+
+ try {
Properties env = new Properties();
env.put("java.naming.provider.url", url);
env.put("java.naming.factory.initial", ctxFactory);
@@ -59,37 +59,37 @@
// Create Home object
System.out.println("*****"+jndiName);
java.lang.Object obj = context.lookup(jndiName);
- // create EJB using factory from container
+ // create EJB using factory from container
//java.lang.Object objref = ic.lookup("MyJaxr");
System.out.println("Looked up home!!");
JaxrHome home = (JaxrHome)PortableRemoteObject.narrow(
- obj, JaxrHome.class);
+ obj, JaxrHome.class);
System.out.println("Narrowed home!!");
JaxrRemote hr = home.create();
System.out.println("Got the EJB!!");
// invoke method on the EJB
- System.out.println (" Looking up company information for "+company);
+ System.out.println (" Looking up company information for "+company);
System.out.println(hr.getCompanyInformation(company));
hr.remove();
- } catch(NamingException ne){
+ } catch(NamingException ne){
System.out.println("Caught exception while initializing context.\n");
ne.printStackTrace();
- System.out.println (" Test Failed !");
+ System.out.println (" Test Failed !");
return res;
- } catch(Exception re) {
+ } catch(Exception re) {
re.printStackTrace();
- System.out.println (" Test Failed !");
+ System.out.println (" Test Failed !");
return res;
- }
- res = "pass";
- System.out.println (" Test Passed !");
- return res;
-
}
-
+ res = "pass";
+ System.out.println (" Test Passed !");
+ return res;
+
+ }
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/build.properties
index 4e89d8f..7fb76fc 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/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="jaxr"/>
<property name="app.type" value="application"/>
@@ -31,5 +31,5 @@
<!--<property name="jndi.name" value="MyJaxr"/>
<property name="provider.url" value="iiop://localhost:${orb.port}"/>
<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/> -->
-<property name="rarfile" value="soar-jaxr-ra.rar"/>
-<property name="rarname" value="soar-jaxr-ra"/>
+<property name="rarfile" value="soar-jaxr-ra.rar"/> \u0020
+<property name="rarname" value="soar-jaxr-ra"/> \u0020
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/build.xml
index 99692c8..f76a787 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/build.xml
@@ -33,7 +33,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="jaxr"/>
@@ -45,27 +45,27 @@
<target name="build" depends="compile">
<antcall target="build-ear-common"/>
- </target>
-
+ </target>
+
<target name="setup" depends="init-common">
<antcall target="deploy-rar"/>
- </target>
+ </target>
<target name="unsetup" depends="init-common">
<antcall target="undeploy-rar"/>
- </target>
+ </target>
<target name="deploy-rar" depends="init-common">
<antcall target="deploy-rar-common">
- <param name="rarfile" value="${rarfile}"/>
- </antcall>
- </target>
+ <param name="rarfile" value="${rarfile}"/>
+ </antcall>
+ </target>
<target name="undeploy-rar" depends="init-common">
<antcall target="undeploy-rar-common">
- <param name="undeployrar" value="${rarname}"/>
- </antcall>
- </target>
+ <param name="undeployrar" value="${rarname}"/>
+ </antcall>
+ </target>
<target name="deploy" depends="init-common">
<exec executable="${ASADMIN}" failonerror="false">
@@ -86,8 +86,8 @@
</target>
<!-- <antcall target="deploy-common">
- <param name="generate.stubs" value="true"/>
- </antcall>
+ <param name="generate.stubs" value="true"/>
+ </antcall>
</target>
-->
<target name="run" depends="init-common">
@@ -102,27 +102,27 @@
<property name="jndi.name" value="jaxrra"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
<!--
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
-->
- <property name="ctxfactory"
- value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
- <echo message="provider.url used is ${provider.url}"/>
+ <property name="ctxfactory"
+ value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
+ <echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
- <jvmarg value="-Djavax.rmi.CORBA.UtilClass=com.sun.corba.ee.impl.javax.rmi.CORBA.Util"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBClass=com.sun.corba.ee.impl.orb.ORBImpl"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.ee.impl.orb.ORBSingleton"/>
+ <jvmarg value="-Djavax.rmi.CORBA.UtilClass=com.sun.corba.ee.impl.javax.rmi.CORBA.Util"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBClass=com.sun.corba.ee.impl.orb.ORBImpl"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.ee.impl.orb.ORBSingleton"/>
</java>
</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/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/application.xml
index fa9bbc2..56dd371 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/application.xml
@@ -19,11 +19,11 @@
-->
<application>
- <display-name>JaxrraApp</display-name>
+ <display-name>JaxrraApp</display-name>
<module>
- <java>jaxrra-client.jar</java>
+ <java>jaxrra-client.jar</java>
</module>
<module>
- <ejb>jaxrra-ejb.jar</ejb>
+ <ejb>jaxrra-ejb.jar</ejb>
</module>
</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/ejb-jar.xml
index 792806d..25ad736 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/ejb-jar.xml
@@ -29,56 +29,56 @@
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
- <env-entry-name>JaxrQueryURL</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>http://uddi.ibm.com/testregistry/inquiryapi</env-entry-value>
+ <env-entry-name>JaxrQueryURL</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>http://uddi.ibm.com/testregistry/inquiryapi</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>JaxrPublishURL</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>https://uddi.ibm.com/testregistry/publishapi</env-entry-value>
+ <env-entry-name>JaxrPublishURL</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>https://uddi.ibm.com/testregistry/publishapi</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>JaxrProxyHost</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>http://webcache.sfbay.sun.com</env-entry-value>
+ <env-entry-name>JaxrProxyHost</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>http://webcache.sfbay.sun.com</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>JaxrProxyPort</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>8080</env-entry-value>
+ <env-entry-name>JaxrProxyPort</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>8080</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>username</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>jaxrsqa1a</env-entry-value>
+ <env-entry-name>username</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>jaxrsqa1a</env-entry-value>
</env-entry>
<env-entry>
- <env-entry-name>password</env-entry-name>
- <env-entry-type>java.lang.String</env-entry-type>
- <env-entry-value>testpass</env-entry-value>
+ <env-entry-name>password</env-entry-name>
+ <env-entry-type>java.lang.String</env-entry-type>
+ <env-entry-value>testpass</env-entry-value>
</env-entry>
<security-identity>
<use-caller-identity/>
</security-identity>
- <resource-ref>
- <res-ref-name>S1asJaxrFactory</res-ref-name>
- <res-type>javax.xml.registry.ConnectionFactory</res-type>
- <res-auth>Application</res-auth>
- </resource-ref>
+ <resource-ref>
+ <res-ref-name>S1asJaxrFactory</res-ref-name>
+ <res-type>javax.xml.registry.ConnectionFactory</res-type>
+ <res-auth>Application</res-auth>
+ </resource-ref>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
- <ejb-name>MyJaxr</ejb-name>
+ <ejb-name>MyJaxr</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getCompanyInformation</method-name>
- <method-params>
- <method-param>java.lang.String</method-param>
- </method-params>
+ <method-params>
+ <method-param>java.lang.String</method-param>
+ </method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/sun-ejb-jar.xml
index ae11330..c0815b3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/descriptor/sun-ejb-jar.xml
@@ -25,8 +25,8 @@
<ejb-name>MyJaxr</ejb-name>
<jndi-name>jaxrra</jndi-name>
<resource-ref>
- <res-ref-name>S1asJaxrFactory</res-ref-name>
- <jndi-name>eis/SOAR</jndi-name>
+ <res-ref-name>S1asJaxrFactory</res-ref-name>
+ <jndi-name>eis/SOAR</jndi-name>
</resource-ref>
</ejb>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrBean.java
index 3167800..cdc03e9 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrBean.java
@@ -17,7 +17,7 @@
package jaxr;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import jakarta.ejb.SessionBean;
import jakarta.ejb.SessionContext;
import jakarta.ejb.EJBException;
@@ -39,107 +39,107 @@
String username = "jaxrsqa3a";
String password = "testpass";
public JaxrBean(){}
-
+
public void ejbCreate() throws RemoteException {
- try{
- System.out.println (" IN EJBCREATE ");
- InitialContext ic = new InitialContext();
-
- String username = "jaxrsqa1a";
+ try{
+ System.out.println (" IN EJBCREATE ");
+ InitialContext ic = new InitialContext();
+
+ String username = "jaxrsqa1a";
// (String)ic.lookup("java:comp/env/username");
- String password = "testpass";
+ String password = "testpass";
// (String)ic.lookup("java:comp/env/password");
- //String regurl = "http://jes-registry.east.sun.com:9080/omar/registry/soap";
+ //String regurl = "http://jes-registry.east.sun.com:9080/omar/registry/soap";
//(String)ic.lookup("java:comp/env/JaxrQueryURL");
- //String regurlp = "https://uddi.ibm.com/testregistry/publishapi";
+ //String regurlp = "https://uddi.ibm.com/testregistry/publishapi";
//(String)ic.lookup("java:comp/env/JaxrQueryURL");
- String httpProxyHost = "webcache.sfbay.sun.com";
+ String httpProxyHost = "webcache.sfbay.sun.com";
//(String)ic.lookup("java:comp/env/JaxrProxyHost");
- String httpProxyPort = "8080";
+ String httpProxyPort = "8080";
//(String)ic.lookup("java:comp/env/JaxrProxyPort");;
-
- Properties props = new Properties();
- /*props.setProperty("javax.xml.registry.queryManagerURL", regurl);
- props.setProperty("javax.xml.registry.lifeCycleManagerURL", regurl);
- props.setProperty("com.sun.xml.registry.https.proxyHost", httpProxyHost);
- props.setProperty("com.sun.xml.registry.http.proxyHost", httpProxyHost);
- props.setProperty("com.sun.xml.registry.https.proxyPort", httpProxyPort);
- props.setProperty("com.sun.xml.registry.http.proxyPort", httpProxyPort);
- */
- cnfct = (javax.xml.registry.ConnectionFactory)ic.lookup("eis/SOAR");
- //cnfct = (com.sun.jaxr.ra.ebxml.JaxrConnectionFactory)icnfct;
- System.out.println (" Connection Factory = "+cnfct);
- cnfct.setProperties(props);
- } catch(JAXRException e){
- e.printStackTrace();
- throw new RemoteException("Cannot instantiate the factory " ,e);
- } catch(Exception e){
- e.printStackTrace();
- throw new RemoteException("Error in ejbCreate !!!", e);
- }
- System.out.println("In ejbCreate !! - created ConnectionFactory ");
+
+ Properties props = new Properties();
+ /*props.setProperty("javax.xml.registry.queryManagerURL", regurl);
+ props.setProperty("javax.xml.registry.lifeCycleManagerURL", regurl);
+ props.setProperty("com.sun.xml.registry.https.proxyHost", httpProxyHost);
+ props.setProperty("com.sun.xml.registry.http.proxyHost", httpProxyHost);
+ props.setProperty("com.sun.xml.registry.https.proxyPort", httpProxyPort);
+ props.setProperty("com.sun.xml.registry.http.proxyPort", httpProxyPort);
+ */
+ cnfct = (javax.xml.registry.ConnectionFactory)ic.lookup("eis/SOAR");
+ //cnfct = (com.sun.jaxr.ra.ebxml.JaxrConnectionFactory)icnfct;
+ System.out.println (" Connection Factory = "+cnfct);
+ cnfct.setProperties(props);
+ } catch(JAXRException e){
+ e.printStackTrace();
+ throw new RemoteException("Cannot instantiate the factory " ,e);
+ } catch(Exception e){
+ e.printStackTrace();
+ throw new RemoteException("Error in ejbCreate !!!", e);
+ }
+ System.out.println("In ejbCreate !! - created ConnectionFactory ");
}
- public String getCompanyInformation(String company) throws EJBException,
- RemoteException{
- if(cnfct == null){
- return "ConnectionFactory was not instantiated. Test Failed";
- }
- if(company == null)
- throw new EJBException("Company name not specified");
- // create a jaxr connection instance
+ public String getCompanyInformation(String company) throws EJBException,
+ RemoteException{
+ if(cnfct == null){
+ return "ConnectionFactory was not instantiated. Test Failed";
+ }
+ if(company == null)
+ throw new EJBException("Company name not specified");
+ // create a jaxr connection instance
try {
- // System.setProperty("org.apache.commons.logging.simplelog.log.com.sun.xml.registry", "trace");
- System.out.println (" Connection factory = "+ cnfct);
+ // System.setProperty("org.apache.commons.logging.simplelog.log.com.sun.xml.registry", "trace");
+ System.out.println (" Connection factory = "+ cnfct);
- System.out.println (" Getting connection");
- com.sun.jaxr.ra.ebxml.JaxrConnectionFactory jcf
- = (com.sun.jaxr.ra.ebxml.JaxrConnectionFactory) cnfct;
- con = jcf.getConnection();
-// con = cnfct.createConnection();
- if (con == null) {
- System.out.println (" Connection is null");
- throw new EJBException("Connection could not be created");
- }
- System.out.println("Got the connection = "+ con);
- RegistryService rs = con.getRegistryService();
- System.out.println("Got the registry service = "+ rs);
- BusinessQueryManager bqm = rs.getBusinessQueryManager();
- System.out.println (" Business Query Manager = "+bqm);
- ArrayList names = new ArrayList();
- names.add(company);
-
- Collection fqualifiers = new ArrayList();
- fqualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
- System.out.println (" Before findOrganizations ");
- BulkResponse br = bqm.findOrganizations(fqualifiers, names, null,
- null, null, null);
+ System.out.println (" Getting connection");
+ com.sun.jaxr.ra.ebxml.JaxrConnectionFactory jcf
+ = (com.sun.jaxr.ra.ebxml.JaxrConnectionFactory) cnfct;
+ con = jcf.getConnection();
+// con = cnfct.createConnection();
+ if (con == null) {
+ System.out.println (" Connection is null");
+ throw new EJBException("Connection could not be created");
+ }
+ System.out.println("Got the connection = "+ con);
+ RegistryService rs = con.getRegistryService();
+ System.out.println("Got the registry service = "+ rs);
+ BusinessQueryManager bqm = rs.getBusinessQueryManager();
+ System.out.println (" Business Query Manager = "+bqm);
+ ArrayList names = new ArrayList();
+ names.add(company);
- System.out.println (" Bulk Response = "+br);
- if(br.getStatus() == JAXRResponse.STATUS_SUCCESS){
- System.out.println (" Results found for ("+company+")");
- Collection orgs = br.getCollection();
- Iterator rit = orgs.iterator();
- while(rit.hasNext()){
- Organization org = (Organization)rit.next();
- result.append(org.getName().getValue()+"\n");
- System.out.println (" Name = "+org.getName().getValue());
- System.out.println ("Description = "+ org.getDescription().getValue());
- result.append(org.getDescription().getValue()+"\n\n");
- }
-
- } else{
- System.out.println (" Could not query the registry due to the following exceptions :");
- Collection ex = br.getExceptions();
- Iterator it = ex.iterator();
- while(it.hasNext()){
- Exception e = (Exception) it.next();
- System.out.println (e.toString());
- result.append(e.toString());
- }
- }
+ Collection fqualifiers = new ArrayList();
+ fqualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
+ System.out.println (" Before findOrganizations ");
+ BulkResponse br = bqm.findOrganizations(fqualifiers, names, null,
+ null, null, null);
+
+ System.out.println (" Bulk Response = "+br);
+ if(br.getStatus() == JAXRResponse.STATUS_SUCCESS){
+ System.out.println (" Results found for ("+company+")");
+ Collection orgs = br.getCollection();
+ Iterator rit = orgs.iterator();
+ while(rit.hasNext()){
+ Organization org = (Organization)rit.next();
+ result.append(org.getName().getValue()+"\n");
+ System.out.println (" Name = "+org.getName().getValue());
+ System.out.println ("Description = "+ org.getDescription().getValue());
+ result.append(org.getDescription().getValue()+"\n\n");
+ }
+
+ } else{
+ System.out.println (" Could not query the registry due to the following exceptions :");
+ Collection ex = br.getExceptions();
+ Iterator it = ex.iterator();
+ while(it.hasNext()){
+ Exception e = (Exception) it.next();
+ System.out.println (e.toString());
+ result.append(e.toString());
+ }
+ }
// publish to the registry...
System.out.println(" ---- Publishing Information to registry ---");
@@ -147,13 +147,13 @@
createOrg("SJSAS", rs);
} catch (Throwable ex) {
ex.printStackTrace();
- System.out.println (" Test Failed");
- result.append("Test Failed");
- throw new java.rmi.RemoteException(ex.toString());
+ System.out.println (" Test Failed");
+ result.append("Test Failed");
+ throw new java.rmi.RemoteException(ex.toString());
}
return result.toString();
}
-
+
private void createOrg(String name, RegistryService rs) throws Exception{
BusinessLifeCycleManager blcm = rs.getBusinessLifeCycleManager();
Organization org = blcm.createOrganization(name);
@@ -166,41 +166,41 @@
orgs.add(org);
BulkResponse response = blcm.saveOrganizations(orgs);
Collection exceptions = response.getExceptions();
- Collection keys = null;
-
+ Collection keys = null;
+
if (exceptions == null) {
System.out.println("Organization saved");
keys = response.getCollection();
Iterator keyIter = keys.iterator();
if (keyIter.hasNext()) {
- javax.xml.registry.infomodel.Key orgKey =
+ javax.xml.registry.infomodel.Key orgKey =
(javax.xml.registry.infomodel.Key) keyIter.next();
String id = orgKey.getId();
System.out.println("---- Organization key is " + id);
}
} else {
- System.out.println("Organization Could not be saved!");
- }
- System.out.println("Deleting the ORG now");
- response = blcm.deleteOrganizations(keys);
- exceptions = response.getExceptions();
- if(exceptions == null){
- System.out.println("Organization Deleted Successfully");
- }else{
- System.out.println("Organization Could not be deleted");
- }
-}
-
-
+ System.out.println("Organization Could not be saved!");
+ }
+ System.out.println("Deleting the ORG now");
+ response = blcm.deleteOrganizations(keys);
+ exceptions = response.getExceptions();
+ if(exceptions == null){
+ System.out.println("Organization Deleted Successfully");
+ }else{
+ System.out.println("Organization Could not be deleted");
+ }
+}
+
+
public void setSessionContext(SessionContext sc) {
-
+
this.sc = sc;
}
-
+
public void ejbRemove() throws RemoteException {}
-
+
public void ejbActivate() {}
-
+
public void ejbPassivate() {}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrClient.java
index 0b7ec1a..1fdaad4 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jaxr/soar/jaxr/JaxrClient.java
@@ -35,7 +35,7 @@
JaxrClient client = new JaxrClient(args);
client.doTest();
}
-
+
public JaxrClient (String[] args) {
if (args.length == 3) {
url = args[0];
@@ -45,10 +45,10 @@
}
public String doTest() {
-
+
String res = "fail";
-
- try {
+
+ try {
Properties env = new Properties();
env.put("java.naming.provider.url", url);
env.put("java.naming.factory.initial", ctxFactory);
@@ -59,37 +59,37 @@
// Create Home object
System.out.println("*****"+jndiName);
java.lang.Object obj = context.lookup(jndiName);
- // create EJB using factory from container
+ // create EJB using factory from container
//java.lang.Object objref = ic.lookup("MyJaxr");
System.out.println("Looked up home!!");
JaxrHome home = (JaxrHome)PortableRemoteObject.narrow(
- obj, JaxrHome.class);
+ obj, JaxrHome.class);
System.out.println("Narrowed home!!");
JaxrRemote hr = home.create();
System.out.println("Got the EJB!!");
// invoke method on the EJB
- System.out.println (" Looking up company information for "+company);
+ System.out.println (" Looking up company information for "+company);
System.out.println(hr.getCompanyInformation(company));
hr.remove();
- } catch(NamingException ne){
+ } catch(NamingException ne){
System.out.println("Caught exception while initializing context.\n");
ne.printStackTrace();
- System.out.println (" Test Failed !");
+ System.out.println (" Test Failed !");
return res;
- } catch(Exception re) {
+ } catch(Exception re) {
re.printStackTrace();
- System.out.println (" Test Failed !");
+ System.out.println (" Test Failed !");
return res;
- }
- res = "pass";
- System.out.println (" Test Passed !");
- return res;
-
}
-
+ res = "pass";
+ System.out.println (" Test Passed !");
+ return res;
+
+ }
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/build.properties
index 33d05ef..71bb74f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/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"/>
-<property name="appname" value="ejb30-toplink-essentials-advanced"/>
+<property name="appname" value="ejb30-toplink-essentials-advanced"/> \u0020
<property name="persistence.xml" value="descriptor/persistence.xml"/>
<property name="app.type" value="application"/>
<property name="ejb30-persistence" value="true"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/build.xml
index 747f456..76f795a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/build.xml
@@ -69,10 +69,10 @@
includes="oracle/toplink/essentials/testing/models/cmp3/advanced/*.class"
/>
</jar>
- </target>
+ </target>
<target name="build" depends="compile">
- </target>
+ </target>
<path id="run.cp">
<!-- ${build.classes.dir} not defined during run target???
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/descriptor/persistence.xml b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/descriptor/persistence.xml
index 5b1ba2e..cd2b899 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/descriptor/persistence.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/descriptor/persistence.xml
@@ -24,8 +24,8 @@
<class>oracle.toplink.essentials.testing.models.cmp3.advanced.EmploymentPeriod</class>
<class>oracle.toplink.essentials.testing.models.cmp3.advanced.LargeProject</class>
<class>oracle.toplink.essentials.testing.models.cmp3.advanced.PhoneNumber</class>
- <class>oracle.toplink.essentials.testing.models.cmp3.advanced.Project</class>
- <class>oracle.toplink.essentials.testing.models.cmp3.advanced.SmallProject</class>
+ <class>oracle.toplink.essentials.testing.models.cmp3.advanced.Project</class>
+ <class>oracle.toplink.essentials.testing.models.cmp3.advanced.SmallProject</class>
<properties>
<property name="toplink.jdbc.driver" value="org.apache.derby.jdbc.ClientDriver"/>
<property name="toplink.jdbc.url" value="jdbc:derby://localhost:1527/testdb;retrieveMessagesFromServerOnGetMessage=true;"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Address.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Address.java
index 899a7de..580d664 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Address.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Address.java
@@ -32,22 +32,22 @@
@Entity
@Table(name="CMP3_ADDRESS")
@NamedNativeQuery(
- name="findAllSQLAddresses",
+ name="findAllSQLAddresses",
query="select * from CMP3_ADDRESS",
resultClass=oracle.toplink.essentials.testing.models.cmp3.advanced.Address.class
)
@NamedQuery(
- name="findAllAddressesByPostalCode",
+ name="findAllAddressesByPostalCode",
query="SELECT OBJECT(address) FROM Address address WHERE address.postalCode = :postalcode"
)
public class Address implements Serializable {
- private Integer id;
- private String street;
- private String city;
+ private Integer id;
+ private String street;
+ private String city;
private String province;
private String postalCode;
private String country;
- private Collection<Employee> employees;
+ private Collection<Employee> employees;
public Address() {
city = "";
@@ -67,65 +67,65 @@
this.employees = new Vector<Employee>();
}
- @Id
+ @Id
@GeneratedValue(strategy=SEQUENCE, generator="ADDRESS_SEQUENCE_GENERATOR")
- @SequenceGenerator(name="ADDRESS_SEQUENCE_GENERATOR", sequenceName="ADDRESS_SEQ", allocationSize=25)
- @Column(name="ADDRESS_ID")
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
+ @SequenceGenerator(name="ADDRESS_SEQUENCE_GENERATOR", sequenceName="ADDRESS_SEQ", allocationSize=25)
+ @Column(name="ADDRESS_ID")
+ public Integer getId() {
+ return id;
}
- public String getStreet() {
- return street;
- }
-
- public void setStreet(String street) {
- this.street = street;
+ public void setId(Integer id) {
+ this.id = id;
}
- public String getCity() {
- return city;
- }
-
- public void setCity(String city) {
- this.city = city;
+ public String getStreet() {
+ return street;
}
- public String getProvince() {
- return province;
- }
-
- public void setProvince(String province) {
- this.province = province;
+ public void setStreet(String street) {
+ this.street = street;
}
- @Column(name="P_CODE")
- public String getPostalCode() {
- return postalCode;
- }
-
- public void setPostalCode(String postalCode) {
- this.postalCode = postalCode;
+ public String getCity() {
+ return city;
}
- public String getCountry() {
- return country;
+ public void setCity(String city) {
+ this.city = city;
}
-
- public void setCountry(String country) {
+
+ public String getProvince() {
+ return province;
+ }
+
+ public void setProvince(String province) {
+ this.province = province;
+ }
+
+ @Column(name="P_CODE")
+ public String getPostalCode() {
+ return postalCode;
+ }
+
+ public void setPostalCode(String postalCode) {
+ this.postalCode = postalCode;
+ }
+
+ public String getCountry() {
+ return country;
+ }
+
+ public void setCountry(String country) {
this.country = country;
}
-
- @OneToMany(cascade=ALL, mappedBy="address")
- public Collection<Employee> getEmployees() {
- return employees;
+
+ @OneToMany(cascade=ALL, mappedBy="address")
+ public Collection<Employee> getEmployees() {
+ return employees;
}
-
+
public void setEmployees(Collection<Employee> employees) {
- this.employees = employees;
- }
+ this.employees = employees;
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Employee.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Employee.java
index 8cf7695..e4f0518 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Employee.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Employee.java
@@ -31,18 +31,18 @@
* Primary key class: EmployeePK
* Home interface: EmployeeHome
*
- * Employees have a one-to-many relationship with Employees through the
+ * Employees have a one-to-many relationship with Employees through the
* managedEmployees attribute.
* Addresses exist in one-to-one relationships with Employees through the
* address attribute.
* Employees have a many-to-many relationship with Projects through the
* projects attribute.
- *
+ *
* Employee now has invalid annotation fields and data. This is done so that
* we may test the XML/Annotation merging. Employee has been defined in the
* XML, therefore, most annotations should not be processed. If they are, then
* they will force an error, which means something is wrong with our merging.
- *
+ *
* The invalid annotations that should not be processed have _INVALID
* appended to some annotation field member. Others will not have this,
* which means they should be processed (their mappings are not defined in the
@@ -55,166 +55,166 @@
@PrimaryKeyJoinColumn(name="EMP_ID", referencedColumnName="EMP_ID")
@NamedQueries({
@NamedQuery(
- name="findAllEmployeesByFirstName",
- query="SELECT OBJECT(employee) FROM Employee employee WHERE employee.firstName = :firstname"
+ name="findAllEmployeesByFirstName",
+ query="SELECT OBJECT(employee) FROM Employee employee WHERE employee.firstName = :firstname"
),
@NamedQuery(
- name="constuctEmployees",
- query="SELECT new oracle.toplink.essentials.testing.models.cmp3.advanced.Employee(employee.firstName, employee.lastName) FROM Employee employee"
+ name="constuctEmployees",
+ query="SELECT new oracle.toplink.essentials.testing.models.cmp3.advanced.Employee(employee.firstName, employee.lastName) FROM Employee employee"
),
@NamedQuery(
- name="findEmployeeByPK",
- query="SELECT OBJECT(employee) FROM Employee employee WHERE employee.id = :id"
+ name="findEmployeeByPK",
+ query="SELECT OBJECT(employee) FROM Employee employee WHERE employee.id = :id"
)
}
)
public class Employee implements Serializable {
- private Integer id;
- private Integer version;
- private String firstName;
- private String lastName;
- private Address address;
- private Collection<PhoneNumber> phoneNumbers;
- private Collection<Project> projects;
- private int salary;
- private EmploymentPeriod period;
+ private Integer id;
+ private Integer version;
+ private String firstName;
+ private String lastName;
+ private Address address;
+ private Collection<PhoneNumber> phoneNumbers;
+ private Collection<Project> projects;
+ private int salary;
+ private EmploymentPeriod period;
private Collection<Employee> managedEmployees;
private Employee manager;
-
- public Employee () {
+
+ public Employee () {
this.phoneNumbers = new Vector<PhoneNumber>();
this.projects = new Vector<Project>();
this.managedEmployees = new Vector<Employee>();
- }
-
+ }
+
public Employee(String firstName, String lastName){
this();
this.firstName = firstName;
this.lastName = lastName;
}
- @Id
+ @Id
@GeneratedValue(strategy=TABLE, generator="EMPLOYEE_TABLE_GENERATOR")
- @TableGenerator(
- name="EMPLOYEE_TABLE_GENERATOR",
- table="CMP3_EMPLOYEE_SEQ",
- pkColumnName="SEQ_NAME",
+ @TableGenerator(
+ name="EMPLOYEE_TABLE_GENERATOR",
+ table="CMP3_EMPLOYEE_SEQ",
+ pkColumnName="SEQ_NAME",
valueColumnName="SEQ_COUNT",
pkColumnValue="EMPLOYEE_SEQ"
)
@Column(name="EMP_ID")
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
+ public Integer getId() {
+ return id;
}
- @Version
- @Column(name="VERSION")
- public Integer getVersion() {
- return version;
+ public void setId(Integer id) {
+ this.id = id;
}
-
- public void setVersion(Integer version) {
- this.version = version;
- }
+
+ @Version
+ @Column(name="VERSION")
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
@Column(name="F_NAME")
- public String getFirstName() {
- return firstName;
+ public String getFirstName() {
+ return firstName;
}
-
- public void setFirstName(String name) {
- this.firstName = name;
+
+ public void setFirstName(String name) {
+ this.firstName = name;
}
// Not defined in the XML, this should get processed.
@Column(name="L_NAME")
- public String getLastName() {
- return lastName;
- }
-
- public void setLastName(String name) {
- this.lastName = name;
+ public String getLastName() {
+ return lastName;
}
- @ManyToOne(cascade=PERSIST, fetch=LAZY)
- @JoinColumn(name="ADDR_ID")
- public Address getAddress() {
- return address;
+ public void setLastName(String name) {
+ this.lastName = name;
}
-
- public void setAddress(Address address) {
- this.address = address;
- }
- @OneToMany(cascade=ALL, mappedBy="owner")
- public Collection<PhoneNumber> getPhoneNumbers() {
- return phoneNumbers;
+ @ManyToOne(cascade=PERSIST, fetch=LAZY)
+ @JoinColumn(name="ADDR_ID")
+ public Address getAddress() {
+ return address;
}
-
- public void setPhoneNumbers(Collection<PhoneNumber> phoneNumbers) {
- this.phoneNumbers = phoneNumbers;
- }
- @OneToMany(cascade=ALL, mappedBy="manager")
- public Collection<Employee> getManagedEmployees() {
- return managedEmployees;
+ public void setAddress(Address address) {
+ this.address = address;
}
-
- public void setManagedEmployees(Collection<Employee> managedEmployees) {
- this.managedEmployees = managedEmployees;
- }
+
+ @OneToMany(cascade=ALL, mappedBy="owner")
+ public Collection<PhoneNumber> getPhoneNumbers() {
+ return phoneNumbers;
+ }
+
+ public void setPhoneNumbers(Collection<PhoneNumber> phoneNumbers) {
+ this.phoneNumbers = phoneNumbers;
+ }
+
+ @OneToMany(cascade=ALL, mappedBy="manager")
+ public Collection<Employee> getManagedEmployees() {
+ return managedEmployees;
+ }
+
+ public void setManagedEmployees(Collection<Employee> managedEmployees) {
+ this.managedEmployees = managedEmployees;
+ }
// Not defined in the XML, this should get processed.
- @ManyToOne(cascade=PERSIST, fetch=LAZY)
- public Employee getManager() {
- return manager;
+ @ManyToOne(cascade=PERSIST, fetch=LAZY)
+ public Employee getManager() {
+ return manager;
}
-
- public void setManager(Employee manager) {
- this.manager = manager;
- }
- @ManyToMany(cascade=PERSIST)
+ public void setManager(Employee manager) {
+ this.manager = manager;
+ }
+
+ @ManyToMany(cascade=PERSIST)
@JoinTable(
- name="CMP3_EMP_PROJ",
+ name="CMP3_EMP_PROJ",
// Default for the project side and specify for the employee side
// Will test both defaulting and set values.
joinColumns=@JoinColumn(name="EMPLOYEES_EMP_ID", referencedColumnName="EMP_ID")
- //inverseJoinColumns=@JoinColumn(name="PROJECTS_PROJ_ID", referencedColumnName="PROJ_ID")
- )
- public Collection<Project> getProjects() {
- return projects;
+ //inverseJoinColumns=@JoinColumn(name="PROJECTS_PROJ_ID", referencedColumnName="PROJ_ID")
+ )
+ public Collection<Project> getProjects() {
+ return projects;
}
-
- public void setProjects(Collection<Project> projects) {
- this.projects = projects;
- }
+
+ public void setProjects(Collection<Project> projects) {
+ this.projects = projects;
+ }
@Column(table="CMP3_SALARY")
- public int getSalary() {
- return salary;
- }
-
- public void setSalary(int salary) {
- this.salary = salary;
+ public int getSalary() {
+ return salary;
}
- @Embedded
+ public void setSalary(int salary) {
+ this.salary = salary;
+ }
+
+ @Embedded
@AttributeOverrides({
- @AttributeOverride(name="startDate", column=@Column(name="START_DATE", nullable=false)),
- @AttributeOverride(name="endDate", column=@Column(name="END_DATE", nullable=true))
- })
- public EmploymentPeriod getPeriod() {
- return period;
- }
-
- public void setPeriod(EmploymentPeriod period) {
- this.period = period;
- }
+ @AttributeOverride(name="startDate", column=@Column(name="START_DATE", nullable=false)),
+ @AttributeOverride(name="endDate", column=@Column(name="END_DATE", nullable=true))
+ })
+ public EmploymentPeriod getPeriod() {
+ return period;
+ }
+
+ public void setPeriod(EmploymentPeriod period) {
+ this.period = period;
+ }
public void addManagedEmployee(Employee emp) {
getManagedEmployees().add(emp);
@@ -235,8 +235,8 @@
}
public void removePhoneNumber(PhoneNumber phone) {
- // Note that getPhoneNumbers() will not have a phone number identical to
- // "phone", (because it's serialized) and this will take advantage of
+ // Note that getPhoneNumbers() will not have a phone number identical to
+ // "phone", (because it's serialized) and this will take advantage of
// equals() in PhoneNumber to remove properly
getPhoneNumbers().remove(phone);
}
@@ -255,17 +255,17 @@
return sbuff.toString();
}
-
+
// These methods were added for testing purpose only - BUG 4349991
-
+
// Static method should be ignored
static public void getAbsolutelyNothing() {}
-
+
// Get methods with parameters should be ignored
public String getYourStringBack(String str) {
return str;
}
-
+
// Get methods with no corresponding set method, should be ignored.
// logs a warning though.
public String getAnEmptyString() {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/EmployeeListener.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/EmployeeListener.java
index f01b206..3c8a455 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/EmployeeListener.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/EmployeeListener.java
@@ -30,29 +30,29 @@
// preUpdate will remove this prefix from firstName and lastName
public static String PRE_UPDATE_NAME_PREFIX = "PRE_UPDATE_NAME_PREFIX";
-
- @PrePersist
- public void prePersist(Object emp) {
+
+ @PrePersist
+ public void prePersist(Object emp) {
PRE_PERSIST_COUNT++;
- }
+ }
- @PostPersist
- public void postPersist(Object emp) {
+ @PostPersist
+ public void postPersist(Object emp) {
POST_PERSIST_COUNT++;
- }
+ }
- @PreRemove
- public void preRemove(Object emp) {
+ @PreRemove
+ public void preRemove(Object emp) {
PRE_REMOVE_COUNT++;
- }
+ }
- @PostRemove
- public void postRemove(Object emp) {
+ @PostRemove
+ public void postRemove(Object emp) {
POST_REMOVE_COUNT++;
- }
+ }
- @PreUpdate
- public void preUpdate(Object emp) {
+ @PreUpdate
+ public void preUpdate(Object emp) {
PRE_UPDATE_COUNT++;
Employee employee = (Employee)emp;
if(employee.getFirstName() != null && employee.getFirstName().startsWith(PRE_UPDATE_NAME_PREFIX)) {
@@ -61,15 +61,15 @@
if(employee.getLastName() != null && employee.getLastName().startsWith(PRE_UPDATE_NAME_PREFIX)) {
employee.setLastName(employee.getLastName().substring(PRE_UPDATE_NAME_PREFIX.length()));
}
- }
+ }
- @PostUpdate
- public void postUpdate(Object emp) {
+ @PostUpdate
+ public void postUpdate(Object emp) {
POST_UPDATE_COUNT++;
- }
+ }
- @PostLoad
- public void postLoad(Employee emp) {
+ @PostLoad
+ public void postLoad(Employee emp) {
POST_LOAD_COUNT++;
- }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/EmploymentPeriod.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/EmploymentPeriod.java
index 62f9503..3e5ecb6 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/EmploymentPeriod.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/EmploymentPeriod.java
@@ -22,8 +22,8 @@
/**
* <p><b>Purpose</b>: Defines the period an Employee worked for the organization
- * <p><b>Description</b>: The period holds the start date and optionally the
- * end date if the employee has left (null otherwise). Maintained in an
+ * <p><b>Description</b>: The period holds the start date and optionally the
+ * end date if the employee has left (null otherwise). Maintained in an
* aggregate relationship of Employee
* @see Employee
*/
@@ -37,10 +37,10 @@
/**
* Return a new employment period instance.
- * The constructor's purpose is to allow only valid instances of a class to
- * be created. Valid means that the get/set and clone/toString methods
- * should work on the instance. Arguments to constructors should be avoided
- * unless those arguments are required to put the instance into a valid
+ * The constructor's purpose is to allow only valid instances of a class to
+ * be created. Valid means that the get/set and clone/toString methods
+ * should work on the instance. Arguments to constructors should be avoided
+ * unless those arguments are required to put the instance into a valid
* state, or represent the entire instance definition.
*/
public EmploymentPeriod(Date theStartDate, Date theEndDate) {
@@ -48,22 +48,22 @@
endDate = theEndDate;
}
- @Column(name="S_DATE")
- public Date getStartDate() {
- return startDate;
- }
-
- public void setStartDate(Date date) {
- this.startDate = date;
+ @Column(name="S_DATE")
+ public Date getStartDate() {
+ return startDate;
}
- @Column(name="E_DATE")
- public Date getEndDate() {
- return endDate;
+ public void setStartDate(Date date) {
+ this.startDate = date;
}
-
- public void setEndDate(Date date) {
- this.endDate = date;
+
+ @Column(name="E_DATE")
+ public Date getEndDate() {
+ return endDate;
+ }
+
+ public void setEndDate(Date date) {
+ this.endDate = date;
}
/**
@@ -72,17 +72,17 @@
public String toString() {
java.io.StringWriter writer = new java.io.StringWriter();
writer.write("EmploymentPeriod: ");
-
+
if (this.getStartDate() != null) {
writer.write(this.getStartDate().toString());
}
-
+
writer.write("-");
-
+
if (this.getEndDate() != null) {
writer.write(this.getEndDate().toString());
}
-
+
return writer.toString();
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/LargeProject.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/LargeProject.java
index bf6cad9..dff665d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/LargeProject.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/LargeProject.java
@@ -31,16 +31,16 @@
@DiscriminatorValue("L")
@NamedQueries({
@NamedQuery(
- name="findWithBudgetLargerThan",
- query="SELECT OBJECT(project) FROM LargeProject project WHERE project.budget >= :amount"
+ name="findWithBudgetLargerThan",
+ query="SELECT OBJECT(project) FROM LargeProject project WHERE project.budget >= :amount"
),
@NamedQuery(
- name="constructLProject",
- query="SELECT new oracle.toplink.essentials.testing.models.cmp3.advanced.LargeProject(project.name) FROM LargeProject project")
+ name="constructLProject",
+ query="SELECT new oracle.toplink.essentials.testing.models.cmp3.advanced.LargeProject(project.name) FROM LargeProject project")
}
)
public class LargeProject extends Project {
- private double budget;
+ private double budget;
public LargeProject () {
super();
}
@@ -49,11 +49,11 @@
this.setName(name);
}
- public double getBudget() {
- return budget;
+ public double getBudget() {
+ return budget;
}
-
- public void setBudget(double budget) {
- this.budget = budget;
- }
+
+ public void setBudget(double budget) {
+ this.budget = budget;
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/ModelExamples.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/ModelExamples.java
index 21e877e..350cfcc 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/ModelExamples.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/ModelExamples.java
@@ -43,7 +43,7 @@
emp.setSalary(1000);
return emp;
}
-
+
public static Employee employeeExample3(){
Employee emp = new Employee();
emp.setFirstName("Lacy");
@@ -54,7 +54,7 @@
emp.setSalary(2);
return emp;
}
-
+
public static Employee employeeExample4(){
Employee emp = new Employee();
emp.setFirstName("Ralf");
@@ -65,14 +65,14 @@
emp.setSalary(100);
return emp;
}
-
+
public static Project projectExample1(){
Project project = new Project();
project.setDescription("To undertake and evaluate the effecency of the companies farmers.");
project.setName("Farmer effecency evaluations");
return project;
}
-
+
public static Project projectExample2(){
LargeProject project = new LargeProject();
project.setDescription("To assess the changing demographics of the feline world");
@@ -125,7 +125,7 @@
address.setStreet("324 Bay Street");
return address;
}
-
+
public static Address addressExample5(){
Address address = new Address();
address.setCity("Goose Bay");
@@ -135,7 +135,7 @@
address.setStreet("360 Hamilton Rd");
return address;
}
-
+
public static PhoneNumber phoneExample1(){
return new PhoneNumber("Work", "613", "6544545");
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/PhoneNumber.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/PhoneNumber.java
index dce14e9..71c785d 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/PhoneNumber.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/PhoneNumber.java
@@ -28,12 +28,12 @@
@Entity
@Table(name="CMP3_PHONENUMBER")
public class PhoneNumber implements Serializable {
- private String number;
- private String type;
- private Employee owner;
+ private String number;
+ private String type;
+ private Employee owner;
private Integer id;
private String areaCode;
-
+
public PhoneNumber() {
this("", "###", "#######");
}
@@ -46,52 +46,52 @@
}
@Id
- @Column(name="OWNER_ID", insertable=false, updatable=false)
- public Integer getId() {
- return id;
+ @Column(name="OWNER_ID", insertable=false, updatable=false)
+ public Integer getId() {
+ return id;
}
-
- public void setId(Integer id) {
- this.id = id;
- }
- @Column(name="NUMB")
- public String getNumber() {
- return number;
+ public void setId(Integer id) {
+ this.id = id;
}
-
- public void setNumber(String number) {
- this.number = number;
+
+ @Column(name="NUMB")
+ public String getNumber() {
+ return number;
+ }
+
+ public void setNumber(String number) {
+ this.number = number;
}
@Id
@Column(name="TYPE")
- public String getType() {
- return type;
+ public String getType() {
+ return type;
}
-
- public void setType(String type) {
- this.type = type;
- }
- @Column(name="AREA_CODE")
- public String getAreaCode() {
- return areaCode;
+ public void setType(String type) {
+ this.type = type;
}
-
- public void setAreaCode(String areaCode) {
- this.areaCode = areaCode;
- }
- @ManyToOne
- @JoinColumn(name="OWNER_ID", referencedColumnName="EMP_ID")
- public Employee getOwner() {
- return owner;
+ @Column(name="AREA_CODE")
+ public String getAreaCode() {
+ return areaCode;
}
-
- public void setOwner(Employee owner) {
- this.owner = owner;
- }
+
+ public void setAreaCode(String areaCode) {
+ this.areaCode = areaCode;
+ }
+
+ @ManyToOne
+ @JoinColumn(name="OWNER_ID", referencedColumnName="EMP_ID")
+ public Employee getOwner() {
+ return owner;
+ }
+
+ public void setOwner(Employee owner) {
+ this.owner = owner;
+ }
/**
* Example: Phone[Work]: (613) 225-8812
@@ -114,7 +114,7 @@
return writer.toString();
}
-
+
/**
* Builds the PhoneNumberPK for this class
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/PhoneNumberPK.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/PhoneNumberPK.java
index 50641bb..2eecc81 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/PhoneNumberPK.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/PhoneNumberPK.java
@@ -18,26 +18,26 @@
public class PhoneNumberPK {
public Integer id;
- public String type;
+ public String type;
public PhoneNumberPK() {}
- public Integer getId() {
- return id;
+ public Integer getId() {
+ return id;
}
-
- public void setId(Integer id) {
- this.id = id;
- }
- public String getType() {
- return type;
+ public void setId(Integer id) {
+ this.id = id;
}
-
- public void setType(String type) {
- this.type = type;
- }
-
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
/**
* equals: Answer true if the ids are equal
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Project.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Project.java
index f92eed6..d0929dc 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Project.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/advanced/ejb/Project.java
@@ -42,8 +42,8 @@
@DiscriminatorColumn(name="PROJ_TYPE")
@DiscriminatorValue("P")
@NamedQuery(
- name="findProjectByName",
- query="SELECT OBJECT(project) FROM Project project WHERE project.name = :name"
+ name="findProjectByName",
+ query="SELECT OBJECT(project) FROM Project project WHERE project.name = :name"
)
public class Project implements Serializable {
public int pre_update_count = 0;
@@ -53,76 +53,76 @@
public int pre_persist_count = 0;
public int post_persist_count = 0;
public int post_load_count = 0;
-
- private Integer id;
- private int version;
- private String name;
- private String description;
- private Employee teamLeader;
- private Collection<Employee> teamMembers;
- public Project () {
+ private Integer id;
+ private int version;
+ private String name;
+ private String description;
+ private Employee teamLeader;
+ private Collection<Employee> teamMembers;
+
+ public Project () {
this.teamMembers = new Vector<Employee>();
- }
+ }
- @Id
+ @Id
@GeneratedValue(strategy=SEQUENCE, generator="PROJECT_SEQUENCE_GENERATOR")
- @SequenceGenerator(name="PROJECT_SEQUENCE_GENERATOR", sequenceName="PROJECT_SEQ", allocationSize=10)
- @Column(name="PROJ_ID")
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
+ @SequenceGenerator(name="PROJECT_SEQUENCE_GENERATOR", sequenceName="PROJECT_SEQ", allocationSize=10)
+ @Column(name="PROJ_ID")
+ public Integer getId() {
+ return id;
}
- @Version
- @Column(name="VERSION")
- public int getVersion() {
- return version;
- }
-
- protected void setVersion(int version) {
- this.version = version;
+ public void setId(Integer id) {
+ this.id = id;
}
- @Column(name="PROJ_NAME")
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
+ @Version
+ @Column(name="VERSION")
+ public int getVersion() {
+ return version;
}
- @Column(name="DESCRIP")
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
+ protected void setVersion(int version) {
+ this.version = version;
}
- @OneToOne
- @JoinColumn(name="LEADER_ID")
- public Employee getTeamLeader() {
- return teamLeader;
- }
-
- public void setTeamLeader(Employee teamLeader) {
- this.teamLeader = teamLeader;
+ @Column(name="PROJ_NAME")
+ public String getName() {
+ return name;
}
- @ManyToMany(mappedBy="projects")
- public Collection<Employee> getTeamMembers() {
- return teamMembers;
+ public void setName(String name) {
+ this.name = name;
}
-
- public void setTeamMembers(Collection<Employee> employees) {
- this.teamMembers = employees;
- }
+
+ @Column(name="DESCRIP")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ @OneToOne
+ @JoinColumn(name="LEADER_ID")
+ public Employee getTeamLeader() {
+ return teamLeader;
+ }
+
+ public void setTeamLeader(Employee teamLeader) {
+ this.teamLeader = teamLeader;
+ }
+
+ @ManyToMany(mappedBy="projects")
+ public Collection<Employee> getTeamMembers() {
+ return teamMembers;
+ }
+
+ public void setTeamMembers(Collection<Employee> employees) {
+ this.teamMembers = employees;
+ }
public void addTeamMember(Employee employee) {
getTeamMembers().add(employee);
@@ -138,39 +138,39 @@
return sbuff.toString();
}
-
+
@PrePersist
- public void prePersist() {
+ public void prePersist() {
++pre_persist_count;
- }
+ }
- @PostPersist
- public void postPersist() {
+ @PostPersist
+ public void postPersist() {
++post_persist_count;
- }
+ }
- @PreRemove
- public void preRemove() {
+ @PreRemove
+ public void preRemove() {
++pre_remove_count;
- }
+ }
- @PostRemove
- public void postRemove() {
+ @PostRemove
+ public void postRemove() {
++post_remove_count;
- }
+ }
- @PreUpdate
- public void preUpdate() {
+ @PreUpdate
+ public void preUpdate() {
++pre_update_count;
- }
+ }
- @PostUpdate
- public void postUpdate() {
+ @PostUpdate
+ public void postUpdate() {
++post_update_count;
- }
+ }
- @PostLoad
- public void postLoad() {
+ @PostLoad
+ public void postLoad() {
++post_load_count;
- }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/framework/TestNGTestCase.java b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/framework/TestNGTestCase.java
index 698a5f4..fbde7ad 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/framework/TestNGTestCase.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/jpa-integration/toplink-essentials/framework/TestNGTestCase.java
@@ -51,16 +51,16 @@
getServerSession().getIdentityMapAccessor().initializeAllIdentityMaps();
} catch (Exception ex) {
throw new RuntimeException("An exception occurred trying clear the cache.", ex);
- }
+ }
}
-
+
/**
* Create an entity manager.
*/
public EntityManager createEntityManager() {
- return getEntityManagerFactory().createEntityManager();
+ return getEntityManagerFactory().createEntityManager();
}
-
+
public Map getDatabaseProperties(){
if (propertiesMap == null){
propertiesMap = new HashMap();
@@ -68,18 +68,18 @@
}
return propertiesMap;
}
-
+
public ServerSession getServerSession(){
- return ((oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl)createEntityManager()).getServerSession();
+ return ((oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl)createEntityManager()).getServerSession();
}
-
+
public EntityManagerFactory getEntityManagerFactory(){
if (emf == null){
emf = Persistence.createEntityManagerFactory("default", getDatabaseProperties());
}
return emf;
}
-
+
public Platform getDbPlatform() {
return getServerSession().getDatasourcePlatform();
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/build.xml
index 567f4e2..b46b677 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/build.xml
@@ -39,17 +39,17 @@
</delete>
<record name="lazyinit.output" action="start" />
<ant dir="converter" target="all"/>
- <ant dir="ejbjar" target="all"/>
+ <ant dir="ejbjar" target="all"/>
<!--
- <ant dir="ejbws" target="all"/>
+ <ant dir="ejbws" target="all"/>
-->
- <ant dir="jms1/simple" target="all"/>
- <ant dir="jms2/simple" target="all"/>
- <ant dir="jms3/simple" target="all"/>
- <ant dir="jmsweb" target="all"/>
- <ant dir="mbeans1" target="all"/>
- <ant dir="onlygetconnectionservlet" target="all"/>
- <ant dir="standalonewar" target="all"/>
+ <ant dir="jms1/simple" target="all"/>
+ <ant dir="jms2/simple" target="all"/>
+ <ant dir="jms3/simple" target="all"/>
+ <ant dir="jmsweb" target="all"/>
+ <ant dir="mbeans1" target="all"/>
+ <ant dir="onlygetconnectionservlet" target="all"/>
+ <ant dir="standalonewar" target="all"/>
<ant dir="timer" target="all"/>
<ant dir="webear" target="all"/>
<ant dir="jms-txlookup" target="all"/>
@@ -58,9 +58,9 @@
</target>
<target name="usage">
- <echo>
- Usage:
- ant all (Executes all the lazyInit tests)
- </echo>
+ <echo>
+ Usage:
+ ant all (Executes all the lazyInit tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/common.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/common.xml
index 50e22ae..0f9b4eb 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/common.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/common.xml
@@ -18,7 +18,7 @@
<!--
This is the common targets for all lazyInit tests
- imported into all the leaf level build files
+ imported into all the leaf level build files
-->
<!-- ================================================================ -->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/build.properties
index eaa4b7c..f20c699 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/build.properties
@@ -15,28 +15,28 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="ejb-stateless"/>
-<property name="appname" value="${module}-converter"/>
+<property name="appname" value="${module}-converter"/> \u0020
-<property name="assemble"
- value="${build.classes.dir}/archive"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
-<property name="appclient.jar"
- value="${assemble.dir}/${appname}-client.jar"/>
+<property name="assemble"\u0020
+ value="${build.classes.dir}/archive"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
+<property name="appclient.jar"\u0020
+ value="${assemble.dir}/${appname}-client.jar"/> \u0020
-<property name="test.client"
- value="com.sun.s1peqe.ejb.stateless.converter.client.ConverterClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.ejb.stateless.converter.client.ConverterClient"/>
<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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.xml"/>
<property name="app.type" value="application"/>
@@ -45,8 +45,8 @@
<!-- ============================================================ -->
<!--
<property name="jndi.name" value="converter"/>
-<property name="provider.url" value="iiop://localhost:${orb.port}"/>
-<property name="ctxfactory" value="com.sun.enterprise.naming.SerialInitContextFactory"/>
-<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/>
+<property name="provider.url" value="iiop://localhost:${orb.port}"/>\u0020
+<property name="ctxfactory" value="com.sun.enterprise.naming.SerialInitContextFactory"/>\u0020
+<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/>\u0020
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/build.xml
index d341ecf..61afd5c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/build.xml
@@ -59,7 +59,7 @@
<param name="jdbc.conpool.name" value="sqe-timer-pool"/>
</antcall>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -71,12 +71,12 @@
<target name="build" depends="compile">
<antcall target="build-ear-common"/>
- </target>
-
+ </target>
+
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="restart-server"/>
<antcall target="runclient-common"/>
@@ -90,27 +90,27 @@
<target name="run-standalone-client" depends="init-common">
<property name="jndi.name" value="converter"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<!--
- <property name="ctxfactory"
- value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
+ <property name="ctxfactory"
+ value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
-->
- <echo message="provider.url used is ${provider.url}"/>
+ <echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
</java>
</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/v2-tests/appserv-tests/devtests/lazyInit/converter/client/ConverterClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/client/ConverterClient.java
index 2e41fba..8b5d64d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/client/ConverterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/client/ConverterClient.java
@@ -27,7 +27,7 @@
/**
* A simple java client. This uses the services provided by the <code>ConverterBean</code> and
- * converts 100 US dollars to Yen and 100 Yen to Euro.
+ * converts 100 US dollars to Yen and 100 Yen to Euro.
* <p>In this regard, it does the following in order
* <ul>
* <li>Locates the home interface of the enterprise bean
@@ -37,21 +37,21 @@
* <br>
* <b>Locating the home interface:</b>
* <blockquote><pre>
- * Context initial = new InitialContext();
- * Context myEnv = (Context)initial.lookup("java:comp/env");
- * Object objref = myEnv.lookup("ejb/SimpleConverter");
+ * Context initial = new InitialContext();
+ * Context myEnv = (Context)initial.lookup("java:comp/env");
+ * Object objref = myEnv.lookup("ejb/SimpleConverter");
* ConverterHome home = (ConverterHome)PortableRemoteObject.narrow(objref, ConverterHome.class);
* </pre></blockquote>
* <br>
* <b>Creating the remote interface:</b>
* <blockquote><pre>
- * Converter currencyConverter = home.create();
+ * Converter currencyConverter = home.create();
* </pre></blockquote>
* <br>
* <b>Invoking business methods:</b>
* <blockquote><pre>
* BigDecimal param = new BigDecimal ("100.00");
- * amount = currencyConverter.dollarToYen(param);
+ * amount = currencyConverter.dollarToYen(param);
* amount = currencyConverter.yenToEuro(param);
* </pre></blockquote>
* <br>
@@ -66,7 +66,7 @@
public class ConverterClient {
- private SimpleReporterAdapter stat =
+ private SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
ConverterClient() {
@@ -80,35 +80,35 @@
*
*/
public static void main(String[] args) {
- ConverterClient client = new ConverterClient();
- client.run(args);
+ ConverterClient client = new ConverterClient();
+ client.run(args);
}
private void run(String[] args) {
String url = null;
- String testId = null;
+ String testId = null;
String jndiName = null;
Context context = null;
String ctxFactory = null;
- java.lang.Object obj = null;
+ java.lang.Object obj = null;
try {
stat.addDescription("This is to test the converter sample.");
if (args.length == 3) {
url = args[0];
ctxFactory = args[1];
- jndiName = args[2];
+ jndiName = args[2];
}
if ( (url == null) || (ctxFactory == null) ) {
- testId = "Converter::Sample AppClient";
+ testId = "Converter::Sample AppClient";
// Initialize the Context with default properties
context = new InitialContext();
System.out.println("Default Context Initialized...");
// Create Home object
obj = context.lookup("java:comp/env/ejb/SimpleConverter");
} else {
- testId = "Converter::Sample Standalone-Client";
+ testId = "Converter::Sample Standalone-Client";
Properties env = new Properties();
env.put("java.naming.provider.url", url);
env.put("java.naming.factory.initial", ctxFactory);
@@ -138,7 +138,7 @@
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
} finally {
- stat.printSummary(testId);
+ stat.printSummary(testId);
}
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/application.xml
index dc859fe..a076d61 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/descriptor/application.xml
@@ -23,7 +23,7 @@
<small-icon></small-icon>
<large-icon></large-icon>
</icon>
- <display-name>ConverterApp</display-name>
+ <display-name>ConverterApp</display-name>
<module>
<java>ejb-stateless-converter-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/ejb/ConverterBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/ejb/ConverterBean.java
index c44dddf..cd66f3c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/ejb/ConverterBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/converter/ejb/ConverterBean.java
@@ -35,7 +35,7 @@
* @see ConverterHome
*/
public class ConverterBean implements SessionBean, TimedObject {
-
+
SessionContext sessionContext_;
BigDecimal yenRate = new BigDecimal("121.6000");
@@ -53,7 +53,7 @@
// number of tests is getting large. This set of operations will
// ensure that the timer persistent store is configured properly,
// in addition to exercising some of the common timer functions.
- testTimerService();
+ testTimerService();
BigDecimal result = dollars.multiply(yenRate);
return result.setScale(2,BigDecimal.ROUND_UP);
@@ -88,7 +88,7 @@
* Loads the state of the bean from secondary storage. Required by EJB spec.
*/
public void ejbActivate() {}
-
+
/**
* Keeps the state of the bean to secondary storage. Required by EJB spec.
*/
@@ -139,7 +139,7 @@
e.printStackTrace();
throw new EJBException(e);
}
-
+
try {
sessionContext_.getUserTransaction().begin();
Collection timers = timerService.getTimers();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/build.properties
index c83136a..1d240f2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/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="ejb-stateful"/>
-<property name="assemble"
- value="${build.classes.dir}/archive"/>
+<property name="assemble"\u0020
+ 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="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="appname" value="${module}-persistence"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
-<property name="appclient.jar"
- value="${assemble.dir}/${appname}-client.jar"/>
+<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="appname" value="${module}-persistence"/> \u0020
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
+<property name="appclient.jar"\u0020
+ value="${assemble.dir}/${appname}-client.jar"/> \u0020
<property name="droptables.value" value="true"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/build.xml
index 1fb2009..b91bad3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/build.xml
@@ -35,7 +35,7 @@
<target name="run-test" depends="clean,compile,build,deploy,run,undeploy"/>
<target name="clean" depends="init-common">
- <antcall target="clean-common" />
+ <antcall target="clean-common" />
</target>
<target name="compile" depends="clean">
@@ -47,28 +47,28 @@
</antcall>
<antcall target="compile-common">
<param name="src" value="client"/>
- </antcall>
+ </antcall>
</target>
<target name="build-ejb-jar" depends="init-common" >
<antcall target="ejb-jar-common" >
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Bean*.class,**/*.dbschema,**/*EJB*.class,**/TradeResult.class,**/ProcessingErrorException.class" />
</antcall>
</target>
<target name="build-appclient-ear" depends="init-common">
<antcall target="appclient-jar-common" >
- <param name="appclientjar.classes"
- value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Client*.class,**/TradeResult.class,**/ProcessingErrorException.class" />
+ <param name="appclientjar.classes"
+ value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Client*.class,**/TradeResult.class,**/ProcessingErrorException.class" />
</antcall>
<antcall target="ear-common" />
</target>
-<!--
- Note: The order in which the build targets are called must be so
+<!--
+ Note: The order in which the build targets are called must be so
that the ear is created before the ejb jar.....
- else the ear will package the ejb jar with it
+ else the ear will package the ejb jar with it
-->
<target name="setup"/>
@@ -78,8 +78,8 @@
<!--
<antcall target="build-appclient-ear" />
-->
- <antcall target="build-ejb-jar"/>
- </target>
+ <antcall target="build-ejb-jar"/>
+ </target>
<target name="deploy-ejb-jar" depends="init-common">
<antcall target="deploy-common">
@@ -93,22 +93,22 @@
</target>
<target name="copy-clientjar-restart-server" depends="init-common">
- <copy file="${assemble.dir}/${appname}AppClient.jar"
+ <copy file="${assemble.dir}/${appname}AppClient.jar"
todir="${env.S1AS_HOME}/domains/domain1/server/lib" />
<antcall target="restart-server-instance-common" />
</target>
<target name="deploy" depends="init-common">
- <antcall target="deploy-ejb-jar" />
+ <antcall target="deploy-ejb-jar" />
<!--
- <antcall target="deploy-appclient-ear" />
+ <antcall target="deploy-appclient-ear" />
<antcall target="copy-clientjar-restart-server"/>
-->
</target>
<target name="run-acc" depends="init-common" >
- <antcall target="runclient-common"/>
+ <antcall target="runclient-common"/>
</target>
<target name="run-standalone" depends="init-common">
@@ -130,10 +130,10 @@
</target>
<target name="undeploy" depends="init-common">
- <antcall target="undeploy-common">
- <param name="deployedapp.name" value="${appname}-ejb"/>
- </antcall>
- </target>
+ <antcall target="undeploy-common">
+ <param name="deployedapp.name" value="${appname}-ejb"/>
+ </antcall>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/client/Client.java
index 61c2b2e..d0c2938 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/client/Client.java
@@ -49,16 +49,16 @@
private String url;
private TraderHome home;
- private String testId = null;
+ private String testId = null;
public Client(String url)
throws NamingException {
-
+
this.url = url;
-
+
// home = lookupHome();
}
-
+
public Client () throws javax.naming.NamingException{
// home = lookupHome();
}
@@ -73,27 +73,27 @@
*/
public static void main(String[] args) {
log("\nBeginning statefulSession.Client...\n");
- try{
- Client client = new Client();
- client.run();
- }catch(NamingException ne){
- }
+ try{
+ Client client = new Client();
+ client.run();
+ }catch(NamingException ne){
+ }
}
- public void run(){
+ public void run(){
- testId = "stateful-persistence::Sample Standalone-ejb-jar";
- stat.addDescription("This is to test the persistence sample deploed as an standalone ejb-jar.");
+ testId = "stateful-persistence::Sample Standalone-ejb-jar";
+ stat.addDescription("This is to test the persistence sample deploed as an standalone ejb-jar.");
try {
- home = lookupHome();
+ home = lookupHome();
} catch (NamingException ne) {
- stat.addStatus(testId, stat.FAIL);
+ stat.addStatus(testId, stat.FAIL);
}
try {
example();
- stat.addStatus(testId, stat.PASS);
+ stat.addStatus(testId, stat.PASS);
} catch (Exception e) {
log("There was an exception while creating and using the Trader.");
log("This indicates that there was a problem communicating with the server: "+e);
@@ -111,7 +111,7 @@
public void example()
throws CreateException, RemoteException,RemoveException,ProcessingErrorException
{
- String customerName = "Matt";
+ String customerName = "Matt";
// Create a Trader
log("Creating trader\n");
@@ -157,7 +157,7 @@
Context ctx = null;
-
+
try {
// Initialize the Context with JNDI specific properties
ctx = new InitialContext();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/application.xml
index cbd1cd3..59c369f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/application.xml
@@ -19,7 +19,7 @@
-->
<application>
- <display-name>ConverterApp</display-name>
+ <display-name>ConverterApp</display-name>
<module>
<java>ejb-stateful-persistence-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/ejb-jar.xml
index 6a764f5..c8fae68 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/ejb-jar.xml
@@ -32,13 +32,13 @@
<transaction-type>Container</transaction-type>
<env-entry>
<env-entry-name>BEAS</env-entry-name>
- <env-entry-type>java.lang.Double </env-entry-type>
- <env-entry-value>100.0</env-entry-value>
+ <env-entry-type>java.lang.Double </env-entry-type>
+ <env-entry-value>100.0</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>MSFT</env-entry-name>
- <env-entry-type>java.lang.Double </env-entry-type>
- <env-entry-value>150.0</env-entry-value>
+ <env-entry-type>java.lang.Double </env-entry-type>
+ <env-entry-value>150.0</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
@@ -46,9 +46,9 @@
<container-transaction>
<method>
<ejb-name>statefulSession</ejb-name>
- <method-name>*</method-name>
+ <method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
- </assembly-descriptor>
+ </assembly-descriptor>
</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/sun-ejb-jar.xml
index 9f2f610..cb25794 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/descriptor/sun-ejb-jar.xml
@@ -23,7 +23,7 @@
<unique-id>1</unique-id>
<ejb>
<ejb-name>statefulSession</ejb-name>
- <jndi-name>MyTraderBean</jndi-name>
+ <jndi-name>MyTraderBean</jndi-name>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderBean.java
index 9d46dc3..980c24d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderBean.java
@@ -81,7 +81,7 @@
* This method corresponds to the create method in the home interface
* "TraderHome.java".
* The parameter sets of the two methods are identical. When the client calls
- * <code>TraderHome.create()</code>, the container allocates an instance of
+ * <code>TraderHome.create()</code>, the container allocates an instance of
* the EJBean and calls <code>ejbCreate()</code>.
*
* @exception jakarta.ejb.CreateException
@@ -158,13 +158,13 @@
* @exception examples.ejb20.basic.statefulSession.ProcessingErrorException
* if there is an error while checking the price
*/
- public double getStockPrice(String stockSymbol)
- throws ProcessingErrorException
+ public double getStockPrice(String stockSymbol)
+ throws ProcessingErrorException
{
try {
return ((Double) environment.lookup(stockSymbol)).doubleValue();
} catch (NamingException ne) {
- throw new ProcessingErrorException ("Stock symbol " + stockSymbol +
+ throw new ProcessingErrorException ("Stock symbol " + stockSymbol +
" does not exist");
} catch (NumberFormatException nfe) {
throw new ProcessingErrorException("Invalid price for stock "+stockSymbol);
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderHome.java
index 491bc7c..a7fafa3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderHome.java
@@ -22,6 +22,6 @@
public interface TraderHome extends EJBHome {
-
+
TraderRemote create() throws CreateException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderRemote.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderRemote.java
index b07a116..29d967c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderRemote.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbjar/ejb/TraderRemote.java
@@ -29,7 +29,7 @@
public TradeResult sell(String customerName, String stockSymbol, int shares)
throws ProcessingErrorException, RemoteException;
- public double getBalance()
+ public double getBalance()
throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/build.properties
index 4805582..1230981 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/build.properties
@@ -15,22 +15,22 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="ws"/>
-<property name="appname" value="${module}-ejbtaxcal"/>
+<property name="appname" value="${module}-ejbtaxcal"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.s1peqe.webservices.ejb.taxcal.client.TaxCalClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.webservices.ejb.taxcal.client.TaxCalClient"/>
<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/ejb-jar.xml"/>
<property name="sun-ejb-jar.xml" value="descriptor/ejb/sun-ejb-jar.xml"/>
-<property name="application-client.xml"
- value="descriptor/client/application-client.xml"/>
-<property name="sun-application-client.xml"
- value="descriptor/client/sun-application-client.xml"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="application-client.xml"\u0020
+ value="descriptor/client/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/client/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="wsdl-file" value="wsdl/TaxCalEjbService.wsdl"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/build.xml
index 070bf8c..4f3a93c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/build.xml
@@ -31,7 +31,7 @@
&commonlazyinit;
&testproperties;
- <target name="all"
+ <target name="all"
depends="pre-start, build, setup, deploy, run, undeploy, unsetup"/>
<target name="run-test" depends="clean, build, deploy, run, undeploy"/>
@@ -41,7 +41,7 @@
<target name="setup"/>
<target name="unsetup"/>
-
+
<target name="compile" depends="init-common,clean-common, generate-artifacts">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -52,18 +52,18 @@
</target>
<target name="generate-artifacts">
- <antcall target="import-wsdl">
- <param name="mapping.file"
- value="${ejb-mapping.xml}"/>
- <param name="config-wsdl.file"
- value="config/config-ejb.xml"/>
- </antcall>
- <antcall target="import-wsdl">
- <param name="mapping.file"
- value="${client-mapping.xml}"/>
- <param name="config-wsdl.file"
- value="config/config-client.xml"/>
- </antcall>
+ <antcall target="import-wsdl">
+ <param name="mapping.file"
+ value="${ejb-mapping.xml}"/>
+ <param name="config-wsdl.file"
+ value="config/config-ejb.xml"/>
+ </antcall>
+ <antcall target="import-wsdl">
+ <param name="mapping.file"
+ value="${client-mapping.xml}"/>
+ <param name="config-wsdl.file"
+ value="config/config-client.xml"/>
+ </antcall>
</target>
<target name="ws-package-appclientjar-common">
<mkdir dir="${assemble.dir}"/>
@@ -124,13 +124,13 @@
</target>
<target name="build" depends="init-common,compile">
- <antcall target="ws-package-ejb-jar-common">
- <param name="ejbjar.classes"
+ <antcall target="ws-package-ejb-jar-common">
+ <param name="ejbjar.classes"
value="com/sun/s1peqe/webservices/ejb/taxcal/*.class" />
<param name="ejbjar.files" value="${build.classes.dir}"/>
<param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/>
- </antcall>
- <antcall target="ws-package-appclientjar-common">
+ </antcall>
+ <antcall target="ws-package-appclientjar-common">
<param name="appclientjar.classes"
value="com/sun/s1peqe/webservices/ejb/taxcal/client/*.class" />
<param name="appclientjar.files"
@@ -140,18 +140,18 @@
</antcall>
<antcall target="ear-common"/>
- </target>
+ </target>
<target name="deploy"
depends="init-common, reconfig-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="restart-server"/>
- <property name="statetax-ejb-endpoint-url"
+ <property name="statetax-ejb-endpoint-url"
value="http://${http.host}:${http.port}/statetaxejb"/>
- <property name="fedtax-ejb-endpoint-url"
+ <property name="fedtax-ejb-endpoint-url"
value="http://${http.host}:${http.port}/fedtaxejb"/>
<echo message="property statetax-ejb-endpoint-url is set to: ${statetax-ejb-endpoint-url}"/>
@@ -162,17 +162,17 @@
value="${statetax-ejb-endpoint-url} ${fedtax-ejb-endpoint-url}"/>
</antcall>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
</target>
- <!--
- =======================================================
+ <!--
+ =======================================================
User Defined specific targets
=======================================================
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/client/TaxCalClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/client/TaxCalClient.java
index 5c201a9..5cb5016 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/client/TaxCalClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/client/TaxCalClient.java
@@ -24,91 +24,91 @@
public class TaxCalClient {
- private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
- private static String stateTaxEndpoint = null;
- private static String fedTaxEndpoint = null;
- private static String testSuite = "TaxCalEjbbasedWS";
- private static String testCase = null;
- private static TaxCalEjbService taxCalService = null;
+ private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
+ private static String stateTaxEndpoint = null;
+ private static String fedTaxEndpoint = null;
+ private static String testSuite = "TaxCalEjbbasedWS";
+ private static String testCase = null;
+ private static TaxCalEjbService taxCalService = null;
- public static void main (String[] args) {
+ public static void main (String[] args) {
- if(args[0] == null || args[1] == null){
- System.out.println("TaxCal client: Argument missing. Please provide target" +
- "endpoint address as argument");
- System.exit(1);
- } else {
- stateTaxEndpoint = args[0];
- fedTaxEndpoint = args[1];
- }
+ if(args[0] == null || args[1] == null){
+ System.out.println("TaxCal client: Argument missing. Please provide target" +
+ "endpoint address as argument");
+ System.exit(1);
+ } else {
+ stateTaxEndpoint = args[0];
+ fedTaxEndpoint = args[1];
+ }
- stat.addDescription("This is to test ejb based webservice");
- try {
- TaxCalClient client = new TaxCalClient();
- Context ic = new InitialContext();
- taxCalService = (TaxCalEjbService)
- ic.lookup("java:comp/env/service/TaxCalEjbService");
+ stat.addDescription("This is to test ejb based webservice");
+ try {
+ TaxCalClient client = new TaxCalClient();
+ Context ic = new InitialContext();
+ taxCalService = (TaxCalEjbService)
+ ic.lookup("java:comp/env/service/TaxCalEjbService");
- client.callStateTaxService();
- client.callFedTaxService();
- }catch(Exception e){
- e.printStackTrace();
- }
+ client.callStateTaxService();
+ client.callFedTaxService();
+ }catch(Exception e){
+ e.printStackTrace();
+ }
- stat.printSummary(testSuite);
+ stat.printSummary(testSuite);
}
-
- public void callStateTaxService() {
- double income = 85000.00;
- double deductions = 5000.00;
- //String targetEndpointAddress =
- // "http://localhost:1024/taxcalculator";
+ public void callStateTaxService() {
+ double income = 85000.00;
+ double deductions = 5000.00;
- try {
+ //String targetEndpointAddress =
+ // "http://localhost:1024/taxcalculator";
- StateTaxIF taxCalIFPort = taxCalService.getStateTaxIFPort();
+ try {
- ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
- stateTaxEndpoint);
+ StateTaxIF taxCalIFPort = taxCalService.getStateTaxIFPort();
- double stateTax = taxCalIFPort.getStateTax(income, deductions);
- System.out.println("State tax from ejb based TaxCalService :" + stateTax);
+ ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ stateTaxEndpoint);
- if(stateTax == 24000.00)
- stat.addStatus(testSuite + " StateTaxPort", stat.PASS);
- else
- stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
+ double stateTax = taxCalIFPort.getStateTax(income, deductions);
+ System.out.println("State tax from ejb based TaxCalService :" + stateTax);
- } catch (Exception ex) {
- System.out.println("TaxCalEjbWebservice client failed");
- stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
- ex.printStackTrace();
- }
- }
+ if(stateTax == 24000.00)
+ stat.addStatus(testSuite + " StateTaxPort", stat.PASS);
+ else
+ stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
- public void callFedTaxService() {
- double income = 97000.00;
- double deductions = 7000.00;
- try {
+ } catch (Exception ex) {
+ System.out.println("TaxCalEjbWebservice client failed");
+ stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
+ ex.printStackTrace();
+ }
+ }
- FedTaxIF taxCalIFPort = taxCalService.getFedTaxIFPort();
- ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
- fedTaxEndpoint);
+ public void callFedTaxService() {
+ double income = 97000.00;
+ double deductions = 7000.00;
+ try {
- double fedTax = taxCalIFPort.getFedTax(income, deductions);
- System.out.println("Fed tax from Ejb based TaxCalService :" + fedTax);
+ FedTaxIF taxCalIFPort = taxCalService.getFedTaxIFPort();
+ ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ fedTaxEndpoint);
- if(fedTax == 18000.00)
- stat.addStatus(testSuite + " FedTaxPort", stat.PASS);
- else
- stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
-
- } catch (Exception ex) {
- System.out.println("TaxCalEjbWebService client failed");
- stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
- ex.printStackTrace();
- }
- }
+ double fedTax = taxCalIFPort.getFedTax(income, deductions);
+ System.out.println("Fed tax from Ejb based TaxCalService :" + fedTax);
+
+ if(fedTax == 18000.00)
+ stat.addStatus(testSuite + " FedTaxPort", stat.PASS);
+ else
+ stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
+
+ } catch (Exception ex) {
+ System.out.println("TaxCalEjbWebService client failed");
+ stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
+ ex.printStackTrace();
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-client.xml
index 9fcebd8..d0f7520 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-client.xml
@@ -19,7 +19,7 @@
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <wsdl
+ <wsdl
location="wsdl/TaxCalEjbService.wsdl"
packageName="com.sun.s1peqe.webservices.ejb.taxcal.client"/>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-ejb.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-ejb.xml
index 4420ebd..794bd50 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-ejb.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-ejb.xml
@@ -19,7 +19,7 @@
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <wsdl
+ <wsdl
location="wsdl/TaxCalEjbService.wsdl"
packageName="com.sun.s1peqe.webservices.ejb.taxcal"/>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-sei.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-sei.xml
index a888fe6..4e16610 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-sei.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/config/config-sei.xml
@@ -18,16 +18,16 @@
-->
<configuration
- xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <service name="TaxCalEjbService"
- targetNamespace="http://tax.org/wsdl"
- typeNamespace="http://tax.org/types"
- packageName="com.sun.s1peqe.webservices.ejb.taxcal">
- <interface name="com.sun.s1peqe.webservices.ejb.taxcal.FedTaxIF"
- servantName="com.sun.s1peqe.webservices.ejb.taxcal.FedTaxEjb"/>
- <interface name="com.sun.s1peqe.webservices.ejb.taxcal.StateTaxIF"
- servantName="com.sun.s1peqe.webservices.ejb.taxcal.StateTaxEjb">
- </interface>
- </service>
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service name="TaxCalEjbService"
+ targetNamespace="http://tax.org/wsdl"
+ typeNamespace="http://tax.org/types"
+ packageName="com.sun.s1peqe.webservices.ejb.taxcal">
+ <interface name="com.sun.s1peqe.webservices.ejb.taxcal.FedTaxIF"
+ servantName="com.sun.s1peqe.webservices.ejb.taxcal.FedTaxEjb"/>
+ <interface name="com.sun.s1peqe.webservices.ejb.taxcal.StateTaxIF"
+ servantName="com.sun.s1peqe.webservices.ejb.taxcal.StateTaxEjb">
+ </interface>
+ </service>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/FedTaxEjb.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/FedTaxEjb.java
index f45cb45..edcf25c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/FedTaxEjb.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/FedTaxEjb.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.webservices.ejb.taxcal;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import jakarta.ejb.SessionBean;
import jakarta.ejb.SessionContext;
import jakarta.ejb.EJBException;
@@ -26,11 +26,11 @@
public class FedTaxEjb implements SessionBean {
private SessionContext sc;
-
+
public FedTaxEjb(){}
-
+
public void ejbCreate() throws RemoteException {
- System.out.println("In FedTaxEjb::ejbCreate !!");
+ System.out.println("In FedTaxEjb::ejbCreate !!");
}
public double getFedTax(double income, double deductions) {
@@ -38,13 +38,13 @@
}
public void setSessionContext(SessionContext sc) {
-
+
this.sc = sc;
}
-
+
public void ejbRemove() throws RemoteException {}
-
+
public void ejbActivate() {}
-
+
public void ejbPassivate() {}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/FedTaxIF.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/FedTaxIF.java
index c37b0cc..4decc47 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/FedTaxIF.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/FedTaxIF.java
@@ -22,6 +22,6 @@
public interface FedTaxIF extends Remote{
- public double getFedTax(double income, double deductions) throws RemoteException;
+ public double getFedTax(double income, double deductions) throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/StateTaxEjb.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/StateTaxEjb.java
index 78cea45..3357ecc 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/StateTaxEjb.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/StateTaxEjb.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.webservices.ejb.taxcal;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import jakarta.ejb.SessionBean;
import jakarta.ejb.SessionContext;
import jakarta.ejb.EJBException;
@@ -26,11 +26,11 @@
public class StateTaxEjb implements SessionBean {
private SessionContext sc;
-
+
public StateTaxEjb(){}
-
+
public void ejbCreate() throws RemoteException {
- System.out.println("In StateTaxEjb::ejbCreate !!");
+ System.out.println("In StateTaxEjb::ejbCreate !!");
}
public double getStateTax(double income, double deductions) {
@@ -38,13 +38,13 @@
}
public void setSessionContext(SessionContext sc) {
-
+
this.sc = sc;
}
-
+
public void ejbRemove() throws RemoteException {}
-
+
public void ejbActivate() {}
-
+
public void ejbPassivate() {}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/StateTaxIF.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/StateTaxIF.java
index 2c945f2..26f9463 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/StateTaxIF.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/ejbws/ejb/StateTaxIF.java
@@ -22,6 +22,6 @@
public interface StateTaxIF extends Remote{
- public double getStateTax(double income, double deductions) throws RemoteException;
+ public double getStateTax(double income, double deductions) throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/build.properties
index b80be4c..70655c5 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/build.properties
@@ -15,23 +15,23 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="jms-msgdest-jmsweb"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/application.xml"/>
<property name="sun-application.xml" value="descriptor/sun-application.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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.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="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"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/build.xml
index 7c414cb..13dc318 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/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"/>
@@ -48,28 +48,28 @@
</target>
<target name="build-war">
- <mkdir dir="${assemble.dir}/a/b"/>
- <antcall target="package-war-common">
- <param name="war.classes" value="${build.classes.dir}"/>
- <param name="war.file" value="${assemble.dir}/a/b/${appname}-web.war"/>
- </antcall>
+ <mkdir dir="${assemble.dir}/a/b"/>
+ <antcall target="package-war-common">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/a/b/${appname}-web.war"/>
+ </antcall>
</target>
<target name="build" depends="compile, build-war">
<antcall target="build-ear-common">
- <param name="war.classes"
+ <param name="war.classes"
value="**/*Servlet*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/*Client*.class" />
</antcall>
- <ear earfile="${assemble.dir}/${appname}App.ear" update="true">
- <fileset dir="${assemble.dir}">
- <include name="a/b/*.war"/>
- </fileset>
- </ear>
- </target>
-
- <target name="deploy"
+ <ear earfile="${assemble.dir}/${appname}App.ear" update="true">
+ <fileset dir="${assemble.dir}">
+ <include name="a/b/*.war"/>
+ </fileset>
+ </ear>
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -79,7 +79,7 @@
<param name="asadmin.file" value="create_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="delete-resources" depends="init-common">
<antcall target="asadmin-batch-common">
<param name="asadmin.file" value="delete_resources.asadmin"/>
@@ -92,14 +92,14 @@
<param name="appclient.application.args" value="${http.host} ${http.port}"/>
</antcall>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant create-resources Create all destinations and connection factories
ant delete-resources Delete all destinations and connection factories
</echo>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/client/Client.java
index c52d689..5724f30 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/client/Client.java
@@ -24,7 +24,7 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
public class Client {
-
+
private String host;
private String port;
@@ -35,23 +35,23 @@
host = ( args.length > 0) ? args[0] : "localhost";
port = ( args.length > 1) ? args[1] : "4848";
}
-
+
public static void main(String[] args) {
stat.addDescription("jms-msgdest-jmsweb");
Client client = new Client(args);
client.doTest();
stat.printSummary("jms-msgdest-jmswebID");
}
-
+
public void doTest() {
-
+
String env = null;
try {
- String url = "http://" + host + ":" + port +
+ String url = "http://" + host + ":" + port +
"/jms-msgdest-jmsweb/jmsservlet";
System.out.println("invoking jmsweb servlet at " + url);
int code = invokeServlet(url);
-
+
if(code != 200) {
System.out.println("Incorrect return code: " + code);
stat.addStatus("jmsweb main", stat.FAIL);
@@ -63,15 +63,15 @@
stat.addStatus("jmsweb main", stat.FAIL);
ex.printStackTrace();
}
-
+
return;
-
+
}
private int invokeServlet(String url) throws Exception {
-
+
URL u = new URL(url);
-
+
HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
int code = c1.getResponseCode();
InputStream is = c1.getInputStream();
@@ -84,6 +84,6 @@
}
return code;
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/servlet/JmsServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/servlet/JmsServlet.java
index 44ed0e9..896ad4c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/servlet/JmsServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms-txlookup/servlet/JmsServlet.java
@@ -33,21 +33,21 @@
private QueueConnectionFactory qcFactory;
public void init( ServletConfig config) throws ServletException {
-
+
super.init(config);
System.out.println("In jmsservlet... init()");
}
-
+
public void service ( HttpServletRequest req , HttpServletResponse resp ) throws ServletException, IOException {
-
+
resp.setContentType("text/html");
PrintWriter out = resp.getWriter();
-
+
try {
InitialContext context = new InitialContext();
- UserTransaction userTx = (UserTransaction)
+ UserTransaction userTx = (UserTransaction)
context.lookup("java:comp/UserTransaction");
userTx.begin();
XAQueueConnectionFactory xacf = new com.sun.messaging.XAQueueConnectionFactory();
@@ -80,20 +80,20 @@
out.println("<HTML> <HEAD> <TITLE> JMS Servlet Output </TITLE> </HEAD> <BODY BGCOLOR=white>");
out.println("<CENTER> <FONT size=+1 COLOR=blue>DatabaseServelt :: All information I can give </FONT> </CENTER> <p> " );
- out.println("<FONT size=+1 color=red> Context Path : </FONT> " + req.getContextPath() + "<br>" );
- out.println("<FONT size=+1 color=red> Servlet Path : </FONT> " + req.getServletPath() + "<br>" );
- out.println("<FONT size=+1 color=red> Path Info : </FONT> " + req.getPathInfo() + "<br>" );
+ out.println("<FONT size=+1 color=red> Context Path : </FONT> " + req.getContextPath() + "<br>" );
+ out.println("<FONT size=+1 color=red> Servlet Path : </FONT> " + req.getServletPath() + "<br>" );
+ out.println("<FONT size=+1 color=red> Path Info : </FONT> " + req.getPathInfo() + "<br>" );
out.println("</BODY> </HTML> ");
-
+
}catch (Exception ex) {
ex.printStackTrace();
System.out.println("jmsservlet test failed");
throw new ServletException(ex);
- }
+ }
}
/**
- * Send a message.
+ * Send a message.
*/
public String sendMessage(String msg) throws JMSException {
QueueConnection connection = null;
@@ -143,9 +143,9 @@
} catch(Exception e) {}
}
}
-
+
public void destroy() {
System.out.println("in jmsservlet destroy");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/build.xml
index cdb8ca1..aeffbe1 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/build.xml
@@ -82,16 +82,16 @@
</target>
<target name="usage">
- <echo> Usage:
- ant simple (Executes the simple tests)
- ant all (Executes all the ejb jms1 tests)
- ant clean (cleans all the ejb jms1 tests)
- ant build (builds all the ejb jms1 tests)
- ant setup (sets up all resources for jms1 tests)
- ant deploy (deploys all the ejb jms1 apps)
- ant run (Executes all the ejb jms1 tests)
- ant undeploy (undeploys all the jms1 apps)
- ant unsetup (unsets all resources for jms1 tests)
- </echo>
+ <echo> Usage:
+ ant simple (Executes the simple tests)
+ ant all (Executes all the ejb jms1 tests)
+ ant clean (cleans all the ejb jms1 tests)
+ ant build (builds all the ejb jms1 tests)
+ ant setup (sets up all resources for jms1 tests)
+ ant deploy (deploys all the ejb jms1 apps)
+ ant run (Executes all the ejb jms1 tests)
+ ant undeploy (undeploys all the jms1 apps)
+ ant unsetup (unsets all resources for jms1 tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/build.properties
index 4b0b897..d66eb2a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/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="ejb-mdb"/>
-<property name="appname" value="${module}-simple"/>
+<property name="appname" value="${module}-simple"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.s1peqe.ejb.mdb.simple.client.SimpleMessageClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.ejb.mdb.simple.client.SimpleMessageClient"/>
<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/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/build.xml
index 51e747a..f9546cf 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/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="**/*Bean*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/*Client*.class" />
</antcall>
- </target>
-
+ </target>
+
<target name="setup" depends="init-common">
<antcall target="deploy-jms-common">
<param name="dest.name" value="SampleQueue"/>
@@ -78,15 +78,15 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="restart-server"/>
<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="undeploy-jms-common">
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/client/SimpleMessageClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/client/SimpleMessageClient.java
index 7482436..40307b0 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/client/SimpleMessageClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/client/SimpleMessageClient.java
@@ -21,7 +21,7 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
public class SimpleMessageClient {
-
+
Context jndiContext = null;
QueueConnectionFactory queueConnectionFactory = null;
TopicConnectionFactory topicConnectionFactory = null;
@@ -40,48 +40,48 @@
public static final String TOPIC = "jms/SampleTopic";
final int NUM_MSGS = 3;
private static boolean allDone=false;
-
- private static SimpleReporterAdapter stat =
+
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
-
+
public static void main(String[] args) {
-
+
stat.addDescription("This is to test simple "+
"message driven bean sample.");
SimpleMessageClient client=new SimpleMessageClient();
client.setup();
client.sendMessageToMDB();
client.recvMessage();
- client.printReport();
-
+ client.printReport();
+
}
-
- public Object jndiLookup(String name)
+
+ public Object jndiLookup(String name)
throws NamingException {
Object obj = null;
if (jndiContext == null) {
try {
- jndiContext = new InitialContext();
+ jndiContext = new InitialContext();
} catch (NamingException e) {
System.err.println("Could not create JNDI API " +
- "context: " + e.toString());
+ "context: " + e.toString());
throw e;
}
}
try {
obj = jndiContext.lookup(name);
- } catch (NamingException e) {
- System.err.println("JNDI API lookup failed: " +
+ } catch (NamingException e) {
+ System.err.println("JNDI API lookup failed: " +
e.toString());
throw e;
}
return obj;
}
-
+
public void setup(){
try{
- queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
- queue = (Queue)jndiLookup(QUEUE);
+ queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
+ queue = (Queue)jndiLookup(QUEUE);
topicConnectionFactory=(TopicConnectionFactory)jndiLookup(TOPICCONFAC);
topic=(Topic)jndiLookup(TOPIC);
stat.addStatus("simple mdb jndiLookup", stat.PASS);
@@ -91,21 +91,21 @@
System.out.println("Problem in looking up connection factories");
e.printStackTrace();
}
-
- }
-
-
-
+ }
+
+
+
+
public SimpleMessageClient(){}
-
-
+
+
public void sendMessageToMDB(){
try {
- queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
-
- queue = (Queue)jndiLookup(QUEUE);
-
+ queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
+
+ queue = (Queue)jndiLookup(QUEUE);
+
queueConnection =
queueConnectionFactory.createQueueConnection();
@@ -117,42 +117,42 @@
message.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
//System.out.println("Created durable queue subscriber,persistent delivery mode");
- for (int i = 0; i < NUM_MSGS; i++) {
+ for (int i = 0; i < NUM_MSGS; i++) {
message.setText(MSG_TEXT + (i + 1));
if(i==(NUM_MSGS-1))
message.setStringProperty("MESSAGE_NUM","LAST");
System.out.println("Sending message: " + message.getText());
- queueSender.send(message);
+ queueSender.send(message);
Thread.sleep(1000);
}
- System.out.println("Sent 3 messages,now sleeping");
+ System.out.println("Sent 3 messages,now sleeping");
} catch (Throwable e) {
System.out.println("Exception occurred: " + e.toString());
stat.addStatus("simple mdb main", stat.FAIL);
} finally {
System.out.println("In finally block of send message");
- if (queueConnection !=null){
- try{
- queueConnection.close();
- }catch(JMSException ex){
- ex.printStackTrace();
- }
- }
-
- stat.addStatus("simple mdb sendmessage", stat.PASS);
+ if (queueConnection !=null){
+ try{
+ queueConnection.close();
+ }catch(JMSException ex){
+ ex.printStackTrace();
+ }
+ }
+
+ stat.addStatus("simple mdb sendmessage", stat.PASS);
} // finally
- }
-
+ }
+
public static void printReport(){
if(allDone)
- stat.printSummary("simpleMdbID");
+ stat.printSummary("simpleMdbID");
else
System.out.println("MessageStream from server not finished");
- }
-
-
-
-
+ }
+
+
+
+
public void recvMessage(){
TopicConnection connect=null;
/*
@@ -166,15 +166,15 @@
* Close connection.
*/
System.out.println("********************************");
- System.out.println("inside recvMessage of mdb appclient");
+ System.out.println("inside recvMessage of mdb appclient");
try {
connect = topicConnectionFactory.createTopicConnection();
TopicSession session = connect.createTopicSession(false,0);
- subscriber=session.createSubscriber(topic);
+ subscriber=session.createSubscriber(topic);
System.out.println("Started subscriber");
connect.start();
int msgcount=1;
- while (true) {
+ while (true) {
Message m = subscriber.receive(10000);
System.out.println("Bingo!. got a ack msg back from server");
msgcount++;
@@ -187,7 +187,7 @@
String props=message.getStringProperty("MESSAGE_NUM");
} else {
break;
-
+
}
}
if(msgcount>=3){
@@ -200,7 +200,7 @@
System.out.println("Messages from MDB finished**");
System.out.println("******************");
} catch (JMSException e) {
- System.out.println("Exception occurred: " +
+ System.out.println("Exception occurred: " +
e.toString());
stat.addStatus("simple mdb recvmessage", stat.FAIL);
} catch(Throwable e){
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/ejb/SimpleMessageBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/ejb/SimpleMessageBean.java
index 49924a4..0c8033d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/ejb/SimpleMessageBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms1/simple/ejb/SimpleMessageBean.java
@@ -34,23 +34,23 @@
public static final String TOPICCONFAC = "jms/TCFactory";
public SimpleMessageBean() {
beancount++;
- System.out.println("MESSAGE BEAN:["+beancount+"].SimpleMessageBean()");
+ System.out.println("MESSAGE BEAN:["+beancount+"].SimpleMessageBean()");
}
public void setMessageDrivenContext(MessageDrivenContext mdc) {
System.out.println("In "
+ "MESSAGE BEAN:["+beancount+"].setMessageDrivenContext()");
- this.mdc = mdc;
+ this.mdc = mdc;
try {
jndiContext=new javax.naming.InitialContext();
}catch(Throwable e) {
-
+
System.out.println(e.toString());
}
}
public void ejbCreate() {
- System.out.println("MESSAGE BEAN: SimpleMessageBean.ejbCreate()");
+ System.out.println("MESSAGE BEAN: SimpleMessageBean.ejbCreate()");
}
public void onMessage(Message inMessage) {
@@ -72,32 +72,32 @@
te.printStackTrace();
}
} // onMessage
-
+
public void sendMessage(Message message) {
- System.out.println("MESSAGE BEAN: sendMessage back to appclient");
+ System.out.println("MESSAGE BEAN: sendMessage back to appclient");
try{
-
+
TopicConnectionFactory topicfactory=(TopicConnectionFactory)jndiContext.lookup(TOPICCONFAC);
- Topic topic=(Topic)jndiContext.lookup("java:comp/env/jms/SampleTopic");
-
- TopicConnection
-
+ Topic topic=(Topic)jndiContext.lookup("java:comp/env/jms/SampleTopic");
+
+ TopicConnection
+
connect = topicfactory.createTopicConnection();
-
+
TopicSession session = connect.createTopicSession(false,0);
-
+
TopicPublisher publisher=session.createPublisher(topic);
Thread.sleep(3000);
- publisher.publish(message);
+ publisher.publish(message);
System.out.println("<<Sent Message back to appclient >>");
-
+
}catch(Throwable e) {
System.out.println("!!!!MESSAGE BEAN: sendMessage Exception");
e.printStackTrace();
}
- }
-
-
+ }
+
+
public void ejbRemove() {
System.out.println("In SimpleMessageBean.remove()");
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/build.xml
index 75c2d24..4c40c9a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/build.xml
@@ -82,16 +82,16 @@
</target>
<target name="usage">
- <echo> Usage:
- ant simple (Executes the simple tests)
- ant all (Executes all the ejb jms2 tests)
- ant clean (cleans all the ejb jms2 tests)
- ant build (builds all the ejb jms2 tests)
- ant setup (sets up all resources for jms2 tests)
- ant deploy (deploys all the ejb jms2 apps)
- ant run (Executes all the ejb jms2 tests)
- ant undeploy (undeploys all the jms2 apps)
- ant unsetup (unsets all resources for jms2 tests)
- </echo>
+ <echo> Usage:
+ ant simple (Executes the simple tests)
+ ant all (Executes all the ejb jms2 tests)
+ ant clean (cleans all the ejb jms2 tests)
+ ant build (builds all the ejb jms2 tests)
+ ant setup (sets up all resources for jms2 tests)
+ ant deploy (deploys all the ejb jms2 apps)
+ ant run (Executes all the ejb jms2 tests)
+ ant undeploy (undeploys all the jms2 apps)
+ ant unsetup (unsets all resources for jms2 tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/build.properties
index 4b0b897..d66eb2a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/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="ejb-mdb"/>
-<property name="appname" value="${module}-simple"/>
+<property name="appname" value="${module}-simple"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.s1peqe.ejb.mdb.simple.client.SimpleMessageClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.ejb.mdb.simple.client.SimpleMessageClient"/>
<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/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/build.xml
index 2842772..3822ff3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/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="client"/>
@@ -46,11 +46,11 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/*Client*.class" />
</antcall>
- </target>
-
+ </target>
+
<target name="setup" depends="init-common">
<antcall target="deploy-jms-common">
<param name="dest.name" value="SampleQueue"/>
@@ -65,15 +65,15 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="restart-server"/>
<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="undeploy-jms-common">
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/client/SimpleMessageClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/client/SimpleMessageClient.java
index 1a8d6db..e9eebd2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/client/SimpleMessageClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms2/simple/client/SimpleMessageClient.java
@@ -21,7 +21,7 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
public class SimpleMessageClient {
-
+
Context jndiContext = null;
QueueConnectionFactory queueConnectionFactory = null;
QueueConnection queueConnection = null;
@@ -35,48 +35,48 @@
public static final String QUEUE = "jms/SampleQueue";
final int NUM_MSGS = 3;
private static boolean allDone=false;
-
- private static SimpleReporterAdapter stat =
+
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
-
+
public static void main(String[] args) {
-
+
stat.addDescription("This is to test simple "+
"message driven bean sample.");
SimpleMessageClient client=new SimpleMessageClient();
client.setup();
client.sendMessage();
client.recvMessage();
- client.printReport();
-
+ client.printReport();
+
}
-
- public Object jndiLookup(String name)
+
+ public Object jndiLookup(String name)
throws NamingException {
Object obj = null;
if (jndiContext == null) {
try {
- jndiContext = new InitialContext();
+ jndiContext = new InitialContext();
} catch (NamingException e) {
System.err.println("Could not create JNDI API " +
- "context: " + e.toString());
+ "context: " + e.toString());
throw e;
}
}
try {
obj = jndiContext.lookup(name);
- } catch (NamingException e) {
- System.err.println("JNDI API lookup failed: " +
+ } catch (NamingException e) {
+ System.err.println("JNDI API lookup failed: " +
e.toString());
throw e;
}
return obj;
}
-
+
public void setup(){
try{
- queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
- queue = (Queue)jndiLookup(QUEUE);
+ queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
+ queue = (Queue)jndiLookup(QUEUE);
stat.addStatus("simple mdb jndiLookup", stat.PASS);
}catch(Throwable e)
{
@@ -84,21 +84,21 @@
System.out.println("Problem in looking up connection factories");
e.printStackTrace();
}
-
- }
-
-
-
+ }
+
+
+
+
public SimpleMessageClient(){}
-
-
+
+
public void sendMessage(){
try {
- queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
-
- queue = (Queue)jndiLookup(QUEUE);
-
+ queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
+
+ queue = (Queue)jndiLookup(QUEUE);
+
queueConnection =
queueConnectionFactory.createQueueConnection();
@@ -110,42 +110,42 @@
message.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
//System.out.println("Created durable queue subscriber,persistent delivery mode");
- for (int i = 0; i < NUM_MSGS; i++) {
+ for (int i = 0; i < NUM_MSGS; i++) {
message.setText(MSG_TEXT + (i + 1));
if(i==(NUM_MSGS-1))
message.setStringProperty("MESSAGE_NUM","LAST");
System.out.println("Sending message: " + message.getText());
- queueSender.send(message);
+ queueSender.send(message);
Thread.sleep(1000);
}
- System.out.println("Sent 3 messages,now sleeping");
+ System.out.println("Sent 3 messages,now sleeping");
} catch (Throwable e) {
System.out.println("Exception occurred: " + e.toString());
stat.addStatus("simple mdb main", stat.FAIL);
} finally {
System.out.println("In finally block of send message");
- if (queueConnection !=null){
- try{
- queueConnection.close();
- }catch(JMSException ex){
- ex.printStackTrace();
- }
- }
-
- stat.addStatus("simple mdb sendmessage", stat.PASS);
+ if (queueConnection !=null){
+ try{
+ queueConnection.close();
+ }catch(JMSException ex){
+ ex.printStackTrace();
+ }
+ }
+
+ stat.addStatus("simple mdb sendmessage", stat.PASS);
} // finally
- }
-
+ }
+
public static void printReport(){
if(allDone)
- stat.printSummary("simpleMdbID");
+ stat.printSummary("simpleMdbID");
else
System.out.println("MessageStream from server not finished");
- }
-
-
-
-
+ }
+
+
+
+
public void recvMessage(){
QueueConnection connect=null;
/*
@@ -159,15 +159,15 @@
* Close connection.
*/
System.out.println("********************************");
- System.out.println("inside recvMessage of jms2 appclient");
+ System.out.println("inside recvMessage of jms2 appclient");
try {
connect = queueConnectionFactory.createQueueConnection();
QueueSession session = connect.createQueueSession(false,0);
- receiver=session.createReceiver(queue);
+ receiver=session.createReceiver(queue);
System.out.println("Started Receiver");
connect.start();
int msgcount=1;
- while (true) {
+ while (true) {
Message m = receiver.receive(10000);
System.out.println("Bingo!. got a ack msg back from server");
msgcount++;
@@ -180,7 +180,7 @@
String props=message.getStringProperty("MESSAGE_NUM");
} else {
break;
-
+
}
}
if(msgcount>=3){
@@ -193,7 +193,7 @@
System.out.println("Messages from Queue finished**");
System.out.println("******************");
} catch (JMSException e) {
- System.out.println("Exception occurred: " +
+ System.out.println("Exception occurred: " +
e.toString());
stat.addStatus("simple jms2 recvmessage", stat.FAIL);
} catch(Throwable e){
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/build.xml
index 7179b73..b4813b5 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/build.xml
@@ -82,16 +82,16 @@
</target>
<target name="usage">
- <echo> Usage:
- ant simple (Executes the simple tests)
- ant all (Executes all the ejb jms3 tests)
- ant clean (cleans all the ejb jms3 tests)
- ant build (builds all the ejb jms3 tests)
- ant setup (sets up all resources for jms3 tests)
- ant deploy (deploys all the ejb jms3 apps)
- ant run (Executes all the ejb jms3 tests)
- ant undeploy (undeploys all the jms3 apps)
- ant unsetup (unsets all resources for jms3 tests)
- </echo>
+ <echo> Usage:
+ ant simple (Executes the simple tests)
+ ant all (Executes all the ejb jms3 tests)
+ ant clean (cleans all the ejb jms3 tests)
+ ant build (builds all the ejb jms3 tests)
+ ant setup (sets up all resources for jms3 tests)
+ ant deploy (deploys all the ejb jms3 apps)
+ ant run (Executes all the ejb jms3 tests)
+ ant undeploy (undeploys all the jms3 apps)
+ ant unsetup (unsets all resources for jms3 tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/build.properties
index 4b0b897..d66eb2a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/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="ejb-mdb"/>
-<property name="appname" value="${module}-simple"/>
+<property name="appname" value="${module}-simple"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.s1peqe.ejb.mdb.simple.client.SimpleMessageClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.ejb.mdb.simple.client.SimpleMessageClient"/>
<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/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/build.xml
index 2f8ff05..fe9e67c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/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="client"/>
@@ -47,26 +47,26 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/*Client*.class" />
</antcall>
- </target>
-
+ </target>
+
<target name="setup" depends="init-common">
</target>
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="restart-server"/>
<antcall target="runclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="unsetup" depends="init-common">
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/client/SimpleMessageClient.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/client/SimpleMessageClient.java
index 238d611..ccce69f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/client/SimpleMessageClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jms3/simple/client/SimpleMessageClient.java
@@ -23,7 +23,7 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
public class SimpleMessageClient {
-
+
QueueConnectionFactory queueConnectionFactory = null;
QueueConnection queueConnection = null;
QueueSession queueSession = null;
@@ -34,27 +34,27 @@
final String MSG_TEXT = new String("Here is a client-acknowledge message");
final int NUM_MSGS = 3;
private static boolean allDone=false;
-
- private static SimpleReporterAdapter stat =
+
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
-
+
public static void main(String[] args) {
-
+
stat.addDescription("This is to test simple "+
"message driven bean sample.");
SimpleMessageClient client=new SimpleMessageClient();
client.setup();
client.sendMessage();
client.recvMessage();
- client.printReport();
-
+ client.printReport();
+
}
-
-
+
+
public void setup(){
try{
queueConnectionFactory=new com.sun.messaging.QueueConnectionFactory();
- queue = new com.sun.messaging.Queue();
+ queue = new com.sun.messaging.Queue();
queue.setProperty("imqDestinationName", "new_queue_name");
}catch(Throwable e)
{
@@ -62,18 +62,18 @@
System.out.println("Problem in looking up connection factories");
e.printStackTrace();
}
-
- }
-
-
-
+ }
+
+
+
+
public SimpleMessageClient(){}
-
-
+
+
public void sendMessage(){
try {
-
+
queueConnection =
queueConnectionFactory.createQueueConnection();
@@ -85,42 +85,42 @@
message.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
//System.out.println("Created durable queue subscriber,persistent delivery mode");
- for (int i = 0; i < NUM_MSGS; i++) {
+ for (int i = 0; i < NUM_MSGS; i++) {
message.setText(MSG_TEXT + (i + 1));
if(i==(NUM_MSGS-1))
message.setStringProperty("MESSAGE_NUM","LAST");
System.out.println("Sending message: " + message.getText());
- queueSender.send(message);
+ queueSender.send(message);
Thread.sleep(1000);
}
- System.out.println("Sent 3 messages,now sleeping");
+ System.out.println("Sent 3 messages,now sleeping");
} catch (Throwable e) {
System.out.println("Exception occurred: " + e.toString());
stat.addStatus("simple jms3 main", stat.FAIL);
} finally {
System.out.println("In finally block of send message");
- if (queueConnection !=null){
- try{
- queueConnection.close();
- }catch(JMSException ex){
- ex.printStackTrace();
- }
- }
-
- stat.addStatus("simple jms3 sendmessage", stat.PASS);
+ if (queueConnection !=null){
+ try{
+ queueConnection.close();
+ }catch(JMSException ex){
+ ex.printStackTrace();
+ }
+ }
+
+ stat.addStatus("simple jms3 sendmessage", stat.PASS);
} // finally
- }
-
+ }
+
public static void printReport(){
if(allDone)
- stat.printSummary("simpleMdbID");
+ stat.printSummary("simpleMdbID");
else
System.out.println("MessageStream from server not finished");
- }
-
-
-
-
+ }
+
+
+
+
public void recvMessage(){
QueueConnection connect=null;
/*
@@ -134,15 +134,15 @@
* Close connection.
*/
System.out.println("********************************");
- System.out.println("inside recvMessage of jms3 appclient");
+ System.out.println("inside recvMessage of jms3 appclient");
try {
connect = queueConnectionFactory.createQueueConnection();
QueueSession session = connect.createQueueSession(false,0);
- receiver=session.createReceiver(queue);
+ receiver=session.createReceiver(queue);
System.out.println("Started Receiver");
connect.start();
int msgcount=1;
- while (true) {
+ while (true) {
Message m = receiver.receive(10000);
System.out.println("Bingo!. got a ack msg back from server");
msgcount++;
@@ -155,7 +155,7 @@
String props=message.getStringProperty("MESSAGE_NUM");
} else {
break;
-
+
}
}
if(msgcount>=3){
@@ -168,7 +168,7 @@
System.out.println("Messages from Queue finished**");
System.out.println("******************");
} catch (JMSException e) {
- System.out.println("Exception occurred: " +
+ System.out.println("Exception occurred: " +
e.toString());
stat.addStatus("simple jms3 recvmessage", stat.FAIL);
} catch(Throwable e){
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/build.properties
index b80be4c..70655c5 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/build.properties
@@ -15,23 +15,23 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="jms-msgdest-jmsweb"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/application.xml"/>
<property name="sun-application.xml" value="descriptor/sun-application.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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.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="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"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/build.xml
index ce0cfb8..2af653c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/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"/>
@@ -47,28 +47,28 @@
</target>
<target name="build-war">
- <mkdir dir="${assemble.dir}/a/b"/>
- <antcall target="package-war-common">
- <param name="war.classes" value="${build.classes.dir}"/>
- <param name="war.file" value="${assemble.dir}/a/b/${appname}-web.war"/>
- </antcall>
+ <mkdir dir="${assemble.dir}/a/b"/>
+ <antcall target="package-war-common">
+ <param name="war.classes" value="${build.classes.dir}"/>
+ <param name="war.file" value="${assemble.dir}/a/b/${appname}-web.war"/>
+ </antcall>
</target>
<target name="build" depends="compile, build-war">
<antcall target="build-ear-common">
- <param name="war.classes"
+ <param name="war.classes"
value="**/*Servlet*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/*Client*.class" />
</antcall>
- <ear earfile="${assemble.dir}/${appname}App.ear" update="true">
- <fileset dir="${assemble.dir}">
- <include name="a/b/*.war"/>
- </fileset>
- </ear>
- </target>
-
- <target name="deploy"
+ <ear earfile="${assemble.dir}/${appname}App.ear" update="true">
+ <fileset dir="${assemble.dir}">
+ <include name="a/b/*.war"/>
+ </fileset>
+ </ear>
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -78,7 +78,7 @@
<param name="asadmin.file" value="create_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="delete-resources" depends="init-common">
<antcall target="asadmin-batch-common">
<param name="asadmin.file" value="delete_resources.asadmin"/>
@@ -91,14 +91,14 @@
<param name="appclient.application.args" value="${http.host} ${http.port}"/>
</antcall>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant create-resources Create all destinations and connection factories
ant delete-resources Delete all destinations and connection factories
</echo>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/client/Client.java
index c52d689..5724f30 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/client/Client.java
@@ -24,7 +24,7 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
public class Client {
-
+
private String host;
private String port;
@@ -35,23 +35,23 @@
host = ( args.length > 0) ? args[0] : "localhost";
port = ( args.length > 1) ? args[1] : "4848";
}
-
+
public static void main(String[] args) {
stat.addDescription("jms-msgdest-jmsweb");
Client client = new Client(args);
client.doTest();
stat.printSummary("jms-msgdest-jmswebID");
}
-
+
public void doTest() {
-
+
String env = null;
try {
- String url = "http://" + host + ":" + port +
+ String url = "http://" + host + ":" + port +
"/jms-msgdest-jmsweb/jmsservlet";
System.out.println("invoking jmsweb servlet at " + url);
int code = invokeServlet(url);
-
+
if(code != 200) {
System.out.println("Incorrect return code: " + code);
stat.addStatus("jmsweb main", stat.FAIL);
@@ -63,15 +63,15 @@
stat.addStatus("jmsweb main", stat.FAIL);
ex.printStackTrace();
}
-
+
return;
-
+
}
private int invokeServlet(String url) throws Exception {
-
+
URL u = new URL(url);
-
+
HttpURLConnection c1 = (HttpURLConnection)u.openConnection();
int code = c1.getResponseCode();
InputStream is = c1.getInputStream();
@@ -84,6 +84,6 @@
}
return code;
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/web.xml
index 8193d80..b88e418 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/descriptor/web.xml
@@ -35,7 +35,7 @@
<res-ref-name>jms/MyQueueConnectionFactory</res-ref-name>
<res-type>jakarta.jms.QueueConnectionFactory</res-type>
<res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
+ <res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-env-ref>
<resource-env-ref-name>jms/MyQueue</resource-env-ref-name>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/servlet/JmsServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/servlet/JmsServlet.java
index 5afdbd3..1efa049 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/servlet/JmsServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/jmsweb/servlet/JmsServlet.java
@@ -32,21 +32,21 @@
private QueueConnectionFactory qcFactory;
public void init( ServletConfig config) throws ServletException {
-
+
super.init(config);
System.out.println("In jmsservlet... init()");
}
-
+
public void service ( HttpServletRequest req , HttpServletResponse resp ) throws ServletException, IOException {
-
+
resp.setContentType("text/html");
PrintWriter out = resp.getWriter();
-
+
try {
InitialContext context = new InitialContext();
- UserTransaction userTx = (UserTransaction)
+ UserTransaction userTx = (UserTransaction)
context.lookup("java:comp/UserTransaction");
qcFactory = (QueueConnectionFactory) context.lookup("java:comp/env/jms/MyQueueConnectionFactory");
@@ -66,20 +66,20 @@
out.println("<HTML> <HEAD> <TITLE> JMS Servlet Output </TITLE> </HEAD> <BODY BGCOLOR=white>");
out.println("<CENTER> <FONT size=+1 COLOR=blue>DatabaseServelt :: All information I can give </FONT> </CENTER> <p> " );
- out.println("<FONT size=+1 color=red> Context Path : </FONT> " + req.getContextPath() + "<br>" );
- out.println("<FONT size=+1 color=red> Servlet Path : </FONT> " + req.getServletPath() + "<br>" );
- out.println("<FONT size=+1 color=red> Path Info : </FONT> " + req.getPathInfo() + "<br>" );
+ out.println("<FONT size=+1 color=red> Context Path : </FONT> " + req.getContextPath() + "<br>" );
+ out.println("<FONT size=+1 color=red> Servlet Path : </FONT> " + req.getServletPath() + "<br>" );
+ out.println("<FONT size=+1 color=red> Path Info : </FONT> " + req.getPathInfo() + "<br>" );
out.println("</BODY> </HTML> ");
-
+
}catch (Exception ex) {
ex.printStackTrace();
System.out.println("jmsservlet test failed");
throw new ServletException(ex);
- }
+ }
}
/**
- * Send a message.
+ * Send a message.
*/
public String sendMessage(String msg) throws JMSException {
QueueConnection connection = null;
@@ -129,9 +129,9 @@
} catch(Exception e) {}
}
}
-
+
public void destroy() {
System.out.println("in jmsservlet destroy");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/build.properties
index d7f14a4..334c5e6 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/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="management-mejb"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="management-mejbClient"/>
+<property name="test.client"\u0020
+ value="management-mejbClient"/>
<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="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/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/build.xml
index dcac6a9..4988fda 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/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="client"/>
@@ -46,13 +46,13 @@
<target name="build" depends="compile">
<antcall target="appclient-jar-common">
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/*Client*.class" />
- </antcall>
+ </antcall>
<antcall target="ear-common"/>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -62,10 +62,10 @@
<antcall target="restart-server"/>
<antcall target="runclient-common"/>
</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/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/client/Client.java
index 38112b6..fd8935f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/mbeans1/client/Client.java
@@ -28,105 +28,105 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
public class Client {
-
+
// consts
public static String kTestNotRun = "TEST NOT RUN";
public static String kTestPassed = "TEST PASSED";
public static String kTestFailed = "TEST FAILED";
-
- private static SimpleReporterAdapter stat =
+
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
-
+
public static void main (String[] args) {
stat.addDescription("management-mejb");
Client client = new Client(args);
client.doTest();
stat.printSummary("management-mejb");
}
-
+
public Client (String[] args) {}
public String doTest() {
-
- boolean pass = false;
+
+ boolean pass = false;
String res = kTestNotRun;
-
- try {
-
- String host = "localhost";
- int port = 8686;
- String user = "admin";
- String password = "adminadmin";
- // Get Config info using AMX
- AppserverConnectionSource conn = new AppserverConnectionSource(
- host, port, user, password, null);
+ try {
- DomainRoot domainRoot = conn.getDomainRoot();
+ String host = "localhost";
+ int port = 8686;
+ String user = "admin";
+ String password = "adminadmin";
- DomainConfig config = domainRoot.getDomainConfig();
+ // Get Config info using AMX
+ AppserverConnectionSource conn = new AppserverConnectionSource(
+ host, port, user, password, null);
- Map map = config.getJDBCResourceConfigMap();
- Collection<JDBCResourceConfig> jdbcConfigs =
- (Collection<JDBCResourceConfig>)map.values();
- for ( JDBCResourceConfig jdbcConfig : jdbcConfigs ) {
- System.err.println("JDBC Resource: name = " + jdbcConfig.getName()
- + ", JNDI Name = " + jdbcConfig.getJNDIName()
- + ", Pool Name = " + jdbcConfig.getPoolName());
- System.err.println("\t\tJ2EEType = " + jdbcConfig.getJ2EEType());
+ DomainRoot domainRoot = conn.getDomainRoot();
+
+ DomainConfig config = domainRoot.getDomainConfig();
+
+ Map map = config.getJDBCResourceConfigMap();
+ Collection<JDBCResourceConfig> jdbcConfigs =
+ (Collection<JDBCResourceConfig>)map.values();
+ for ( JDBCResourceConfig jdbcConfig : jdbcConfigs ) {
+ System.err.println("JDBC Resource: name = " + jdbcConfig.getName()
+ + ", JNDI Name = " + jdbcConfig.getJNDIName()
+ + ", Pool Name = " + jdbcConfig.getPoolName());
+ System.err.println("\t\tJ2EEType = " + jdbcConfig.getJ2EEType());
pass = true;
- }
+ }
if (pass == false) {
throw new Exception("No JDBC resources found");
}
pass = false;
- // Get Config info using JMX
- //MBeanServerConnection mbConn = conn.getMBeanServerConnection( false );
- String urls = "service:jmx:rmi:///jndi/rmi://" +
- host + ":" + port + "/management/rmi-jmx-connector";
- JMXServiceURL url = new JMXServiceURL(urls);
- HashMap env = new HashMap();
- env.put(JMXConnector.CREDENTIALS, new String[] { user, password });
- JMXConnector jmxConnector = JMXConnectorFactory.connect(url, env);
- MBeanServerConnection mbConn = jmxConnector.getMBeanServerConnection();
+ // Get Config info using JMX
+ //MBeanServerConnection mbConn = conn.getMBeanServerConnection( false );
+ String urls = "service:jmx:rmi:///jndi/rmi://" +
+ host + ":" + port + "/management/rmi-jmx-connector";
+ JMXServiceURL url = new JMXServiceURL(urls);
+ HashMap env = new HashMap();
+ env.put(JMXConnector.CREDENTIALS, new String[] { user, password });
+ JMXConnector jmxConnector = JMXConnectorFactory.connect(url, env);
+ MBeanServerConnection mbConn = jmxConnector.getMBeanServerConnection();
- //ObjectName objectName =
- // new ObjectName("amx:j2eeType=X-JDBCResourceConfig,*");
- ObjectName objectName = null; // to query all MBeans
- Set mbeans = (Set) mbConn.queryNames(objectName, null);
- Iterator it = mbeans.iterator();
- while ( it.hasNext() ) {
- ObjectName mbean = (ObjectName) it.next();
- System.err.println("Object Name : " + mbean.getCanonicalName());
+ //ObjectName objectName =
+ // new ObjectName("amx:j2eeType=X-JDBCResourceConfig,*");
+ ObjectName objectName = null; // to query all MBeans
+ Set mbeans = (Set) mbConn.queryNames(objectName, null);
+ Iterator it = mbeans.iterator();
+ while ( it.hasNext() ) {
+ ObjectName mbean = (ObjectName) it.next();
+ System.err.println("Object Name : " + mbean.getCanonicalName());
pass = true;
}
if (pass == false) {
throw new Exception("No Mbeans found");
}
-
- } catch(Exception re) {
+
+ } catch(Exception re) {
re.printStackTrace();
res = kTestFailed;
return res;
- }
+ }
- if ( pass ) {
- res = kTestPassed;
- System.out.println("Mbean Test passed");
+ if ( pass ) {
+ res = kTestPassed;
+ System.out.println("Mbean Test passed");
stat.addStatus("Mbean Test", stat.PASS);
- } else {
- res = kTestFailed;
- System.out.println("Mbean Test failed");
+ } else {
+ res = kTestFailed;
+ System.out.println("Mbean Test failed");
stat.addStatus("Mbean Test", stat.FAIL);
- }
+ }
return res;
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/build.properties
index c5c6ac1..065ed88 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/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/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/build.xml
index 2dde385..595cc96 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/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="servlet"/>
@@ -50,13 +50,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"/>
@@ -64,7 +64,7 @@
</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>
@@ -73,21 +73,21 @@
<antcall target="restart-server"/>
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create.sql"/>
- </antcall>
+ </antcall>
<antcall target="runclient-common"/>
</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/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/client/Client.java
index d9ac9ae..c37a1cd 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/client/Client.java
@@ -29,22 +29,22 @@
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();
Client c = new Client();
if (c.doTest()) {
- stat.addStatus(testSuite+" test1 : ", stat.PASS);
+ stat.addStatus(testSuite+" test1 : ", stat.PASS);
} else {
- stat.addStatus(testSuite+" test1 : ", stat.FAIL);
- }
-
- stat.printSummary();
-
+ stat.addStatus(testSuite+" test1 : ", stat.FAIL);
+ }
+
+ stat.printSummary();
+
}
public boolean doTest() throws Exception {
@@ -57,11 +57,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);
if (op.indexOf("PASSED") != -1) {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/servlet/OnlyGetConnectionServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/servlet/OnlyGetConnectionServlet.java
index 9042de1..82c0813 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/servlet/OnlyGetConnectionServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/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/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/sql/create.sql b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/sql/create.sql
index eb9516e..55cfc02 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/onlygetconnectionservlet/sql/create.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/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/v2-tests/appserv-tests/devtests/lazyInit/report.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/report.xml
index 0271520..8b5fc1b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/report.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/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/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/WebTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/WebTest.java
index 1e57a79..0a8cc81 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/WebTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/WebTest.java
@@ -22,10 +22,10 @@
public class WebTest extends Thread
{
-
+
private static int count = 0;
private static int EXPECTED_COUNT = 3;
-
+
static SimpleReporterAdapter stat=
new SimpleReporterAdapter("appserv-tests");
private static final String HOST = "localhost";
@@ -48,24 +48,24 @@
InputStream is = s.getInputStream();
OutputStream os = s.getOutputStream();
int count = 1;
- os.write(count);
-
- while (true) {
+ os.write(count);
+
+ while (true) {
if (count > 10) {
s.close();
break;
}
System.out.println("Count is :" + count);
int i = is.read();
- if (count != i) throw new RuntimeException ("Data Wrong: Expected :" + count + " Obtained:" + i);
- if (count == 5) {
- Thread.sleep(6000);
+ if (count != i) throw new RuntimeException ("Data Wrong: Expected :" + count + " Obtained:" + i);
+ if (count == 5) {
+ Thread.sleep(6000);
count++;
int j = is.read();
if (count != j) throw new RuntimeException ("Data Wrong: Expected :" + count + " Obtained:" + i);
}
os.write(++count);
- }
+ }
} catch (RuntimeException rex) {
rex.printStackTrace();
stat.addStatus("SocketImpl SocketImpl", stat.FAIL);
@@ -81,7 +81,7 @@
// The stat reporter writes out the test info and results
// into the top-level quicklook directory during a run.
-
+
stat.addDescription("Standalone Servlet/Filter war test");
String host = args[0];
@@ -93,7 +93,7 @@
WebTest test = new WebTest();
test.start();
-
+
try {
goGet(host, port, "FILTER", contextRoot + "/ServletTest" );
Thread.sleep(2000);
@@ -105,7 +105,7 @@
if (count != EXPECTED_COUNT){
stat.addStatus("Test standalonewarUNPREDICTED-FAILURE",
stat.FAIL);
- }
+ }
stat.printSummary("web/standalonewar---> expect " + EXPECTED_COUNT);
}
@@ -121,7 +121,7 @@
os.write(("GET " + contextPath + " HTTP/1.1\n").getBytes());
os.write(("Host: localhost\n").getBytes());
os.write("\n".getBytes());
-
+
InputStream is = s.getInputStream();
System.out.println("Time: " + (System.currentTimeMillis() - time));
BufferedReader bis = new BufferedReader(new InputStreamReader(is));
@@ -135,19 +135,19 @@
if (index != -1) {
index = line.indexOf(":");
String status = line.substring(index+1);
-
+
if (status.equalsIgnoreCase("PASS")){
stat.addStatus("web-requestdispatcher: " + line.substring(0,index), stat.PASS);
} else {
- stat.addStatus("web-requestdispatcher: " + line.substring(0,index), stat.FAIL);
+ stat.addStatus("web-requestdispatcher: " + line.substring(0,index), stat.FAIL);
}
count++;
- }
+ }
}
} catch( Exception ex){
- ex.printStackTrace();
+ ex.printStackTrace();
throw new Exception("Test UNPREDICTED-FAILURE");
}
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/build.properties
index 12ef4ba..214c62b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/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="web"/>
-<property name="appname" value="${module}-requestdispatcher"/>
+<property name="appname" value="${module}-requestdispatcher"/> \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="apptype" value="web"/>
+<property name="apptype" value="web"/> \u0020
<property name="web.xml" value="descriptor/web.xml"/>
<property name="sun-web.xml" value="descriptor/sun-web.xml"/>
<property name="contextroot" value="/web-requestdispatcher"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/build.xml
index 9797169..3dafcee 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/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="servlet"/>
@@ -44,10 +44,10 @@
</target>
<target name="build" depends="compile">
- <property name="hasWebclient" value="yes"/>
+ <property name="hasWebclient" value="yes"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
- <param name="webclient.war.classes" value="**/*.class"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
</antcall>
<javac
@@ -55,10 +55,10 @@
classpath="${env.APS_HOME}/lib/reporter.jar"
includes="WebTest.java"/>
- </target>
+ </target>
<target name="build-publish-war" depends="build, publish-war-common" />
-
+
<target name="re-deploy" depends="init-common">
<antcall target="deploy-war-common"/>
</target>
@@ -66,7 +66,7 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-war-common"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="restart-server"/>
<java classname="WebTest">
@@ -79,10 +79,10 @@
</classpath>
</java>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-war-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/descriptor/web.xml
index 6fb56fc..a3251ae 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/descriptor/web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/descriptor/web.xml
@@ -22,37 +22,37 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
-
+
<filter>
<filter-name>FilterTest</filter-name>
<filter-class>test.FilterTest</filter-class>
- </filter>
-
+ </filter>
+
<filter-mapping>
<filter-name>FilterTest</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
- <dispatcher>FORWARD</dispatcher>
- <dispatcher>ERROR</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>ERROR</dispatcher>
</filter-mapping>
-
+
<servlet>
<display-name>ServletTest</display-name>
<servlet-name>ServletTest</servlet-name>
<servlet-class>test.ServletTest</servlet-class>
- </servlet>
+ </servlet>
<servlet>
<display-name>ServletTest2</display-name>
<servlet-name>ServletTest2</servlet-name>
<servlet-class>test.ServletTest2</servlet-class>
- </servlet>
+ </servlet>
<servlet>
<display-name>ServletTest3</display-name>
<servlet-name>ServletTest3</servlet-name>
<servlet-class>test.ServletTest3</servlet-class>
- </servlet>
-
+ </servlet>
+
<servlet-mapping>
<servlet-name>ServletTest</servlet-name>
<url-pattern>/ServletTest</url-pattern>
@@ -65,7 +65,7 @@
<servlet-name>ServletTest3</servlet-name>
<url-pattern>/ServletTest3</url-pattern>
</servlet-mapping>
-
+
<session-config>
<session-timeout>10</session-timeout>
</session-config>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/FilterTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/FilterTest.java
index 8fee4f1..324abb7 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/FilterTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/FilterTest.java
@@ -21,7 +21,7 @@
import java.net.*;
import java.io.*;
public class FilterTest implements Filter{
-
+
private ServletContext context;
private static boolean DEFAULT_REUSE_ADDRESS;
private static int DEFAULT_RECEIVE_BUFFER_SIZE;
@@ -37,11 +37,11 @@
private static boolean tested = false;
-
+
public void destroy() {
System.out.println("[Filter.destroy]");
- }
-
+ }
+
public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws java.io.IOException, jakarta.servlet.ServletException {
System.out.println("[Filter.doFilter]");
@@ -71,15 +71,15 @@
((HttpServletRequest)request).getSession().setAttribute("FILTER", "PASS");
filterChain.doFilter(request, response);
-
- }
-
-
+
+ }
+
+
public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException {
System.out.println("[Filter.init]");
context = filterConfig.getServletContext();
}
-
+
public void test() {
InetSocketAddress isa;
@@ -87,17 +87,17 @@
isa = new InetSocketAddress(InetAddress.getByName(HOST), PORT);
} catch (UnknownHostException ex) {
ex.printStackTrace();
- throw new RuntimeException (ex);
+ throw new RuntimeException (ex);
}
Socket s = new Socket();
- try {
+ try {
s.connect(isa, 1000);
testSocketConnection();
InputStream is = s.getInputStream();
OutputStream os = s.getOutputStream();
int count = 1;
while (true){
- int available = is.available();
+ int available = is.available();
if (available > 0 || count == 6 || count > 10) {
if (count == 6) {
try {
@@ -109,37 +109,37 @@
System.out.println("Expected exception");
ie.printStackTrace();
}
- os.write(count++);
+ os.write(count++);
}
int i = is.read();
- System.out.println(i);
+ System.out.println(i);
if (count != i && count < 11 ) throw new RuntimeException("Wrong Data, Expected : " + count + " Got: "+ i);
- os.write(count++);
+ os.write(count++);
} else {
try {
Thread.sleep(2000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
- }
+ }
}
} catch (IOException ex) {
if (ex instanceof java.net.SocketException) {
System.out.println("Expected Exception");
ex.printStackTrace();
- return;
+ return;
} else {
throw new RuntimeException(ex);
}
- } finally {
+ } finally {
try {
- s.close();
+ s.close();
} catch (IOException ex) {
throw new RuntimeException("Close Failed");
- }
- }
+ }
+ }
}
-
+
private void testSocketConnection() {
try {
Socket s1 = new Socket(InetAddress.getByName(HOST), PORT);
@@ -168,23 +168,23 @@
e.printStackTrace();
}
Socket s = new Socket();
- int rsize = s.getReceiveBufferSize();
+ int rsize = s.getReceiveBufferSize();
s.setReceiveBufferSize(1000);
- s.connect(new InetSocketAddress(InetAddress.getByName(HOST), PORT));
+ s.connect(new InetSocketAddress(InetAddress.getByName(HOST), PORT));
if (s.getChannel() != null ) throw new RuntimeException ("Channel not null");
if (s.getInetAddress().equals(InetAddress.getByName(HOST)) == false ) throw new RuntimeException("Not connected to local address");
- boolean b = s.getKeepAlive();
+ boolean b = s.getKeepAlive();
s.setKeepAlive(! b);
if (s.getKeepAlive() == b) throw new RuntimeException("Keep alive is not set");
- if (s.getLocalAddress().equals(InetAddress.getByName(HOST)) == false ) throw new RuntimeException("Not connected to local address");
+ if (s.getLocalAddress().equals(InetAddress.getByName(HOST)) == false ) throw new RuntimeException("Not connected to local address");
System.out.println("Port : " + s.getLocalPort());
- System.out.println("Port : " + s.getLocalSocketAddress());
- System.out.println("Port : " + s.getPort());
+ System.out.println("Port : " + s.getLocalSocketAddress());
+ System.out.println("Port : " + s.getPort());
b = s.getOOBInline();
s.setOOBInline(! b);
if (s.getOOBInline() == b) throw new RuntimeException("OOB not set");
s.setPerformancePreferences(1000, 100, 100);
-
+
int bs = s.getReceiveBufferSize();
if (bs == rsize ) throw new RuntimeException("RBS not set : " + bs);
b = s.getReuseAddress();
@@ -200,30 +200,30 @@
}
s.setSoTimeout(1000);
if (s.getSoTimeout() != 1000 ) throw new RuntimeException("TIMEOUT not SET");
-
+
b = s.getTcpNoDelay();
s.setTcpNoDelay(! b);
-
+
if (s.getTcpNoDelay() == b) throw new RuntimeException("TCP NO DELAT not SET");
- i = s.getTrafficClass();
-
-
+ i = s.getTrafficClass();
+
+
int j = i +5;
if (j > 250) j = i -5;
int k = s.getTrafficClass();
s.setTrafficClass(j);
int tc = s.getTrafficClass();
- if (tc == k) throw new RuntimeException("TC not set: " + tc);
-
+ if (tc == k) throw new RuntimeException("TC not set: " + tc);
+
s.setSendBufferSize(1000);
s.getSendBufferSize();
} catch (RuntimeException e){
throw e;
} catch (Exception ex) {
ex.printStackTrace();
- throw new RuntimeException("Unwanted exceprtion");
-
- }
-
+ throw new RuntimeException("Unwanted exceprtion");
+
+ }
+
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest.java
index 267f568..c4d41a7 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest.java
@@ -46,13 +46,13 @@
public class ServletTest extends HttpServlet implements HttpSessionListener {
private ServletContext context;
-
+
public void init(ServletConfig config) throws ServletException {
super.init(config);
- System.out.println("[Servlet.init]");
+ System.out.println("[Servlet.init]");
context = config.getServletContext();
System.out.println("[Servlet.init] " + context.getMajorVersion());
-
+
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
@@ -60,23 +60,23 @@
doPost(request, response);
}
- public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("[Servlet.doPost]");
-
+
response.setContentType("text/html");
PrintWriter out = response.getWriter();
-
+
request.getSession().setAttribute("FILTER-REQUEST", request.getSession().getAttribute("FILTER"));
- request.getSession().setAttribute("FILTER", "FAIL");
-
+ request.getSession().setAttribute("FILTER", "FAIL");
+
RequestDispatcher rd = context.getRequestDispatcher("/ServletTest2");
- rd.forward(request, response);
+ rd.forward(request, response);
}
public void sessionCreated(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) {
System.out.println("[Servlet.sessionCreated]");
}
-
+
public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) {
System.out.println("[Servlet.sessionDestroyed]");
System.out.println("Attributes: " + httpSessionEvent.getSession().getAttribute("test"));
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest2.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest2.java
index 846d45d..6136176 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest2.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest2.java
@@ -25,10 +25,10 @@
public class ServletTest2 extends HttpServlet implements HttpSessionListener {
private ServletContext context;
-
+
public void init(ServletConfig config) throws ServletException {
super.init(config);
- System.out.println("[Servlet2.init]");
+ System.out.println("[Servlet2.init]");
context = config.getServletContext();
}
@@ -37,23 +37,23 @@
doPost(request, response);
}
- public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("[Servlet2.doPost]");
-
+
response.setContentType("text/html");
PrintWriter out = response.getWriter();
-
+
request.getSession().setAttribute("FILTER-FORWARD",request.getSession().getAttribute("FILTER"));
- request.getSession().setAttribute("FILTER", "FAIL");
-
+ request.getSession().setAttribute("FILTER", "FAIL");
+
RequestDispatcher rd = request.getRequestDispatcher("/ServletTest3");
- rd.include(request, response);
+ rd.include(request, response);
}
-
+
public void sessionCreated(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) {
System.out.println("[Servlet.sessionCreated]");
}
-
+
public void sessionDestroyed(jakarta.servlet.http.HttpSessionEvent httpSessionEvent) {
System.out.println("[Servlet.sessionDestroyed]");
System.out.println("Attributes: " + httpSessionEvent.getSession().getAttribute("test"));
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest3.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest3.java
index dcc1dba..1f12087 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest3.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/standalonewar/servlet/ServletTest3.java
@@ -46,11 +46,11 @@
public class ServletTest3 extends HttpServlet{
private ServletContext context;
-
+
public void init(ServletConfig config) throws ServletException {
super.init(config);
- System.out.println("[Servlet3.init]");
- context = config.getServletContext();
+ System.out.println("[Servlet3.init]");
+ context = config.getServletContext();
}
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
@@ -58,12 +58,12 @@
doPost(request, response);
}
- public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("[Servlet3.doPost]");
-
+
response.setContentType("text/html");
PrintWriter out = response.getWriter();
-
+
out.println("FILTER-REQUEST:" + request.getSession().getAttribute("FILTER-REQUEST"));
out.println("FILTER-FORWARD:" + request.getSession().getAttribute("FILTER-FORWARD"));
out.println("FILTER-INCLUDE:" + request.getSession().getAttribute("FILTER"));
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/build.properties
index 88836a2..4c33a60 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/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="ejb-timer-restore"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<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/v2-tests/appserv-tests/devtests/lazyInit/timer/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/build.xml
index 4630104..cba9ac8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/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,14 +47,14 @@
<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="**/*Client*.class" />
</antcall>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -64,7 +64,7 @@
<param name="asadmin.file" value="create_resources.asadmin"/>
</antcall>
</target>
-
+
<target name="delete-resources" depends="init-common">
<antcall target="asadmin-batch-common">
<param name="asadmin.file" value="delete_resources.asadmin"/>
@@ -79,14 +79,14 @@
<param name="appclient.application.args" value="restore"/>
</antcall>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
- <echo>
+ <echo>
ant create-resources Create all destinations and connection factories
ant delete-resources Delete all destinations and connection factories
</echo>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/client/Client.java
index b6d8ef8..e39fc68 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/client/Client.java
@@ -31,9 +31,9 @@
public static String kTestNotRun = "TEST NOT RUN";
public static String kTestPassed = "TEST PASSED";
public static String kTestFailed = "TEST FAILED";
-
-
- private static SimpleReporterAdapter stat =
+
+
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
String jndiName = "ejb/ejb_timer_sessiontimer_TimerSession";
@@ -55,12 +55,12 @@
if( args.length == 1) {
afterRestart = args[0].equalsIgnoreCase("restore");
- }
+ }
}
public String doTest() {
String result = kTestPassed;
- QueueConnection connection = null;
+ QueueConnection connection = null;
TimerSession remoteObj = null;
String testName = jndiName;
@@ -68,18 +68,18 @@
try {
Context ic = new InitialContext();
-
+
System.out.println("Looking up ejb ref " + ejbName);
System.out.println("Doing timer test for " + jndiName);
java.lang.Object objref = ic.lookup("java:comp/env/" + ejbName);
- System.out.println("---ejb stub---" +
+ System.out.println("---ejb stub---" +
objref.getClass().getClassLoader());
- System.out.println("---ejb classname---" +
+ System.out.println("---ejb classname---" +
objref.getClass().getName());
- System.out.println("---TimerSessionHome---" +
+ System.out.println("---TimerSessionHome---" +
TimerSessionHome.class.getClassLoader());
System.err.println("Looked up home!!");
@@ -87,7 +87,7 @@
TimerSessionHome home = (TimerSessionHome)
PortableRemoteObject.narrow(objref, TimerSessionHome.class);
-
+
remoteObj = home.create();
String otherServer1 = "foo";
@@ -96,59 +96,59 @@
testName = "afterRestart";
System.out.println("Migrating timers from " + otherServer1);
remoteObj.migrateTimersFrom(otherServer1);
-
+
} else {
remoteObj.createTimer(5000, 0, "timer1");
remoteObj.createTimer(30000, 0, "timer2");
remoteObj.createTimer(60000000, 0, "timer3");
remoteObj.createTimer(5000, 12000, "timer4");
remoteObj.createTimer(5000, 30000, "timer5");
- remoteObj.createTimer(5000, 100000000, "timer6");
-
+ remoteObj.createTimer(5000, 100000000, "timer6");
+
// simulate creation of timers within another server
// instance. none of these should timeout until we
// do a migration
-
+
remoteObj.createTimerInOtherServer
(otherServer1, "other_timer7",
- 1000, 0,
+ 1000, 0,
"other_timer7");
remoteObj.createTimerInOtherServer
(otherServer1, "other_timer8",
- 10000000000L, 0,
- "other_timer8");
-
+ 10000000000L, 0,
+ "other_timer8");
+
remoteObj.createTimerInOtherServer
(otherServer1, "other_timer9",
- 1000, 10000000000L,
+ 1000, 10000000000L,
"other_timer9");
remoteObj.createTimerInOtherServer
(otherServer1, "other_timer10",
- 100000000, 1000,
+ 100000000, 1000,
"other_timer10");
remoteObj.createTimerInOtherServer
(otherServer1, "other_timer11",
- 30000, 100000000,
+ 30000, 100000000,
"other_timer11");
// create a couple of timers for another simulated
// server. we will not be migrating these timers, so
// by verifying that we don't get notifications from these
// timers we test that the migration only happens for
- // the specified server.
+ // the specified server.
remoteObj.createTimerInOtherServer
("bar", "bar_timer12", 1000, 0, "bar_timer12");
remoteObj.createTimerInOtherServer
("bar", "bar_timer13", 1000, 1000, "bar_timer13");
-
+
}
-
+
QueueConnectionFactory qcFactory = (QueueConnectionFactory)
ic.lookup("java:comp/env/jms/MyQueueConnectionFactory");
System.out.println (" qcFactory = " + qcFactory);
@@ -157,7 +157,7 @@
System.out.println (" queue = " + queue);
connection = qcFactory.createQueueConnection();
- QueueSession session =
+ QueueSession session =
connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
QueueReceiver receiver = session.createReceiver(queue);
connection.start();
@@ -167,7 +167,7 @@
if( afterRestart ) {
toReceive.add("timer2");
toReceive.add("timer4");
- toReceive.add("timer5");
+ toReceive.add("timer5");
// migrated timers
toReceive.add("other_timer7");
@@ -181,41 +181,41 @@
toReceive.add("timer6");
}
- long waitTime = afterRestart ?
+ long waitTime = afterRestart ?
40000 : 10000;
-
+
while(true) {
System.out.println("Waiting for message");
Message message = receiver.receive(waitTime);
TextMessage textMsg = (TextMessage)message;
-
- if ( (message == null) ||
- (
- (! toReceive.contains(textMsg.getText()) ) &&
- (! received.contains(textMsg.getText()) )
- )
+
+ if ( (message == null) ||
+ (
+ (! toReceive.contains(textMsg.getText()) ) &&
+ (! received.contains(textMsg.getText()) )
+ )
) {
- throw new Exception("Received a invalid message " +
+ throw new Exception("Received a invalid message " +
message + " TimeOut failed!!");
- }
+ }
received.add(textMsg.getText());
toReceive.remove(textMsg.getText());
- System.out.println("Received Message : " +
+ System.out.println("Received Message : " +
textMsg.getText());
- System.out.println("Messages received so far : " +
- received);
+ System.out.println("Messages received so far : " +
+ received);
if( toReceive.size() == 0 ) {
System.out.println("Got all expected messages");
break;
}
}
-
+
stat.addStatus("sessiontimer " + testName, stat.PASS);
if( afterRestart ) {
remoteObj.deleteTimers();
- }
+ }
} catch(Exception e) {
System.out.println("TimerSession : " + testName + " test failed");
e.printStackTrace();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSession.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSession.java
index 8276e66..8d8d0fb 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSession.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSession.java
@@ -27,7 +27,7 @@
public void migrateTimersFrom(String owner) throws RemoteException;
- public void createTimerInOtherServer(String owner, String timerId,
+ public void createTimerInOtherServer(String owner, String timerId,
long initialExpiration,
long intervalDuration, String info)
throws RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSessionEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSessionEJB.java
index d434929..b54fedd 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSessionEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSessionEJB.java
@@ -39,35 +39,35 @@
import com.sun.ejb.containers.TimerBean;
-public class TimerSessionEJB implements TimedObject, SessionBean
+public class TimerSessionEJB implements TimedObject, SessionBean
{
private SessionContext context;
private QueueConnection connection;
private QueueSession session;
private Queue queue;
private QueueSender sender;
-
+
public void ejbCreate() throws RemoteException {}
-
+
public void ejbRemove() throws RemoteException {}
-
+
public void setSessionContext(SessionContext sc) {
context = sc;
}
-
-
+
+
// business method to create a timer
public TimerHandle createTimer(long initialDelay, long interval,
String msg) {
-
+
try {
System.out.println("Calling getMessageContext");
context.getMessageContext();
} catch(IllegalStateException ise) {
System.out.println("getMessageContext() successfully threw illegalStateException");
}
-
-
+
+
TimerService timerService = context.getTimerService();
Timer timer;
if( interval == 0 ) {
@@ -78,15 +78,15 @@
}
return timer.getHandle();
}
-
- public void createTimerInOtherServer(String owner, String timerId,
+
+ public void createTimerInOtherServer(String owner, String timerId,
long initialExpiration,
long intervalDuration, String info) {
try {
Date now = new Date();
- TimerBean.testCreate(timerId, context, owner,
- new Date(now.getTime() + initialExpiration),
+ TimerBean.testCreate(timerId, context, owner,
+ new Date(now.getTime() + initialExpiration),
intervalDuration,
info);
} catch(Exception e) {
@@ -97,7 +97,7 @@
}
public void migrateTimersFrom(String owner) {
-
+
TimerBean.testMigrate(owner);
}
@@ -115,31 +115,31 @@
// timer callback method
public void ejbTimeout(Timer timer) {
-
+
String info = (String) timer.getInfo();
System.out.println("Got ejbTimeout for timer " + info);
-
+
try {
System.out.println("Calling getMessageContext");
context.getMessageContext();
} catch(IllegalStateException ise) {
System.out.println("getMessageContext() successfully threw illegalStateException");
}
-
-
+
+
// add message to queue
try {
-
-
+
+
InitialContext ic = new InitialContext();
QueueConnectionFactory qcFactory = (QueueConnectionFactory)
ic.lookup("java:comp/env/jms/MyQueueConnectionFactory");
Queue queue = (Queue) ic.lookup("java:comp/env/jms/MyQueue");
connection = qcFactory.createQueueConnection();
-
+
QueueSession session = connection.createQueueSession(true, Session.AUTO_ACKNOWLEDGE);
sender = session.createSender(queue);
-
+
TextMessage message = session.createTextMessage();
message.setText(info);
System.out.println("Sending time out message");
@@ -161,7 +161,7 @@
}
}
}
-
+
public void ejbActivate() {}
public void ejbPassivate() {}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSessionHome.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSessionHome.java
index 097a0e0..b1712e9 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSessionHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/timer/ejb/TimerSessionHome.java
@@ -21,5 +21,5 @@
import jakarta.ejb.CreateException;
public interface TimerSessionHome extends EJBHome {
- TimerSession create() throws CreateException, RemoteException;
+ TimerSession create() throws CreateException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/build.properties
index e2cc75d..dc19c9b 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/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="web"/>
-<property name="appname" value="${module}-subclassing"/>
+<property name="appname" value="${module}-subclassing"/> \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="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.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="subclassing"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/build.xml
index b7691cf..329239a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/build.xml
@@ -30,14 +30,14 @@
&commonBuild;
&commonlazyinit;
&testproperties;
-
+
<target name="all" depends="pre-start,build,setup,deploy-ear, run-ear, undeploy-ear, unsetup"/>
<target name="run-test" depends="build,deploy-ear, run-ear, undeploy-ear"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<target name="setup">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/simpleBank.sql"/>
@@ -45,9 +45,9 @@
<antcall target="deploy-jdbc-common">
<param name="jdbc.conpool.name" value="ejb-subclassing-pool"/>
<param name="jdbc.resource.name" value="jdbc/ejb-subclassing"/>
- </antcall>
+ </antcall>
</target>
-
+
<target name="unsetup">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/dropBankTables.sql"/>
@@ -58,7 +58,7 @@
<param name="jdbc.resource.name" value="jdbc/ejb-subclassing"/>
</antcall>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -69,18 +69,18 @@
</target>
<target name="build" depends="compile">
- <property name="hasWebclient" value="yes"/>
+ <property name="hasWebclient" value="yes"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
- <param name="webclient.war.classes" value="**/*.class"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
</antcall>
-
+
<antcall target="ejb-jar-common">
<param name="ejbjar.classes" value="**/*.class"/>
</antcall>
<antcall target="ear-common"/>
- </target>
-
+ </target>
+
<target name="deploy-ear" depends="init-common">
<antcall target="deploy-verify-common"/>
</target>
@@ -88,27 +88,27 @@
<target name="deploy-war" depends="init-common">
<antcall target="deploy-war-common"/>
</target>
-
+
<target name="run-war" depends="init-common">
<antcall target="runwebclient-common">
- <param name="testsuite.id" value="web-to-ejb (stand-alone war based)"/>
- </antcall>
+ <param name="testsuite.id" value="web-to-ejb (stand-alone war based)"/>
+ </antcall>
</target>
<target name="run-ear" depends="init-common">
<antcall target="restart-server"/>
<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-ear" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="undeploy-war" depends="init-common">
<antcall target="undeploy-war-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/sun-ejb-jar.xml
index 7d86af5..39cba88 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/descriptor/sun-ejb-jar.xml
@@ -29,20 +29,20 @@
<res-ref-name>jdbc/SimpleBank</res-ref-name>
<jndi-name>jdbc/ejb-subclassing</jndi-name>
</resource-ref>
- <is-read-only-bean>false</is-read-only-bean>
- <commit-option>B</commit-option>
- <bean-pool>
- <steady-pool-size>0</steady-pool-size>
- <resize-quantity>1</resize-quantity>
- <max-pool-size>10</max-pool-size>
- <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
- </bean-pool>
- <bean-cache>
- <max-cache-size>100</max-cache-size>
- <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
- <victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ <is-read-only-bean>false</is-read-only-bean>
+ <commit-option>B</commit-option>
+ <bean-pool>
+ <steady-pool-size>0</steady-pool-size>
+ <resize-quantity>1</resize-quantity>
+ <max-pool-size>10</max-pool-size>
+ <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
+ </bean-pool>
+ <bean-cache>
+ <max-cache-size>100</max-cache-size>
+ <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
+ <victim-selection-policy>LRU</victim-selection-policy>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>CustomerCheckingEJB</ejb-name>
@@ -51,20 +51,20 @@
<res-ref-name>jdbc/SimpleBank</res-ref-name>
<jndi-name>jdbc/ejb-subclassing</jndi-name>
</resource-ref>
- <is-read-only-bean>false</is-read-only-bean>
- <commit-option>B</commit-option>
- <bean-pool>
- <steady-pool-size>0</steady-pool-size>
- <resize-quantity>1</resize-quantity>
- <max-pool-size>10</max-pool-size>
+ <is-read-only-bean>false</is-read-only-bean>
+ <commit-option>B</commit-option>
+ <bean-pool>
+ <steady-pool-size>0</steady-pool-size>
+ <resize-quantity>1</resize-quantity>
+ <max-pool-size>10</max-pool-size>
<pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
- </bean-pool>
- <bean-cache>
+ </bean-pool>
+ <bean-cache>
<max-cache-size>100</max-cache-size>
<cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
<removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ </bean-cache>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/Customer.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/Customer.java
index d190dab..d1fb286 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/Customer.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/Customer.java
@@ -46,4 +46,4 @@
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerChecking.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerChecking.java
index c607812..e3659e5 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerChecking.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerChecking.java
@@ -22,4 +22,4 @@
{
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerCheckingEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerCheckingEJB.java
index 4c60179..d93fda4 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerCheckingEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerCheckingEJB.java
@@ -94,5 +94,5 @@
}
}
-
-
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerEJB.java
index ec56481..75a8ebf 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerEJB.java
@@ -53,7 +53,7 @@
public String getAddress1()
{
- return address1;
+ return address1;
}
public String getAddress2()
@@ -139,7 +139,7 @@
System.out.println("SQL exception occured in ejbRemove method");
e.printStackTrace();
}
-
+
}
public void ejbStore()
@@ -206,12 +206,12 @@
} catch (SQLException e) {
System.out.println("SQLException occurred in ejbLoad() method");
e.printStackTrace();
- }
+ }
}
public void ejbActivate() {}
public void ejbPassivate() {}
}
-
-
-
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavings.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavings.java
index eea3192..7c0ae6b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavings.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavings.java
@@ -22,4 +22,4 @@
{
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavingsEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavingsEJB.java
index fb87195..691ea4e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavingsEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/ejb/CustomerSavingsEJB.java
@@ -95,6 +95,6 @@
}
}
-
-
-
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/Customer.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/Customer.java
index 0b2bcde..33903e0 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/Customer.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/Customer.java
@@ -40,4 +40,4 @@
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerChecking.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerChecking.java
index 8a1a39d..b8d6fb5 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerChecking.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerChecking.java
@@ -16,4 +16,4 @@
{
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerCheckingEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerCheckingEJB.java
index 09816dd..abcc337 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerCheckingEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerCheckingEJB.java
@@ -88,5 +88,5 @@
}
}
-
-
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerEJB.java
index 44339d5..6569ccb 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerEJB.java
@@ -47,7 +47,7 @@
public String getAddress1()
{
- return address1;
+ return address1;
}
public String getAddress2()
@@ -133,7 +133,7 @@
System.out.println("SQL exception occured in ejbRemove method");
e.printStackTrace();
}
-
+
}
public void ejbStore()
@@ -200,12 +200,12 @@
} catch (SQLException e) {
System.out.println("SQLException occurred in ejbLoad() method");
e.printStackTrace();
- }
+ }
}
public void ejbActivate() {}
public void ejbPassivate() {}
}
-
-
-
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavings.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavings.java
index d27d99c..bcc2538 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavings.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavings.java
@@ -16,4 +16,4 @@
{
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavingsEJB.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavingsEJB.java
index f3bcaa8..c23bdd8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavingsEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/ejb/CustomerSavingsEJB.java
@@ -89,6 +89,6 @@
}
}
-
-
-
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/servlet/SimpleBankServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/servlet/SimpleBankServlet.java
index 059943e..7470093 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/servlet/SimpleBankServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/samples/ejb/subclassing/servlet/SimpleBankServlet.java
@@ -11,16 +11,16 @@
package samples.ejb.subclassing.servlet;
import java.io.*;
-import java.util.*;
-import jakarta.servlet.*;
-import javax.naming.*;
-import jakarta.servlet.http.*;
+import java.util.*;
+import jakarta.servlet.*;
+import javax.naming.*;
+import jakarta.servlet.http.*;
import javax.rmi.PortableRemoteObject;
-import jakarta.ejb.*;
+import jakarta.ejb.*;
-import samples.ejb.subclassing.ejb.*;
+import samples.ejb.subclassing.ejb.*;
-public class SimpleBankServlet extends HttpServlet {
+public class SimpleBankServlet extends HttpServlet {
InitialContext initContext = null;
@@ -37,14 +37,14 @@
doLookup();
}
- public void doGet (HttpServletRequest request,HttpServletResponse response)
- throws ServletException, IOException {
+ public void doGet (HttpServletRequest request,HttpServletResponse response)
+ throws ServletException, IOException {
doPost(request, response);
- }
+ }
- /** handles the HTTP POST operation **/
- public void doPost (HttpServletRequest request,HttpServletResponse response)
- throws ServletException, IOException {
+ /** handles the HTTP POST operation **/
+ public void doPost (HttpServletRequest request,HttpServletResponse response)
+ throws ServletException, IOException {
System.out.println("SimpleBankServlet is executing");
String SSN = request.getParameter("SSN");
@@ -59,14 +59,14 @@
String zipCode = "";
long currentSavingsBalance = 0;
long currentCheckingBalance = 0;
-
+
String action = request.getParameter("action");
if (action.equals("Create"))
{
message = "Add Customer";
jsp = "/SimpleBankAdd.jsp";
}
- else if (action.equals("Add Customer"))
+ else if (action.equals("Add Customer"))
{
System.out.println("Add Customer button pressed");
SSN = request.getParameter("SSN");
@@ -121,7 +121,7 @@
}
message = "Customer Deleted.";
jsp = "/SimpleBankMessage.jsp";
- }
+ }
else if (action.equals("Update"))
@@ -198,7 +198,7 @@
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(jsp);
dispatcher.include(request, response);
return;
- }
+ }
public void doLookup()
{
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/servlet/SimpleBankServlet.java b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/servlet/SimpleBankServlet.java
index 0919514..070d5fe 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/servlet/SimpleBankServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/servlet/SimpleBankServlet.java
@@ -17,16 +17,16 @@
package samples.ejb.subclassing.servlet;
import java.io.*;
-import java.util.*;
-import jakarta.servlet.*;
-import javax.naming.*;
-import jakarta.servlet.http.*;
+import java.util.*;
+import jakarta.servlet.*;
+import javax.naming.*;
+import jakarta.servlet.http.*;
import javax.rmi.PortableRemoteObject;
-import jakarta.ejb.*;
+import jakarta.ejb.*;
-import samples.ejb.subclassing.ejb.*;
+import samples.ejb.subclassing.ejb.*;
-public class SimpleBankServlet extends HttpServlet {
+public class SimpleBankServlet extends HttpServlet {
InitialContext initContext = null;
@@ -43,14 +43,14 @@
doLookup();
}
- public void doGet (HttpServletRequest request,HttpServletResponse response)
- throws ServletException, IOException {
+ public void doGet (HttpServletRequest request,HttpServletResponse response)
+ throws ServletException, IOException {
doPost(request, response);
- }
+ }
- /** handles the HTTP POST operation **/
- public void doPost (HttpServletRequest request,HttpServletResponse response)
- throws ServletException, IOException {
+ /** handles the HTTP POST operation **/
+ public void doPost (HttpServletRequest request,HttpServletResponse response)
+ throws ServletException, IOException {
System.out.println("SimpleBankServlet is executing");
String SSN = request.getParameter("SSN");
@@ -65,14 +65,14 @@
String zipCode = "";
long currentSavingsBalance = 0;
long currentCheckingBalance = 0;
-
+
String action = request.getParameter("action");
if (action.equals("Create"))
{
message = "Add Customer";
jsp = "/SimpleBankAdd.jsp";
}
- else if (action.equals("Add Customer"))
+ else if (action.equals("Add Customer"))
{
System.out.println("Add Customer button pressed");
SSN = request.getParameter("SSN");
@@ -127,7 +127,7 @@
}
message = "Customer Deleted.";
jsp = "/SimpleBankMessage.jsp";
- }
+ }
else if (action.equals("Update"))
@@ -204,7 +204,7 @@
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(jsp);
dispatcher.include(request, response);
return;
- }
+ }
public void doLookup()
{
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sql/dropBankTables.sql b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sql/dropBankTables.sql
index df9df34..33a7069 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sql/dropBankTables.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sql/dropBankTables.sql
@@ -1 +1 @@
-drop table customer2;
+drop table customer2;
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sql/simpleBank.sql b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sql/simpleBank.sql
index 6ef75c3..e17aef4 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sql/simpleBank.sql
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sql/simpleBank.sql
@@ -1,14 +1,14 @@
drop table customer2;
create table customer2 (
- SSN varchar2(9),
- lastNAme varchar2(20),
- firstname varchar2(20),
- address1 varchar2 (20),
- address2 varchar2(20),
- city varchar2(10),
- state varchar2(10),
- zipcode varchar2(5),
+ SSN varchar2(9),
+ lastNAme varchar2(20),
+ firstname varchar2(20),
+ address1 varchar2 (20),
+ address2 varchar2(20),
+ city varchar2(10),
+ state varchar2(10),
+ zipcode varchar2(5),
savingsbalance number(10) ,
checkingbalance number(10) );
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sun-ejb-jar.xml
index e0ad088..0d2847a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/lazyInit/webear/sun-ejb-jar.xml
@@ -29,20 +29,20 @@
<res-ref-name>jdbc/SimpleBank</res-ref-name>
<jndi-name>jdbc/ejb-subclassing</jndi-name>
</resource-ref>
- <is-read-only-bean>false</is-read-only-bean>
- <commit-option>B</commit-option>
- <bean-pool>
- <steady-pool-size>0</steady-pool-size>
- <resize-quantity>1</resize-quantity>
- <max-pool-size>10</max-pool-size>
- <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
- </bean-pool>
- <bean-cache>
- <max-cache-size>100</max-cache-size>
- <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
- <victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ <is-read-only-bean>false</is-read-only-bean>
+ <commit-option>B</commit-option>
+ <bean-pool>
+ <steady-pool-size>0</steady-pool-size>
+ <resize-quantity>1</resize-quantity>
+ <max-pool-size>10</max-pool-size>
+ <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
+ </bean-pool>
+ <bean-cache>
+ <max-cache-size>100</max-cache-size>
+ <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
+ <victim-selection-policy>LRU</victim-selection-policy>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>CustomerCheckingEJB</ejb-name>
@@ -51,20 +51,20 @@
<res-ref-name>jdbc/SimpleBank</res-ref-name>
<jndi-name>jdbc/ejb-subclassing</jndi-name>
</resource-ref>
- <is-read-only-bean>false</is-read-only-bean>
- <commit-option>B</commit-option>
- <bean-pool>
- <steady-pool-size>0</steady-pool-size>
- <resize-quantity>1</resize-quantity>
- <max-pool-size>10</max-pool-size>
+ <is-read-only-bean>false</is-read-only-bean>
+ <commit-option>B</commit-option>
+ <bean-pool>
+ <steady-pool-size>0</steady-pool-size>
+ <resize-quantity>1</resize-quantity>
+ <max-pool-size>10</max-pool-size>
<pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
- </bean-pool>
- <bean-cache>
+ </bean-pool>
+ <bean-cache>
<max-cache-size>100</max-cache-size>
<cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
<removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ </bean-cache>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/build.xml
index be211d7..fdbc281 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/build.xml
@@ -39,10 +39,10 @@
</target>
<target name="usage">
- <echo>
- Usage:
- ant readonly (Executes the ejb-cmp-readonly test)
- ant all (Executes all the ejb-cmp tests)
- </echo>
+ <echo>
+ Usage:
+ ant readonly (Executes the ejb-cmp-readonly test)
+ ant all (Executes all the ejb-cmp tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/build.properties
index 3310bb0..fa6cd8e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/build.properties
@@ -15,23 +15,23 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="persistence-annotation-ejb30"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<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="persistence-orm.xml" value="descriptor/persistence-orm.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/persistence-annotation-ejb30App_persistence-annotation-ejb30-ejb.dbschema"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/build.xml
index 8aaf53e..648f47d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/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,14 +46,14 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/**.class,**/*.dbschema" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/**.class"/>
</antcall>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -61,10 +61,10 @@
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</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/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/client/Client.java
index dba3770..6e8b73f 100755
--- a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/client/Client.java
@@ -24,7 +24,7 @@
public class Client {
- private static SimpleReporterAdapter stat =
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main (String[] args) {
@@ -33,11 +33,11 @@
Client client = new Client(args);
client.doTest();
stat.printSummary("ejb-ejb30-hello-sessionID");
- }
-
+ }
+
public Client (String[] args) {
}
-
+
private static @EJB Sful sful;
private static @EJB Sless sless;
@@ -59,8 +59,8 @@
e.printStackTrace();
stat.addStatus("local main" , stat.FAIL);
}
-
- return;
+
+ return;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Address.java b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Address.java
index f8bf5dc..436597e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Address.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Address.java
@@ -30,27 +30,27 @@
*
* @author ss141213
*/
-@Entity
-public class Address {
- private Long id;
- private int version;
- private String street;
- @Id(generate=AUTO) public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- @Version protected int getVersion() {
- return version;
- }
- protected void setVersion(int version) {
- this.version = version;
- }
- @Basic public String getStreet() {
- return street;
- }
- public void setStreet(String street) {
- this.street = street;
- }
+@Entity
+public class Address {
+ private Long id;
+ private int version;
+ private String street;
+ @Id(generate=AUTO) public Long getId() {
+ return id;
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ @Version protected int getVersion() {
+ return version;
+ }
+ protected void setVersion(int version) {
+ this.version = version;
+ }
+ @Basic public String getStreet() {
+ return street;
+ }
+ public void setStreet(String street) {
+ this.street = street;
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Customer.java b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Customer.java
index 64e26ea..7dba0c3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Customer.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Customer.java
@@ -34,14 +34,14 @@
* @author ss141213
*/
@Entity(access=FIELD)
-public class Customer {
- @Id(generate=AUTO)
- protected Long id;
- @Version protected int version;
+public class Customer {
+ @Id(generate=AUTO)
+ protected Long id;
+ @Version protected int version;
@ManyToOne protected Address address;
- @Basic protected String description;
- @OneToMany(targetEntity="com.acme.Order", mappedBy="customer")
- protected Collection orders = new Vector();
- @ManyToMany(mappedBy="customers")
- protected Set<DeliveryService> serviceOptions = new HashSet();
+ @Basic protected String description;
+ @OneToMany(targetEntity="com.acme.Order", mappedBy="customer")
+ protected Collection orders = new Vector();
+ @ManyToMany(mappedBy="customers")
+ protected Set<DeliveryService> serviceOptions = new HashSet();
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/DeliveryService.java b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/DeliveryService.java
index 5f752a4..ef403d8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/DeliveryService.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/DeliveryService.java
@@ -30,29 +30,29 @@
*
* @author ss141213
*/
-@Entity
-public class DeliveryService {
- private String serviceName;
- private int priceCategory;
- private Collection customers;
- @Id public String getServiceName() {
- return serviceName;
- }
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
- @Basic public int getPriceCategory() {
- return priceCategory;
- }
- public void setPriceCategory(int priceCategory) {
- this.priceCategory = priceCategory;
- }
- @ManyToMany(targetEntity="com.acme.Customer")
+@Entity
+public class DeliveryService {
+ private String serviceName;
+ private int priceCategory;
+ private Collection customers;
+ @Id public String getServiceName() {
+ return serviceName;
+ }
+ public void setServiceName(String serviceName) {
+ this.serviceName = serviceName;
+ }
+ @Basic public int getPriceCategory() {
+ return priceCategory;
+ }
+ public void setPriceCategory(int priceCategory) {
+ this.priceCategory = priceCategory;
+ }
+ @ManyToMany(targetEntity="com.acme.Customer")
@AssociationTable(table=@Table(schema="TEST1"))
- public Collection getCustomers() {
- return customers;
- }
- public void setCustomers(Collection customers) {
- this.customers = customers;
- }
+ public Collection getCustomers() {
+ return customers;
+ }
+ public void setCustomers(Collection customers) {
+ this.customers = customers;
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/EmploymentPeriod.java b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/EmploymentPeriod.java
index 7616c24..31a65ff 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/EmploymentPeriod.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/EmploymentPeriod.java
@@ -36,12 +36,12 @@
*/
@Embeddable
public class EmploymentPeriod implements Serializable {
- private Date start;
- private Date end;
- @Basic
- public Date getStartDate() { return start; }
- public void setStartDate(Date start) { this.start = start; }
- @Basic
- public Date getEndDate() { return end; }
- public void setEndDate(Date end) { this.end = end; }
+ private Date start;
+ private Date end;
+ @Basic
+ public Date getStartDate() { return start; }
+ public void setStartDate(Date start) { this.start = start; }
+ @Basic
+ public Date getEndDate() { return end; }
+ public void setEndDate(Date end) { this.end = end; }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Order.java b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Order.java
index c283eb2..f906660 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Order.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/persistence-annotation/ejb30/ejb/Order.java
@@ -39,34 +39,34 @@
@Id(generate=AUTO)
public Long getId() {
return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- @Version
- protected int getVersion() {
- return version;
- }
- protected void setVersion(int version) {
- this.version = version;
- }
- @Basic
- public int getItemId() {
- return itemId;
- }
- public void setItemId(int itemId) {
- this.itemId = itemId;
- }
- @Basic public int getQuantity() {
- return quantity;
- }
- public void setQuantity(int quantity) {
- this.quantity = quantity;
- }
- @ManyToOne public Customer getCustomer() {
- return customer;
- }
- public void setCustomer(Customer cust) {
- this.customer = cust;
- }
+ }
+ public void setId(Long id) {
+ this.id = id;
+ }
+ @Version
+ protected int getVersion() {
+ return version;
+ }
+ protected void setVersion(int version) {
+ this.version = version;
+ }
+ @Basic
+ public int getItemId() {
+ return itemId;
+ }
+ public void setItemId(int itemId) {
+ this.itemId = itemId;
+ }
+ @Basic public int getQuantity() {
+ return quantity;
+ }
+ public void setQuantity(int quantity) {
+ this.quantity = quantity;
+ }
+ @ManyToOne public Customer getCustomer() {
+ return customer;
+ }
+ public void setCustomer(Customer cust) {
+ this.customer = cust;
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/report.xml b/appserver/tests/v2-tests/appserv-tests/devtests/report.xml
index 084ab1f..32b01e7 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/report.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/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/v2-tests/appserv-tests/devtests/resources/mail-session/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/build.properties
index 1347bb6..52b368b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/build.properties
@@ -15,23 +15,23 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="mail-session"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<property name="application.xml" value="descriptor/application.xml"/>
<property name="sun-application.xml" value="descriptor/sun-application.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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.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="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"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/client/Client.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/client/Client.java
index 2a5d637..c70cde9 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/client/Client.java
@@ -39,9 +39,9 @@
password = "naman",
from = "naman.mehta@oracle.com",
properties = {
- "mail.imap.class=com.sun.mail.imap.IMAPStore",
- "mail.smtp.class=com.sun.mail.smtp.SMTPTransport"
- }
+ "mail.imap.class=com.sun.mail.imap.IMAPStore",
+ "mail.smtp.class=com.sun.mail.smtp.SMTPTransport"
+ }
),
@MailSessionDefinition(description = "Mail Session Description 1",
name = "java:comp/env/Appclient_MailSession",
@@ -52,9 +52,9 @@
password = "naman",
from = "naman.mehta@oracle.com",
properties = {
- "mail.imap.class=com.sun.mail.imap.IMAPStore",
- "mail.smtp.class=com.sun.mail.smtp.SMTPTransport"
- }
+ "mail.imap.class=com.sun.mail.imap.IMAPStore",
+ "mail.smtp.class=com.sun.mail.smtp.SMTPTransport"
+ }
),
@MailSessionDefinition(
@@ -63,9 +63,9 @@
transportProtocol = "SMTP",
host = "localhost",
properties = {
- "mail.imap.class=com.sun.mail.imap.IMAPStore",
- "mail.smtp.class=com.sun.mail.smtp.SMTPTransport"
- }
+ "mail.imap.class=com.sun.mail.imap.IMAPStore",
+ "mail.smtp.class=com.sun.mail.smtp.SMTPTransport"
+ }
),
@MailSessionDefinition(description = "Mail Session Description 1",
name = "java:app/mail/Application_Level_MailSession_Override",
@@ -76,9 +76,9 @@
password = "naman",
from = "naman.mehta@oracle.com",
properties = {
- "mail.imap.class=com.sun.mail.imap.IMAPStore",
- "mail.smtp.class=com.sun.mail.smtp.SMTPTransport"
- }
+ "mail.imap.class=com.sun.mail.imap.IMAPStore",
+ "mail.smtp.class=com.sun.mail.smtp.SMTPTransport"
+ }
)
}
)
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/application-client.xml
index 9207e57..27c613b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/application-client.xml
@@ -19,92 +19,92 @@
<application-client xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
- http://xmlns.jcp.org/xml/ns/javaee/application-client_7.xsd"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/application-client_7.xsd"
version="7">
<display-name>mail-sessionClient</display-name>
- <mail-session>
- <description>Sample Mail Session definition application client2</description>
- <name>java:global/mail/ts/mail-session/appclient/globalds</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
- <mail-session>
- <description>Sample Mail Session definition application client3</description>
- <name>java:module/mail/moduleds</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
- <mail-session>
- <description>Sample Mail Session definition application client4</description>
- <name>java:app/mail/appclient/appds</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
- <mail-session>
- <description>Sample Mail Session definition application2</description>
- <name>java:app/mail/Application_Level_MailSession_Partial</name>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- </mail-session>
- <mail-session>
- <description>Sample Mail Session definition application client Override</description>
- <name>java:app/mail/Application_Level_MailSession_Override</name>
- <store-protocol>IMAP_Override</store-protocol>
- <transport-protocol>SMTP_Override</transport-protocol>
- <host>somewhere.myco.com_Override</host>
- <user>linda_Override</user>
- <password>secret_Override</password>
- <from>some.body@myco.com_Override</from>
- <property>
- <name>Property1</name>
- <value>10_Override</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20_Override</value>
- </property>
- </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition application client2</description>
+ <name>java:global/mail/ts/mail-session/appclient/globalds</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition application client3</description>
+ <name>java:module/mail/moduleds</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition application client4</description>
+ <name>java:app/mail/appclient/appds</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition application2</description>
+ <name>java:app/mail/Application_Level_MailSession_Partial</name>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition application client Override</description>
+ <name>java:app/mail/Application_Level_MailSession_Override</name>
+ <store-protocol>IMAP_Override</store-protocol>
+ <transport-protocol>SMTP_Override</transport-protocol>
+ <host>somewhere.myco.com_Override</host>
+ <user>linda_Override</user>
+ <password>secret_Override</password>
+ <from>some.body@myco.com_Override</from>
+ <property>
+ <name>Property1</name>
+ <value>10_Override</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20_Override</value>
+ </property>
+ </mail-session>
</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/application.xml
index 2f80245..2caa499 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/application.xml
@@ -19,8 +19,8 @@
<application xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
- http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd"
+ xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
+ http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd"
version="7">
<display-name>mail-sessionApp</display-name>
<module>
@@ -35,40 +35,40 @@
<context-root>mail-session</context-root>
</web>
</module>
- <mail-session>
- <description>Sample Mail Session definition application1</description>
- <name>java:global/mail/Application_Level_MailSession</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
- <mail-session>
- <description>Sample Mail Session definition application2</description>
- <name>java:app/mail/Application_Level_MailSession</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition application1</description>
+ <name>java:global/mail/Application_Level_MailSession</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition application2</description>
+ <name>java:app/mail/Application_Level_MailSession</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/ejb-jar.xml
index 6022607..52f1baf 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/ejb-jar.xml
@@ -20,7 +20,7 @@
<ejb-jar xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
- http://xmlns.jcp.org/xml/ns/javaee/ejb-jar_3_2.xsd"
+ http://xmlns.jcp.org/xml/ns/javaee/ejb-jar_3_2.xsd"
version="3.2">
<module-name>mail-session-ejb</module-name>
<enterprise-beans>
@@ -32,24 +32,24 @@
<ejb-class>com.sun.s1asdev.ejb.ejb30.hello.session3.HelloStatefulEJB</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
- <mail-session>
- <description>Sample Mail Session definition ejb1</description>
- <name>java:global/mail/HelloStatefulEJB_MS_MailSession</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition ejb1</description>
+ <name>java:global/mail/HelloStatefulEJB_MS_MailSession</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
</session>
<session>
<description>my stateless bean description</description>
@@ -59,96 +59,96 @@
<ejb-class>com.sun.s1asdev.ejb.ejb30.hello.session3.HelloEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
- <mail-session>
- <description>Sample Mail Session definition ejb3</description>
- <name>java:module/env/HelloEJB_MailSession_driver</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
- <mail-session>
- <description>Sample Mail Session definition ejb3</description>
- <name>java:global/env/HelloEJB_MS_MailSession</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
- <mail-session>
- <description>Sample Mail Session definition ejb3</description>
- <name>java:global/env/HelloStatefulEJB_MS_MailSession</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
- <mail-session>
- <description>Sample Mail Session definition ejb3</description>
- <name>java:global/mail/HelloEJB_MS_MailSession</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
- <mail-session>
- <description>Sample Mail Session definition ejb3</description>
- <name>java:comp/env/HelloEJB_MS_MailSession</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition ejb3</description>
+ <name>java:module/env/HelloEJB_MailSession_driver</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition ejb3</description>
+ <name>java:global/env/HelloEJB_MS_MailSession</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition ejb3</description>
+ <name>java:global/env/HelloStatefulEJB_MS_MailSession</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition ejb3</description>
+ <name>java:global/mail/HelloEJB_MS_MailSession</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition ejb3</description>
+ <name>java:comp/env/HelloEJB_MS_MailSession</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
</session>
</enterprise-beans>
</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/web.xml
index 12707f4..708246c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/mail-session/descriptor/web.xml
@@ -33,59 +33,59 @@
<servlet-name>Servlet</servlet-name>
<url-pattern>/servlet</url-pattern>
</servlet-mapping>
- <mail-session>
- <description>Sample Mail Session definition web1</description>
- <name>java:global/mail/Servlet_MS_MailSession</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
- <mail-session>
- <description>Sample Mail Session definition web2</description>
- <name>java:comp/mail/Servlet_MS_MailSession</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
- <mail-session>
- <description>Sample Mail Session definition web2</description>
- <name>java:global/env/Servlet_MS_MailSession</name>
- <store-protocol>IMAP</store-protocol>
- <transport-protocol>SMTP</transport-protocol>
- <host>somewhere.myco.com</host>
- <user>linda</user>
- <password>secret</password>
- <from>some.body@myco.com</from>
- <property>
- <name>Property1</name>
- <value>10</value>
- </property>
- <property>
- <name>Property2</name>
- <value>20</value>
- </property>
- </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition web1</description>
+ <name>java:global/mail/Servlet_MS_MailSession</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition web2</description>
+ <name>java:comp/mail/Servlet_MS_MailSession</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
+ <mail-session>
+ <description>Sample Mail Session definition web2</description>
+ <name>java:global/env/Servlet_MS_MailSession</name>
+ <store-protocol>IMAP</store-protocol>
+ <transport-protocol>SMTP</transport-protocol>
+ <host>somewhere.myco.com</host>
+ <user>linda</user>
+ <password>secret</password>
+ <from>some.body@myco.com</from>
+ <property>
+ <name>Property1</name>
+ <value>10</value>
+ </property>
+ <property>
+ <name>Property2</name>
+ <value>20</value>
+ </property>
+ </mail-session>
</web-app>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/AdminObjectResourceDeployerTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/AdminObjectResourceDeployerTest.java
index 944a2e3..49ceb10 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/AdminObjectResourceDeployerTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/AdminObjectResourceDeployerTest.java
@@ -59,7 +59,7 @@
fail("Exception caught -> " + e.getMessage());
}
}
-
+
/**
* Tests the deployResource method.
*/
@@ -73,7 +73,7 @@
fail("Exception caught -> " + e.getMessage());
}
}
-
+
/**
* Tests the deployResource method.
*/
@@ -97,8 +97,8 @@
return new Switch() {
public ManagementObjectManager getManagementObjectManager() {
return new J2EEManagementObjectManager() {
- public void registerAdminObjectResource(String name,
- String raName, String type, String [] names,
+ public void registerAdminObjectResource(String name,
+ String raName, String type, String [] names,
String [] values) {
System.out.println("Jsr77 Registration Complete...");
}
@@ -107,7 +107,7 @@
};
}
};
-
+
//initialize the dummy resource object
resource = new AdminObjectResource();
resource.setJndiName("javamail/Tester");
@@ -121,7 +121,7 @@
TestSuite suite = new TestSuite(AdminObjectResourceDeployerTest.class);
return suite;
}
-
+
public static void main(String args[]) throws Exception {
final TestRunner runner= new TestRunner();
final TestResult result =
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/ConnectorConnectionPoolDeployerTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/ConnectorConnectionPoolDeployerTest.java
index 97ae3a8..68f6585 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/ConnectorConnectionPoolDeployerTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/ConnectorConnectionPoolDeployerTest.java
@@ -46,10 +46,10 @@
public ConnectorConnectionPoolDeployerTest(String name) {
super(name);
}
-
- //TODO: Should ther be a unit test for null resources passed to the
+
+ //TODO: Should ther be a unit test for null resources passed to the
//deploy method???
-
+
/**
* Tests the deployResource method.
*
@@ -74,7 +74,7 @@
fail("Exception caught -> " + e.getMessage());
}
}
-
+
/**
* Tests the deployResource method.
*/
@@ -88,7 +88,7 @@
fail("Exception caught -> " + e.getMessage());
}
}
-
+
/**
* Tests the deployResource method.
*/
@@ -112,9 +112,9 @@
return new Switch() {
public ManagementObjectManager getManagementObjectManager() {
return new J2EEManagementObjectManager() {
- public void registerJMSResource(String name,
- String resType, String username,
- String password, String[] propNames,
+ public void registerJMSResource(String name,
+ String resType, String username,
+ String password, String[] propNames,
String[] propValues) {
System.out.println("Jsr77 Registration Complete...");
}
@@ -123,7 +123,7 @@
};
}
};
-
+
//initialize the dummy resource object
resource = new ConnectorConnectionPool();
resource.setName("jms/Tester");
@@ -137,7 +137,7 @@
TestSuite suite = new TestSuite(ConnectorConnectionPoolDeployerTest.class);
return suite;
}
-
+
public static void main(String args[]) throws Exception {
final TestRunner runner= new TestRunner();
final TestResult result =
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/GlobalResourceDeployerTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/GlobalResourceDeployerTest.java
index 79ba87d..8b54e38 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/GlobalResourceDeployerTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/GlobalResourceDeployerTest.java
@@ -38,7 +38,7 @@
ElementProperty [] testProps;
String [] testNames;
String [] testValues;
-
+
/** Creates a new instance of ConnectorConnectionPoolDeployerTest */
public GlobalResourceDeployerTest(String name) {
super(name);
@@ -55,7 +55,7 @@
assertEquals(result[1], testNames[1]);
assertEquals(result[2], testNames[2]);
}
-
+
/**
* Tests the getPropNamesAsStrArr method with null param.
*
@@ -64,7 +64,7 @@
String [] result = deployer.getPropNamesAsStrArr(null);
assertNull(result);
}
-
+
/**
* Tests the getPropValuesAsStrArr method.
*
@@ -74,9 +74,9 @@
assertNotNull(result);
assertEquals(result[0], testValues[0]);
assertEquals(result[1], testValues[1]);
- assertEquals(result[2], testValues[2]);
+ assertEquals(result[2], testValues[2]);
}
-
+
/**
* Tests the getPropValuesAsStrArr method with null param.
*/
@@ -84,7 +84,7 @@
String [] result = deployer.getPropValuesAsStrArr(null);
assertNull(result);
}
-
+
protected void setUp() {
deployer = new MailResourceDeployer();
ElementProperty prop1 = new ElementProperty();
@@ -108,7 +108,7 @@
TestSuite suite = new TestSuite(GlobalResourceDeployerTest.class);
return suite;
}
-
+
public static void main(String args[]) throws Exception {
final TestRunner runner= new TestRunner();
final TestResult result =
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/MailResourceDeployerTest.java b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/MailResourceDeployerTest.java
index bae2dfd..39bd812 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/MailResourceDeployerTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/resources/src/java/com/sun/enterprise/resource/MailResourceDeployerTest.java
@@ -46,10 +46,10 @@
public MailResourceDeployerTest(String name) {
super(name);
}
-
- //TODO: Should ther be a unit test for null resources passed to the
+
+ //TODO: Should ther be a unit test for null resources passed to the
//deploy method???
-
+
/**
* Tests the deployResource method.
*
@@ -74,7 +74,7 @@
fail("Exception caught -> " + e.getMessage());
}
}
-
+
/**
* Tests the deployResource method.
*/
@@ -88,7 +88,7 @@
fail("Exception caught -> " + e.getMessage());
}
}
-
+
/**
* Tests the deployResource method.
*/
@@ -104,7 +104,7 @@
fail("Exception caught -> " + e.getMessage());
}
}
-
+
/**
* Tests the method for installing a mail resource.
*/
@@ -115,7 +115,7 @@
e.printStackTrace();
fail("Exception caught -> " + e.getMessage());
}
-
+
}
protected void setUp() {
@@ -133,7 +133,7 @@
public ResourceInstaller getResourceInstaller() {
return new ResourceInstaller() {
public void installMailResource(
- com.sun.enterprise.repository.MailResource
+ com.sun.enterprise.repository.MailResource
mailRes) {
System.out.println("Installed into Runtime...");
}
@@ -142,7 +142,7 @@
};
}
};
-
+
//initialize the dummy resource object
resource = new MailResource();
resource.setJndiName("javamail/Tester");
@@ -156,7 +156,7 @@
TestSuite suite = new TestSuite(MailResourceDeployerTest.class);
return suite;
}
-
+
public static void main(String args[]) throws Exception {
final TestRunner runner= new TestRunner();
final TestResult result =
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/build.xml
index 77ec5c1..61a9283 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/build.xml
@@ -49,9 +49,9 @@
</target>
<target name="usage">
- <echo>
- Usage:
- ant all (Executes all the Selfmanagement tests)
- </echo>
+ <echo>
+ Usage:
+ ant all (Executes all the Selfmanagement tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/common.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/common.xml
index 59131f0..52c8bbc 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/common.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/common.xml
@@ -123,10 +123,10 @@
<arg line="--action ${action.mbean.name}"/>
<arg line="--eventtype ${selfmanagement.rule.eventtype}"/>
<arg line="--eventloglevel ${selfmanagement.rule.eventloglevel}"/>
- <arg line="--eventproperties ${selfmanagement.rule.eventproperties}"/>
+ <arg line="--eventproperties ${selfmanagement.rule.eventproperties}"/>
<arg line="${selfmanagement.rule.name}"/>
</exec>
-</target>
+</target>
<target name="undeploy-selfmgmt-rule-common" depends="init-common">
<antcall target="delete-event-mbean-common" />
@@ -152,7 +152,7 @@
<arg line="${event.mbean.name}"/>
</exec>
</target>
-
+
<target name="delete-action-mbean-common" depends="init-common">
<echo message="deleted Action MBean ${action.mbean.name}"
level="verbose"/>
@@ -185,7 +185,7 @@
<arg line="-client ${appclient.jar}"/>
<arg line="${as.props}"/>
</exec>
-
+
<!-- confirming report generation... -->
<!-- <antcall target="checkReporting-common">
<param name="test.name" value="${appname}"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/report.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/report.xml
index b228941..c2ef9bd 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/report.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/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/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleReady.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleReady.java
index dd77b04..859eb96 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleReady.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleReady.java
@@ -18,14 +18,14 @@
import javax.management.*;
import java.io.*;
-
-public class LifecycleReady implements NotificationListener,
+
+public class LifecycleReady implements NotificationListener,
com.sun.s1peqe.selfmanagement.tlifecycle.action.LifecycleReadyMBean {
-
+
private final String JMX_LIFECYCLE_READY = "lifecycle.ready";
public LifecycleReady() {
}
-
+
public synchronized void handleNotification(Notification notification,
Object handback) {
try {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleReadyMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleReadyMBean.java
index b7bfeff..6aa56f8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleReadyMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleReadyMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tlifecycle.action;
import javax.management.*;
-
+
public interface LifecycleReadyMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleShutdown.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleShutdown.java
index d9531a2..090556a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleShutdown.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleShutdown.java
@@ -18,14 +18,14 @@
import javax.management.*;
import java.io.*;
-
-public class LifecycleShutdown implements NotificationListener,
+
+public class LifecycleShutdown implements NotificationListener,
com.sun.s1peqe.selfmanagement.tlifecycle.action.LifecycleShutdownMBean {
-
+
private final String JMX_LIFECYCLE_SHUTDOWN = "lifecycle.shutdown";
public LifecycleShutdown() {
}
-
+
public synchronized void handleNotification(Notification notification,
Object handback) {
try {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleShutdownMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleShutdownMBean.java
index 6ba7281..fb07d75 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleShutdownMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleShutdownMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tlifecycle.action;
import javax.management.*;
-
+
public interface LifecycleShutdownMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleTermination.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleTermination.java
index 923679c..b13b48b 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleTermination.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleTermination.java
@@ -18,15 +18,15 @@
import javax.management.*;
import java.io.*;
-
-public class LifecycleTermination
- implements NotificationListener,
+
+public class LifecycleTermination
+ implements NotificationListener,
com.sun.s1peqe.selfmanagement.tlifecycle.action.LifecycleTerminationMBean {
-
+
private final String JMX_LIFECYCLE_TERMINATION = "lifecycle.termination";
public LifecycleTermination() {
}
-
+
public synchronized void handleNotification(Notification notification,
Object handback) {
try {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleTerminationMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleTerminationMBean.java
index 33466c8..6283b1d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleTerminationMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/action/LifecycleTerminationMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tlifecycle.action;
import javax.management.*;
-
+
public interface LifecycleTerminationMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/build.properties
index 3e17e0a..d4beb08 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/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="tlifecycle"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
<property name="application.xml" value="descriptor/application.xml"/>
@@ -26,7 +26,7 @@
<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="appclientjar.files" value="${build.classes.dir}"/> \u0020
<property name="appclient.jar" value="${assemble.dir}/${module}-client.jar"/>
<property name="appclient.jar.name" value="${module}-client.jar"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/build.xml
index 01ac8b5..137f197 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tlifecycle/build.xml
@@ -49,7 +49,7 @@
<param name="appclientjar.classes" value="**/Lifecycle*.class" />
</antcall>
</target>
-
+
<target name="deploy" depends="init-common">
<antcall target="deploy-selfmgmt-jar-common">
</antcall>
@@ -117,11 +117,11 @@
</antcall>
<antcall target="delete-selfmanagement-jar"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="unsetup"/>
<antcall target="stopDomain"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeHigh.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeHigh.java
index b255d6e..d970e87 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeHigh.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeHigh.java
@@ -23,7 +23,7 @@
private final String JMX_MONITOR_GAUGE_HIGH = "jmx.monitor.gauge.high";
public GaugeHigh() {
}
-
+
public synchronized void handleNotification(Notification notification,
Object handback) {
try {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeHighMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeHighMBean.java
index b9dd217..ba0c101 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeHighMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeHighMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tmonitor.action;
import javax.management.*;
-
+
public interface GaugeHighMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeLow.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeLow.java
index e787d4d..80be708 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeLow.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeLow.java
@@ -19,12 +19,12 @@
import javax.management.*;
import java.io.*;
-public class GaugeLow implements NotificationListener,
+public class GaugeLow implements NotificationListener,
com.sun.s1peqe.selfmanagement.tmonitor.action.GaugeLowMBean {
private final String JMX_MONITOR_GAUGE_LOW = "jmx.monitor.gauge.low";
public GaugeLow() {
}
-
+
public synchronized void handleNotification(Notification notification,
Object handback) {
try {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeLowMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeLowMBean.java
index 487e123..2facfca 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeLowMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/GaugeLowMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tmonitor.action;
import javax.management.*;
-
+
public interface GaugeLowMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/Hello.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/Hello.java
index 4ec16f4..1fcee95 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/Hello.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/Hello.java
@@ -22,23 +22,23 @@
public class Hello implements NotificationListener, com.sun.s1peqe.selfmanagement.tmonitor.action.HelloMBean {
private final String JMX_MONITOR_COUNTER_THRESHOLD = "jmx.monitor.counter.threshold";
- public Hello() {
+ public Hello() {
}
- public synchronized void handleNotification(Notification notification,
+ public synchronized void handleNotification(Notification notification,
Object handback) {
try {
FileWriter out = new FileWriter(new File("/space/selfmanagementResult.txt"));
if(notification != null) {
- if(notification.getType().equals(JMX_MONITOR_COUNTER_THRESHOLD)) {
+ if(notification.getType().equals(JMX_MONITOR_COUNTER_THRESHOLD)) {
System.out.println("TEST PASSED");
out.write("Counter Monitor Test - PASSED\n");
}
} else {
System.out.println("TEST FAILED");
- out.write("Counter Monitor Test - FAILED\n");
+ out.write("Counter Monitor Test - FAILED\n");
}
out.flush();
out.close();
} catch (Exception ex) { }
- }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/HelloMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/HelloMBean.java
index 0a2d901..71efbd2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/HelloMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/HelloMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tmonitor.action;
import javax.management.*;
-
+
public interface HelloMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringDiffer.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringDiffer.java
index 8bb735c..4822b2e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringDiffer.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringDiffer.java
@@ -19,7 +19,7 @@
import javax.management.*;
import java.io.*;
-public class StringDiffer implements NotificationListener,
+public class StringDiffer implements NotificationListener,
com.sun.s1peqe.selfmanagement.tmonitor.action.StringDifferMBean {
private final String JMX_MONITOR_STRING_DIFFERS = "jmx.monitor.string.differs";
public StringDiffer() {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringDifferMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringDifferMBean.java
index 5eae75a..bf80aa7 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringDifferMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringDifferMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tmonitor.action;
import javax.management.*;
-
+
public interface StringDifferMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringMatch.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringMatch.java
index 842a47c..8734b4d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringMatch.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringMatch.java
@@ -19,7 +19,7 @@
import javax.management.*;
import java.io.*;
-public class StringMatch implements NotificationListener,
+public class StringMatch implements NotificationListener,
com.sun.s1peqe.selfmanagement.tmonitor.action.StringMatchMBean {
private final String JMX_MONITOR_STRING_MATCHES = "jmx.monitor.string.matches";
public StringMatch() {
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringMatchMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringMatchMBean.java
index caa5f2f..e800918 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringMatchMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/action/StringMatchMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tmonitor.action;
import javax.management.*;
-
+
public interface StringMatchMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/build.properties
index 7e72e40..7c2e78e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/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="tmonitor"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${env.APS_HOME}/build/module/archive"/>
<property name="test.description" value="Selfmanagement-Monitor-Tests"/>
<property name="application.xml" value="descriptor/application.xml"/>
@@ -26,7 +26,7 @@
<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="appclientjar.files" value="${build.classes.dir}"/> \u0020
<property name="appclient.jar" value="${assemble}/${module}-client.jar"/>
<property name="appclient.jar.name" value="${module}-client.jar"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/build.xml
index 44b3c1b..9f8cd7f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/build.xml
@@ -52,7 +52,7 @@
<param name="appclientjar.classes" value="**/*.class" />
</antcall>
</target>
-
+
<target name="deploy" depends="init-common">
<antcall target="deploy-selfmgmt-jar-common">
</antcall>
@@ -154,10 +154,10 @@
<antcall target="delete-selfmanagement-jar"/>
<antcall target="stopDomain"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="unsetup"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeHigh.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeHigh.java
index 15a0c73..0f6061d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeHigh.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeHigh.java
@@ -17,14 +17,14 @@
package com.sun.s1peqe.selfmanagement.tmonitor.event;
public class GaugeHigh implements com.sun.s1peqe.selfmanagement.tmonitor.event.GaugeHighMBean {
-
+
public GaugeHigh() {}
-
+
public double getValue() {
-
+
return this.value;
}
-
+
private double value = 10;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeHighMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeHighMBean.java
index 4455da8..ca662b6 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeHighMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeHighMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tmonitor.event;
public interface GaugeHighMBean {
-
+
public double getValue();
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeLow.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeLow.java
index 04c38d6..bbab914 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeLow.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeLow.java
@@ -17,14 +17,14 @@
package com.sun.s1peqe.selfmanagement.tmonitor.event;
public class GaugeLow implements com.sun.s1peqe.selfmanagement.tmonitor.event.GaugeLowMBean {
-
+
public GaugeLow() {}
-
+
public double getValue() {
-
+
return this.value;
}
-
+
private double value = 1;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeLowMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeLowMBean.java
index c5cb375..eae3b54 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeLowMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/GaugeLowMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tmonitor.event;
public interface GaugeLowMBean {
-
+
public double getValue();
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/Hello.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/Hello.java
index bce9b25..90cbd90 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/Hello.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/Hello.java
@@ -21,9 +21,9 @@
public Hello() {}
public long getValue() {
-
- return this.value;
+
+ return this.value;
}
-
+
private long value = 10;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringDiffer.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringDiffer.java
index fc79cd2..011b5f4 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringDiffer.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringDiffer.java
@@ -17,14 +17,14 @@
package com.sun.s1peqe.selfmanagement.tmonitor.event;
public class StringDiffer implements com.sun.s1peqe.selfmanagement.tmonitor.event.StringDifferMBean {
-
+
public StringDiffer() {}
-
+
public String getValue() {
-
+
return this.value;
}
-
+
private String value = "condensation";
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringDifferMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringDifferMBean.java
index e41c116..a4eefad 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringDifferMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringDifferMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tmonitor.event;
public interface StringDifferMBean {
-
+
public String getValue();
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringMatch.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringMatch.java
index 061fb03..74b073c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringMatch.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringMatch.java
@@ -17,14 +17,14 @@
package com.sun.s1peqe.selfmanagement.tmonitor.event;
public class StringMatch implements com.sun.s1peqe.selfmanagement.tmonitor.event.StringMatchMBean {
-
+
public StringMatch() {}
-
+
public String getValue() {
-
+
return this.value;
}
-
+
private String value = "sublimation";
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringMatchMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringMatchMBean.java
index d4f68a8..ae1f9d6 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringMatchMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tmonitor/event/StringMatchMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tmonitor.event;
public interface StringMatchMBean {
-
+
public String getValue();
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/CpuUtil.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/CpuUtil.java
index 35fde5b..cf25ff3 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/CpuUtil.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/CpuUtil.java
@@ -19,26 +19,26 @@
import javax.management.*;
import java.io.*;
-public class CpuUtil implements NotificationListener,
+public class CpuUtil implements NotificationListener,
com.sun.s1peqe.selfmanagement.tnative.action.CpuUtilMBean {
private final String JMX_MONITOR_GAUGE_LOW = "jmx.monitor.gauge.low";
private final String JMX_MONITOR_GAUGE_HIGH = "jmx.monitor.gauge.high";
- public CpuUtil() {
+ public CpuUtil() {
}
public synchronized void handleNotification(Notification notification,
Object handback) {
try {
FileWriter out = new FileWriter(new File("/space/selfmanagementResult.txt"),true);
if(notification != null) {
- if(notification.getType().equals(JMX_MONITOR_GAUGE_LOW) ||
+ if(notification.getType().equals(JMX_MONITOR_GAUGE_LOW) ||
notification.getType().equals(JMX_MONITOR_GAUGE_HIGH)) {
System.out.println("TEST PASSED");
out.write("Cpu util Monitor Test - PASSED\n");
}
} else {
System.out.println("TEST FAILED");
- out.write("Cpu util Monitor Test - FAILED\n");
+ out.write("Cpu util Monitor Test - FAILED\n");
}
out.flush();
out.close();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/CpuUtilMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/CpuUtilMBean.java
index 13c7d7b..38664d5 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/CpuUtilMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/CpuUtilMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tnative.action;
import javax.management.*;
-
+
public interface CpuUtilMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/DiskSpace.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/DiskSpace.java
index e6a4bfc..0a8137f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/DiskSpace.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/DiskSpace.java
@@ -19,24 +19,24 @@
import javax.management.*;
import java.io.*;
-public class DiskSpace implements NotificationListener,
+public class DiskSpace implements NotificationListener,
com.sun.s1peqe.selfmanagement.tnative.action.DiskSpaceMBean {
private final String JMX_MONITOR_COUNTER_THRESHOLD = "jmx.monitor.counter.threshold";
- public DiskSpace() {
+ public DiskSpace() {
}
public synchronized void handleNotification(Notification notification,
Object handback) {
try {
FileWriter out = new FileWriter(new File("/space/selfmanagementResult.txt"),true);
if(notification != null) {
- if(notification.getType().equals(JMX_MONITOR_COUNTER_THRESHOLD)) {
+ if(notification.getType().equals(JMX_MONITOR_COUNTER_THRESHOLD)) {
System.out.println("TEST PASSED");
out.write("Disk Free Monitor Test - PASSED\n");
}
} else {
System.out.println("TEST FAILED");
- out.write("Disk Free Monitor Test - FAILED\n");
+ out.write("Disk Free Monitor Test - FAILED\n");
}
out.flush();
out.close();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/DiskSpaceMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/DiskSpaceMBean.java
index 5409aa2..dbf3131 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/DiskSpaceMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/DiskSpaceMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tnative.action;
import javax.management.*;
-
+
public interface DiskSpaceMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/MemoryUtil.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/MemoryUtil.java
index a19277d..ece696c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/MemoryUtil.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/MemoryUtil.java
@@ -19,24 +19,24 @@
import javax.management.*;
import java.io.*;
-public class MemoryUtil implements NotificationListener,
+public class MemoryUtil implements NotificationListener,
com.sun.s1peqe.selfmanagement.tnative.action.MemoryUtilMBean {
private final String JMX_MONITOR_COUNTER_THRESHOLD = "jmx.monitor.counter.threshold";
- public MemoryUtil() {
+ public MemoryUtil() {
}
public synchronized void handleNotification(Notification notification,
Object handback) {
try {
FileWriter out = new FileWriter(new File("/space/selfmanagementResult.txt"),true);
if(notification != null) {
- if(notification.getType().equals(JMX_MONITOR_COUNTER_THRESHOLD)) {
+ if(notification.getType().equals(JMX_MONITOR_COUNTER_THRESHOLD)) {
System.out.println("TEST PASSED");
out.write("Memory util Monitor Test - PASSED\n");
}
} else {
System.out.println("TEST FAILED");
- out.write("Memory Util Monitor Test - FAILED\n");
+ out.write("Memory Util Monitor Test - FAILED\n");
}
out.flush();
out.close();
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/MemoryUtilMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/MemoryUtilMBean.java
index 6184730..75daa01 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/MemoryUtilMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/action/MemoryUtilMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.tnative.action;
import javax.management.*;
-
+
public interface MemoryUtilMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/build.properties
index 97d6b1a..5eef9ba 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/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="tnative"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${env.APS_HOME}/build/module/archive"/>
<property name="test.description" value="Selfmanagement-DISK-CPU-MEMORY-Tests"/>
<property name="application.xml" value="descriptor/application.xml"/>
@@ -26,7 +26,7 @@
<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="appclientjar.files" value="${build.classes.dir}"/> \u0020
<property name="appclient.jar" value="${assemble}/${module}-client.jar"/>
<property name="appclient.jar.name" value="${module}-client.jar"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/build.xml
index 391fd87..550ccb2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/tnative/build.xml
@@ -49,7 +49,7 @@
<param name="appclientjar.classes" value="**/*.class" />
</antcall>
</target>
-
+
<target name="deploy" depends="init-common">
<antcall target="deploy-selfmgmt-jar-common">
</antcall>
@@ -118,10 +118,10 @@
<antcall target="delete-selfmanagement-jar"/>
<antcall target="stopDomain"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="unsetup"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/action/TimerOccurrence.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/action/TimerOccurrence.java
index cc8e773..ce6375a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/action/TimerOccurrence.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/action/TimerOccurrence.java
@@ -20,15 +20,15 @@
import java.io.*;
import java.util.Timer;
import java.util.TimerTask;
-
-public class TimerOccurrence implements NotificationListener,
+
+public class TimerOccurrence implements NotificationListener,
com.sun.s1peqe.selfmanagement.ttimer.action.TimerOccurrenceMBean {
-
+
private final String JMX_TIMER = "timer";
private static final int TIMER_NO_OF_OCCURRENCES = 3;
protected static int incOccurrences = 0;
- public TimerOccurrence(){
+ public TimerOccurrence(){
new NotifThread(this, TIMER_NO_OF_OCCURRENCES).start();
}
public int getNumberOfOccurrences() {
@@ -54,7 +54,7 @@
this.expectedOccurrences = n;
this.timerMBean = t;
}
-
+
public void run() {
try {
System.out.println("Now going to sleep for 40 secs...");
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/action/TimerOccurrenceMBean.java b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/action/TimerOccurrenceMBean.java
index f976601..c0220c9 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/action/TimerOccurrenceMBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/action/TimerOccurrenceMBean.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.selfmanagement.ttimer.action;
import javax.management.*;
-
+
public interface TimerOccurrenceMBean {
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/build.properties b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/build.properties
index 3cd0c0e..3e9b5de 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/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="ttimer"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
<property name="application.xml" value="descriptor/application.xml"/>
@@ -26,7 +26,7 @@
<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="appclientjar.files" value="${build.classes.dir}"/> \u0020
<property name="appclient.jar" value="${assemble.dir}/${module}-client.jar"/>
<property name="appclient.jar.name" value="${module}-client.jar"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/build.xml b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/build.xml
index f3cf812..dcac014 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtests/selfmanagement/ttimer/build.xml
@@ -49,7 +49,7 @@
<param name="appclientjar.classes" value="**/*.class" />
</antcall>
</target>
-
+
<target name="deploy" depends="init-common">
<antcall target="deploy-selfmgmt-jar-common"/>
</target>
@@ -83,11 +83,11 @@
</antcall>
<antcall target="delete-selfmanagement-jar"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="unsetup"/>
<antcall target="stopDomain"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/build.xml b/appserver/tests/v2-tests/appserv-tests/devtestsNG/build.xml
index e3d674e..4e484cf 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/build.xml
@@ -29,7 +29,7 @@
<target name="all">
<!-- call ant all in the subdirs -->
- <!--
+ <!--
<ant dir="web" target="all"/>
<ant dir="corba" target="all"/>
-->
@@ -52,8 +52,8 @@
</target>
<target name="usage">
- <echo>Usage: ant (all | clean | run-groups -Dgroup-names=${comma-separated-group-name} | run-failed)
- </echo>
+ <echo>Usage: ant (all | clean | run-groups -Dgroup-names=${comma-separated-group-name} | run-failed)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/common-build.xml b/appserver/tests/v2-tests/appserv-tests/devtestsNG/common-build.xml
index afbe874..4396b3a 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/common-build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/common-build.xml
@@ -21,11 +21,11 @@
with other the common file(appserv-tests/config/common.xml)
-->
-<!--
+<!--
Variable name guidelines
- property names that are exported by the test framework(properties.xml)
- should be of the form
+ should be of the form
build.some-property-name-here
- ant targets defined by the test framework(this file)
@@ -33,7 +33,7 @@
common-do-my-job
- properties that are to set by test authors and are dependent per test
- (eg set in build.properties) and used in the test framework
+ (eg set in build.properties) and used in the test framework
should be of the form
my.app-name
compile.source.dir
@@ -54,18 +54,18 @@
<!-- ================================================================ -->
<!-- Targets to clean class files and jars files -->
-<!--
-Variables used:
- ${build.classes.dir}
+<!--
+Variables used:
+ ${build.classes.dir}
${build.assemble.dir}
-->
<!-- ================================================================ -->
<target name="common-clean-classes" depends="init-common">
- <echo message="common.xml: Cleaning test source files: ${build.base.dir}"
+ <echo message="common.xml: Cleaning test source files: ${build.base.dir}"
level="verbose"/>
<delete dir="${build.base.dir}"/>
</target>
-
+
<target name="common-clean-jars" depends="init-common">
<delete dir="${build.assemble.dir}"/>
</target>
@@ -75,29 +75,29 @@
<antcall target="common-clean-jars"/>
</target>
-<!--
- @todo
+<!--
+ @todo
this target needs to figure out if the ${variable-nae} has been
defined or not and take appropriate action - exit ?
-
+
parameters
- ${variable-name}
-->
<target name="verify-variable-defined">
<!--
if ${variable-name} defined
- // great
+ // great
else
// exit/warn - maybe have variants of the verify target to warn/exit
-->
</target>
-<!--
-Variables used:
+<!--
+Variables used:
@todo change the top 2 variable names
- ${build.classes.dir}
+ ${build.classes.dir}
${build.s1astest.classpath}
${compile.source.dir}
@@ -125,7 +125,7 @@
<available file="${tagfiles}" property="tagfiles-exist"/>
</target>
-<target name="common-copy-tlds" if="tlds-exist"
+<target name="common-copy-tlds" if="tlds-exist"
depends="common-delete-war-file,test-tlds-exist">
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/tlds"/>
@@ -136,7 +136,7 @@
</copy>
</target>
-<target name="common-copy-tagfiles" if="tagfiles-exist"
+<target name="common-copy-tagfiles" if="tagfiles-exist"
depends="common-delete-war-file,test-tagfiles-exist">
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/tags"/>
@@ -150,7 +150,7 @@
<target name="common-delete-war-file">
- <delete file="${build.war.file}"/>
+ <delete file="${build.war.file}"/>
</target>
@@ -162,7 +162,7 @@
${build.classes.dir}
${build.assemble.dir}
- ${my-app-name}
+ ${my-app-name}
${web.xml}
...
@@ -176,7 +176,7 @@
</antcall>
</target>
-<target name="common-package-war"
+<target name="common-package-war"
depends="common-copy-tlds, common-copy-tagfiles">
<echo message="my build classes dir is:${build.classes.dir}" level="verbose"/>
<mkdir dir="${build.classes.dir}/tmp"/>
@@ -184,7 +184,7 @@
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/classes"/>
<mkdir dir="${build.classes.dir}/tmp/WEB-INF/lib"/>
<mkdir dir="lib"/>
- <copy file="${sun-web.xml}"
+ <copy file="${sun-web.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/sun-web.xml" failonerror="false"/>
<copy todir="${build.classes.dir}/tmp/WEB-INF/lib" failonerror="false">
<fileset dir="lib">
@@ -192,19 +192,19 @@
<include name="**/*.zip"/>
</fileset>
</copy>
- <copy file="${webservices.xml}"
+ <copy file="${webservices.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/webservices.xml"
failonerror="false"/>
- <copy file="${mappingfile.location}/${mappingfile.name}"
+ <copy file="${mappingfile.location}/${mappingfile.name}"
tofile="${build.classes.dir}/tmp/${mappingfile.name}"
failonerror="false"/>
- <copy file="${wsdlfile.location}/${wsdlfile.name}"
+ <copy file="${wsdlfile.location}/${wsdlfile.name}"
tofile="${build.classes.dir}/tmp/WEB-INF/wsdl/${wsdlfile.name}"
failonerror="false"/>
- <copy file="${tagPlugins.xml}"
+ <copy file="${tagPlugins.xml}"
tofile="${build.classes.dir}/tmp/WEB-INF/tagPlugins.xml"
failonerror="false"/>
- <copy file="${web.xml}"
+ <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.war.classes}">
@@ -239,9 +239,9 @@
<include name="WEB-INF/wsdl/${wsdlfile.name}"/>
<include name="${mappingfile.name}"/>
</fileset>
- </jar>
+ </jar>
<echo message="created war file ${build.war.file}" level="verbose"/>
- <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
+ <delete dir="${build.classes.dir}/tmp/WEB-INF" failonerror="false"/>
</target>
@@ -251,7 +251,7 @@
</target>
<target name="common-pe-deploy-war" depends="init-common" unless="ee">
- <echo message="Deploying ${build.assemble.dir}/${my-app-name}-web.war from ${basedir}."
+ <echo message="Deploying ${build.assemble.dir}/${my-app-name}-web.war from ${basedir}."
level="verbose"/>
<property name="precompilejsp" value="true"/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -260,10 +260,10 @@
<arg line="--contextroot ${my-contextroot}"/>
<arg line="--precompilejsp=${precompilejsp}"/>
<arg line="--upload=true"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${build.assemble.dir}/${my-app-name}-web.war"/>
</exec>
-</target>
+</target>
<target name="common-ee-deploy-war" if="ee">
<property name="precompilejsp" value="true"/>
@@ -274,23 +274,23 @@
<arg line="--contextroot ${my-contextroot}"/>
<arg line="--precompilejsp=${precompilejsp}"/>
<arg line="--upload=true"/>
- <arg line="--target ${appserver.instance.name}"/>
+ <arg line="--target ${appserver.instance.name}"/>
<arg line="${build.assemble.dir}/${my-app-name}-web.war"/>
</exec>
</target>
<!-- undeploy the standalone war in AppServ -->
<target name="common-undeploy-war" depends="init-common">
- <echo message="Undeploying warfile ${my-app-name}-web from
- ${build.assemble.dir}/${my-app-name}-web.war from ${basedir}."
+ <echo message="Undeploying warfile ${my-app-name}-web from
+ ${build.assemble.dir}/${my-app-name}-web.war from ${basedir}."
level="verbose"/>
<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="${my-app-name}-web"/>
</exec>
-</target>
+</target>
<!-- Path to the TestNG library -->
<path id="path2testng">
@@ -323,7 +323,7 @@
<!-- Generate the TestNG report - uses junit -->
-<!-- TestNG generates detailed reports in the output
+<!-- TestNG generates detailed reports in the output
directory(default test-output) but junit does a nice compilation
of all the test results -->
<target name="common-report">
@@ -388,11 +388,11 @@
${run.testng.classfileset} should be a fileset refid
${run.testng.classpath} should be a path refid
- ${group-names} needs to be specified as well -
- usually this should be done
+ ${group-names} needs to be specified as well -
+ usually this should be done
by the caller that invokes ant
- Note: can't seem to run using testng with the groups option
+ Note: can't seem to run using testng with the groups option
and testng.xml files as in with xmlfilesetref or xmlfileset
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/build.xml b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/build.xml
index c69ff86..ec3d024 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/build.xml
@@ -48,8 +48,8 @@
</target>
<target name="usage">
- <echo>Usage: ant all
- </echo>
+ <echo>Usage: ant all
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/build.properties b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/build.properties
index 535117a..69631b8 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/build.properties
@@ -15,13 +15,13 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="my-module" value="corba"/>
-<property name="my-app-name" value="timer"/>
+<property name="my-app-name" value="timer"/> \u0020
<property name="build.dir" value="${env.APS_HOME}/build/${my-module}/${my-app-name}"/>
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/build.xml b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/build.xml
index cd7f82f..e2b4695 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/build.xml
@@ -73,7 +73,7 @@
</target>
<target name="build" depends="compile">
- </target>
+ </target>
<!-- Run TestNG test via testng.xml -->
<target name="run" depends="compile">
@@ -90,7 +90,7 @@
<param name="run.testng.classfileset" value="run.classfileset"/>
</antcall>
</target>
-
+
<!-- Run failed tests from previous run -->
<target name="run-failed" depends="common-run-failed"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/ActivationSuite.java b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/ActivationSuite.java
index 1880a3d..2458706 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/ActivationSuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/ActivationSuite.java
@@ -51,68 +51,68 @@
public class ActivationSuite {
// Test set up:
- //Timer groups:
- // ga contains gb, gc
- // gb contains gd
- // gc contains gd
- // gd contains ge
- // ge contains gc
+ //Timer groups:
+ // ga contains gb, gc
+ // gb contains gd
+ // gc contains gd
+ // gd contains ge
+ // ge contains gc
//
- // Timers (in groups)
- // ga contains t1
- // gb contains t2, t3
+ // Timers (in groups)
+ // ga contains t1
+ // gb contains t2, t3
// gc contains t4
// gd contains t5, t6
// ge contains t7, t8
//
// All descriptions are the same as the names
//
-
+
private String tfName = "TFActivation" ;
private List<Pair<String,List<String>>> data = asList(
- mkPair( "ga", "gb", "t1" ),
- mkPair( "gb", "gd", "t2", "t3" ),
- mkPair( "gc", "gd", "t4" ),
- mkPair( "gd", "ge", "t5", "t6" ),
- mkPair( "ge", "gc", "t7", "t8" ) ) ;
+ mkPair( "ga", "gb", "t1" ),
+ mkPair( "gb", "gd", "t2", "t3" ),
+ mkPair( "gc", "gd", "t4" ),
+ mkPair( "gd", "ge", "t5", "t6" ),
+ mkPair( "ge", "gc", "t7", "t8" ) ) ;
private List<String> t1_t8 = asList(
- "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8" ) ;
+ "t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8" ) ;
private List<String> t2_t8 = asList(
- "t2", "t3", "t4", "t5", "t6", "t7", "t8" ) ;
+ "t2", "t3", "t4", "t5", "t6", "t7", "t8" ) ;
private List<String> t4_t8 = asList(
- "t4", "t5", "t6", "t7", "t8" ) ;
+ "t4", "t5", "t6", "t7", "t8" ) ;
// List<Pair<List<String>,List<String>>>
// for each element of list:
// first is Controllables to enable, second is expected active set
//
private List<Pair<List<String>,List<String>>> testData = asList(
- mkPList( asList( "t1", "t3" ), asList( "t1", "t3" )),
- mkPList( asList( "ga" ), t1_t8 ),
- mkPList( asList( "gb" ), t2_t8 ),
- mkPList( asList( "gc" ), t4_t8 ),
- mkPList( asList( "gd" ), t4_t8 ),
- mkPList( asList( "ge" ), t4_t8 ),
- mkPList( asList( "ge", "t1", "t3" ),
- asList( "t1", "t3", "t4", "t5", "t6", "t7", "t8" )),
- mkPList( asList( "gb", "gc" ), t2_t8 )) ;
+ mkPList( asList( "t1", "t3" ), asList( "t1", "t3" )),
+ mkPList( asList( "ga" ), t1_t8 ),
+ mkPList( asList( "gb" ), t2_t8 ),
+ mkPList( asList( "gc" ), t4_t8 ),
+ mkPList( asList( "gd" ), t4_t8 ),
+ mkPList( asList( "ge" ), t4_t8 ),
+ mkPList( asList( "ge", "t1", "t3" ),
+ asList( "t1", "t3", "t4", "t5", "t6", "t7", "t8" )),
+ mkPList( asList( "gb", "gc" ), t2_t8 )) ;
- private List<String> evIn = asList(
- "t1<10", "t1>120",
- "t2<13", "t3<15", "t1<21", "t1>4", "t3>34", "t2>27",
- "t1<12", "t1<23", "t1<31", "t1>24", "t1>8", "t1>91" ) ;
+ private List<String> evIn = asList(
+ "t1<10", "t1>120",
+ "t2<13", "t3<15", "t1<21", "t1>4", "t3>34", "t2>27",
+ "t1<12", "t1<23", "t1<31", "t1>24", "t1>8", "t1>91" ) ;
// Timings:
// t1 20 25 55 86 189
// t2 114
// t3 74
- //
- private List<String> evOut = asList(
- "t1<", "t1>",
- "t3<", "t1<", "t1>", "t3>",
- "t1<", "t1<", "t1<", "t1>", "t1>", "t1>" ) ;
+ //
+ private List<String> evOut = asList(
+ "t1<", "t1>",
+ "t3<", "t1<", "t1>", "t3>",
+ "t1<", "t1<", "t1<", "t1>", "t1>", "t1>" ) ;
private String controllerName = "TestController" ;
private TimerFactory tf ;
@@ -122,326 +122,326 @@
private MyTimerEventHandler h1 ;
private MyTimerEventHandler h2 ;
private TimerEventController controller ;
-
+
private Pair<String,List<String>> mkPair( String key, String... values ) {
- return new Pair<String,List<String>>(
- key, asList( values ) ) ;
+ return new Pair<String,List<String>>(
+ key, asList( values ) ) ;
}
private Pair<List<String>,List<String>> mkPList( List<String> first,
- List<String> second ) {
-
- return new Pair<List<String>,List<String>>(
- first, second ) ;
+ List<String> second ) {
+
+ return new Pair<List<String>,List<String>>(
+ first, second ) ;
}
private <T> Set<T> asSet( T... args ) {
- Set<T> result = new HashSet<T>() ;
- for (T t : args)
- result.add( t ) ;
- return result ;
+ Set<T> result = new HashSet<T>() ;
+ for (T t : args)
+ result.add( t ) ;
+ return result ;
}
private Controllable makeOrGetControllable( String str ) {
- if (str.charAt(0)=='g') {
- // Make a TimerGroup
- TimerGroup tg = tf.timerGroups().get( str ) ;
- if (tg == null) {
- tg = tf.makeTimerGroup( str, str ) ;
- timerGroups.add( tg ) ;
- }
- return tg ;
- } else if (str.charAt(0)=='t') {
- // Make a Timer
- Timer t = tf.timers().get( str ) ;
- if (t == null) {
- t = tf.makeTimer( str, str ) ;
- timers.add( t ) ;
- }
- return t ;
- } else {
- // error in test data
- Assert.fail( "Bad data string" ) ;
- return null ;
- }
+ if (str.charAt(0)=='g') {
+ // Make a TimerGroup
+ TimerGroup tg = tf.timerGroups().get( str ) ;
+ if (tg == null) {
+ tg = tf.makeTimerGroup( str, str ) ;
+ timerGroups.add( tg ) ;
+ }
+ return tg ;
+ } else if (str.charAt(0)=='t') {
+ // Make a Timer
+ Timer t = tf.timers().get( str ) ;
+ if (t == null) {
+ t = tf.makeTimer( str, str ) ;
+ timers.add( t ) ;
+ }
+ return t ;
+ } else {
+ // error in test data
+ Assert.fail( "Bad data string" ) ;
+ return null ;
+ }
}
private Controllable getControllable( String str ) {
- if (str.charAt(0)=='g') {
- // Get a TimerGroup
- TimerGroup tg = tf.timerGroups().get( str ) ;
- Assert.assertTrue( tg != null ) ;
- Assert.assertEquals( tg.name(), str ) ;
- return tg ;
- } else if (str.charAt(0)=='t') {
- // Get a Timer
- Timer t = tf.timers().get( str ) ;
- Assert.assertTrue( t != null ) ;
- Assert.assertEquals( t.name(), str ) ;
- return t ;
- } else {
- // error in test data
- Assert.fail( "Bad data string" ) ;
- return null ;
- }
+ if (str.charAt(0)=='g') {
+ // Get a TimerGroup
+ TimerGroup tg = tf.timerGroups().get( str ) ;
+ Assert.assertTrue( tg != null ) ;
+ Assert.assertEquals( tg.name(), str ) ;
+ return tg ;
+ } else if (str.charAt(0)=='t') {
+ // Get a Timer
+ Timer t = tf.timers().get( str ) ;
+ Assert.assertTrue( t != null ) ;
+ Assert.assertEquals( t.name(), str ) ;
+ return t ;
+ } else {
+ // error in test data
+ Assert.fail( "Bad data string" ) ;
+ return null ;
+ }
}
@Configuration( beforeTest = true )
public void setUp() {
- tf = TimerFactoryBuilder.make( tfName, tfName ) ;
- timers = new ArrayList<Timer>() ;
- timerGroups = new ArrayList<TimerGroup>() ;
- timerGroups.add( tf ) ;
+ tf = TimerFactoryBuilder.make( tfName, tfName ) ;
+ timers = new ArrayList<Timer>() ;
+ timerGroups = new ArrayList<TimerGroup>() ;
+ timerGroups.add( tf ) ;
- for (Pair<String,List<String>> elem : data) {
- String head = elem.first() ;
- List<String> tail = elem.second() ;
- Controllable con = makeOrGetControllable( head ) ;
- Assert.assertTrue( con instanceof TimerGroup ) ;
- TimerGroup container = TimerGroup.class.cast( con ) ;
- for (String str : tail) {
- Controllable c2 = makeOrGetControllable( str ) ;
- container.add( c2 ) ;
- }
- }
+ for (Pair<String,List<String>> elem : data) {
+ String head = elem.first() ;
+ List<String> tail = elem.second() ;
+ Controllable con = makeOrGetControllable( head ) ;
+ Assert.assertTrue( con instanceof TimerGroup ) ;
+ TimerGroup container = TimerGroup.class.cast( con ) ;
+ for (String str : tail) {
+ Controllable c2 = makeOrGetControllable( str ) ;
+ container.add( c2 ) ;
+ }
+ }
- h1 = new MyTimerEventHandler( "h1" ) ;
- h2 = new MyTimerEventHandler( "h2" ) ;
- controller = tf.makeController( controllerName ) ;
+ h1 = new MyTimerEventHandler( "h1" ) ;
+ h2 = new MyTimerEventHandler( "h2" ) ;
+ controller = tf.makeController( controllerName ) ;
}
private <T extends Controllable> void checkList( List<? extends T> list,
- Map<String,? extends T> map ) {
+ Map<String,? extends T> map ) {
- Assert.assertEquals( list.size(), map.size() ) ;
- for (T t : list) {
- Assert.assertEquals( t, map.get( t.name() ) ) ;
- }
+ Assert.assertEquals( list.size(), map.size() ) ;
+ for (T t : list) {
+ Assert.assertEquals( t, map.get( t.name() ) ) ;
+ }
}
@Test()
public void validate() {
- checkList( timers, tf.timers() ) ;
- checkList( timerGroups, tf.timerGroups() ) ;
+ checkList( timers, tf.timers() ) ;
+ checkList( timerGroups, tf.timerGroups() ) ;
- for (Pair<String,List<String>> elem : data) {
- String head = elem.first() ;
- List<String> tail = elem.second() ;
- Controllable con = getControllable( head ) ;
- Assert.assertTrue( con instanceof TimerGroup ) ;
- TimerGroup container = TimerGroup.class.cast( con ) ;
- Assert.assertTrue( container.contents().size() == tail.size() ) ;
- for (String str : tail) {
- Controllable c2 = getControllable( str ) ;
- Assert.assertTrue( container.contents().contains( c2 ) ) ;
- }
- }
+ for (Pair<String,List<String>> elem : data) {
+ String head = elem.first() ;
+ List<String> tail = elem.second() ;
+ Controllable con = getControllable( head ) ;
+ Assert.assertTrue( con instanceof TimerGroup ) ;
+ TimerGroup container = TimerGroup.class.cast( con ) ;
+ Assert.assertTrue( container.contents().size() == tail.size() ) ;
+ for (String str : tail) {
+ Controllable c2 = getControllable( str ) ;
+ Assert.assertTrue( container.contents().contains( c2 ) ) ;
+ }
+ }
}
private Set<Controllable> makeControllableSet( List<String> strs ) {
- Set<Controllable> result = new HashSet<Controllable>() ;
- for (String str : strs) {
- Controllable c = getControllable( str ) ;
- result.add( c ) ;
- }
-
- return result ;
+ Set<Controllable> result = new HashSet<Controllable>() ;
+ for (String str : strs) {
+ Controllable c = getControllable( str ) ;
+ result.add( c ) ;
}
-
+
+ return result ;
+ }
+
private void enableControllables( Set<Controllable> cons ) {
- for (Controllable c : cons)
- c.enable() ;
+ for (Controllable c : cons)
+ c.enable() ;
}
private void disableAllControllables() {
- for (Controllable c : tf.contents())
- c.disable() ;
+ for (Controllable c : tf.contents())
+ c.disable() ;
}
@Test()
public void testTimerEnable() {
- for (Pair<List<String>,List<String>> pair : testData) {
- disableAllControllables() ;
- Set<Controllable> tds = makeControllableSet( pair.first() ) ;
- Set<Controllable> ers = makeControllableSet( pair.second() ) ;
- enableControllables( tds ) ;
- Set<Timer> ars = tf.activeSet() ;
- Assert.assertTrue( ers.equals( ars ) ) ;
- }
- disableAllControllables() ;
+ for (Pair<List<String>,List<String>> pair : testData) {
+ disableAllControllables() ;
+ Set<Controllable> tds = makeControllableSet( pair.first() ) ;
+ Set<Controllable> ers = makeControllableSet( pair.second() ) ;
+ enableControllables( tds ) ;
+ Set<Timer> ars = tf.activeSet() ;
+ Assert.assertTrue( ers.equals( ars ) ) ;
+ }
+ disableAllControllables() ;
}
private class MyTimerEventHandler extends NamedBase implements TimerEventHandler {
- List<TimerEvent> events ;
+ List<TimerEvent> events ;
- public MyTimerEventHandler( String name ) {
- super( tf, name ) ;
- events = new ArrayList<TimerEvent>() ;
- }
-
- public void notify( TimerEvent event ) {
- events.add( event ) ;
- }
-
- public List<TimerEvent> events() {
- return events ;
- }
+ public MyTimerEventHandler( String name ) {
+ super( tf, name ) ;
+ events = new ArrayList<TimerEvent>() ;
}
- private Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> parseEventDescription(
- String str ) {
+ public void notify( TimerEvent event ) {
+ events.add( event ) ;
+ }
- if (str.length() < 3)
- Assert.fail() ;
- String tname = str.substring( 0, 2 ) ;
- char ch = str.charAt( 2 ) ;
- String timeStr = str.substring( 3 ) ;
- int delay = 0;
- if ((timeStr != null) && (timeStr.length() > 0))
- delay = Integer.parseInt( timeStr ) ;
- Controllable c = getControllable( tname ) ;
- Assert.assertTrue( c != null && c instanceof Timer ) ;
- Timer t = Timer.class.cast( c ) ;
- TimerEvent.TimerEventType etype = null ;
- if (ch == '<')
- etype = TimerEvent.TimerEventType.ENTER ;
- else if (ch == '>')
- etype = TimerEvent.TimerEventType.EXIT ;
- else
- Assert.fail() ;
+ public List<TimerEvent> events() {
+ return events ;
+ }
+ }
- Pair<Timer,TimerEvent.TimerEventType> res1 =
- new Pair<Timer,TimerEvent.TimerEventType>( t, etype ) ;
- Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> result =
- new Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>>( delay, res1 ) ;
+ private Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> parseEventDescription(
+ String str ) {
- return result ;
+ if (str.length() < 3)
+ Assert.fail() ;
+ String tname = str.substring( 0, 2 ) ;
+ char ch = str.charAt( 2 ) ;
+ String timeStr = str.substring( 3 ) ;
+ int delay = 0;
+ if ((timeStr != null) && (timeStr.length() > 0))
+ delay = Integer.parseInt( timeStr ) ;
+ Controllable c = getControllable( tname ) ;
+ Assert.assertTrue( c != null && c instanceof Timer ) ;
+ Timer t = Timer.class.cast( c ) ;
+ TimerEvent.TimerEventType etype = null ;
+ if (ch == '<')
+ etype = TimerEvent.TimerEventType.ENTER ;
+ else if (ch == '>')
+ etype = TimerEvent.TimerEventType.EXIT ;
+ else
+ Assert.fail() ;
+
+ Pair<Timer,TimerEvent.TimerEventType> res1 =
+ new Pair<Timer,TimerEvent.TimerEventType>( t, etype ) ;
+ Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> result =
+ new Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>>( delay, res1 ) ;
+
+ return result ;
}
private void sleep( int time ) {
- if (time == 0)
- return ;
+ if (time == 0)
+ return ;
- try {
- Thread.sleep( time ) ;
- } catch (Exception exc) {
- // ignore this
- }
+ try {
+ Thread.sleep( time ) ;
+ } catch (Exception exc) {
+ // ignore this
+ }
}
private void generateEvents( TimerEventController tec, List<String> ed ) {
- for (String str : ed ) {
- Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> p =
- parseEventDescription( str ) ;
- int delay = p.first() ;
- if (p.second().second() == TimerEvent.TimerEventType.ENTER) {
- tec.enter( p.second().first() ) ;
- sleep( delay ) ;
- } else {
- sleep( delay ) ;
- tec.exit( p.second().first() ) ;
- }
- }
+ for (String str : ed ) {
+ Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> p =
+ parseEventDescription( str ) ;
+ int delay = p.first() ;
+ if (p.second().second() == TimerEvent.TimerEventType.ENTER) {
+ tec.enter( p.second().first() ) ;
+ sleep( delay ) ;
+ } else {
+ sleep( delay ) ;
+ tec.exit( p.second().first() ) ;
+ }
+ }
}
// Test for correct event sequence with non-decreasing time stamps
private void validateEvents( List<TimerEvent> elist, List<String> ed ) {
- Iterator<TimerEvent> teiter = elist.iterator() ;
- Iterator<String> editer = ed.iterator() ;
- long time = -1 ;
- while (teiter.hasNext() && editer.hasNext()) {
- TimerEvent te = teiter.next() ;
- String str = editer.next() ;
- Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> p = parseEventDescription( str ) ;
- Assert.assertEquals( te.timer(), p.second().first() ) ;
- Assert.assertEquals( te.type(), p.second().second() ) ;
- Assert.assertTrue( te.time() >= time ) ;
- time = te.time() ;
- }
-
- Assert.assertEquals( teiter.hasNext(), editer.hasNext() ) ;
+ Iterator<TimerEvent> teiter = elist.iterator() ;
+ Iterator<String> editer = ed.iterator() ;
+ long time = -1 ;
+ while (teiter.hasNext() && editer.hasNext()) {
+ TimerEvent te = teiter.next() ;
+ String str = editer.next() ;
+ Pair<Integer,Pair<Timer,TimerEvent.TimerEventType>> p = parseEventDescription( str ) ;
+ Assert.assertEquals( te.timer(), p.second().first() ) ;
+ Assert.assertEquals( te.type(), p.second().second() ) ;
+ Assert.assertTrue( te.time() >= time ) ;
+ time = te.time() ;
+ }
+
+ Assert.assertEquals( teiter.hasNext(), editer.hasNext() ) ;
}
private void displayStats( String msg, Statistics stats ) {
- System.out.println( msg ) ;
- System.out.println( "\tcount = " + stats.count() ) ;
- System.out.println( "\tmin = " + stats.min() ) ;
- System.out.println( "\tmax = " + stats.max() ) ;
- System.out.println( "\taverage = " + stats.average() ) ;
- System.out.println( "\tstandard deviation = " + stats.standardDeviation() ) ;
+ System.out.println( msg ) ;
+ System.out.println( "\tcount = " + stats.count() ) ;
+ System.out.println( "\tmin = " + stats.min() ) ;
+ System.out.println( "\tmax = " + stats.max() ) ;
+ System.out.println( "\taverage = " + stats.average() ) ;
+ System.out.println( "\tstandard deviation = " + stats.standardDeviation() ) ;
}
private void displayStatsMap( Map<Timer,Statistics> smap ) {
- for (Timer t : smap.keySet()) {
- displayStats( "Statistics for Timer " + t, smap.get(t) ) ;
- }
+ for (Timer t : smap.keySet()) {
+ displayStats( "Statistics for Timer " + t, smap.get(t) ) ;
+ }
}
@Test()
public void testStatsHandler() {
- List<String> elist = asList( "t1", "t2", "t3" ) ;
- Set<Controllable> cset = makeControllableSet( elist ) ;
- String shName = "Stats1" ;
- StatsEventHandler handler = tf.makeStatsEventHandler( shName ) ;
- controller.register( handler ) ;
- enableControllables( cset ) ;
- generateEvents( controller, evIn ) ;
- Map<Timer,Statistics> smap = handler.stats() ;
- displayStatsMap( smap ) ;
+ List<String> elist = asList( "t1", "t2", "t3" ) ;
+ Set<Controllable> cset = makeControllableSet( elist ) ;
+ String shName = "Stats1" ;
+ StatsEventHandler handler = tf.makeStatsEventHandler( shName ) ;
+ controller.register( handler ) ;
+ enableControllables( cset ) ;
+ generateEvents( controller, evIn ) ;
+ Map<Timer,Statistics> smap = handler.stats() ;
+ displayStatsMap( smap ) ;
- handler.clear() ;
- smap = handler.stats() ;
- for (Timer timer : smap.keySet()) {
- Statistics stats = smap.get( timer ) ;
- Assert.assertTrue( stats.count() == 0 ) ;
- }
+ handler.clear() ;
+ smap = handler.stats() ;
+ for (Timer timer : smap.keySet()) {
+ Statistics stats = smap.get( timer ) ;
+ Assert.assertTrue( stats.count() == 0 ) ;
+ }
}
@Test()
public void testTimerController() {
- List<String> elist = asList( "t1", "t3" ) ;
- Set<Controllable> cset = makeControllableSet( elist ) ;
- enableControllables( cset ) ;
+ List<String> elist = asList( "t1", "t3" ) ;
+ Set<Controllable> cset = makeControllableSet( elist ) ;
+ enableControllables( cset ) ;
- // Test for correct name and factory of controller
- Assert.assertEquals( controller.name(), controllerName ) ;
- Assert.assertEquals( controller.factory(), tf ) ;
+ // Test for correct name and factory of controller
+ Assert.assertEquals( controller.name(), controllerName ) ;
+ Assert.assertEquals( controller.factory(), tf ) ;
- // Test registration of event handlers
- controller.register( h1 ) ;
- controller.register( h2 ) ;
- Set<TimerEventHandler> etecSet = asSet( (TimerEventHandler)h1,
- (TimerEventHandler)h2 ) ;
- Set<TimerEventHandler> atecSet = controller.handlers() ;
- Assert.assertEquals( etecSet, atecSet ) ;
+ // Test registration of event handlers
+ controller.register( h1 ) ;
+ controller.register( h2 ) ;
+ Set<TimerEventHandler> etecSet = asSet( (TimerEventHandler)h1,
+ (TimerEventHandler)h2 ) ;
+ Set<TimerEventHandler> atecSet = controller.handlers() ;
+ Assert.assertEquals( etecSet, atecSet ) ;
- // Test event handler deregistration
- controller.deregister( h2 ) ;
- etecSet = asSet( (TimerEventHandler)h1 ) ;
- atecSet = controller.handlers() ;
- Assert.assertEquals( etecSet, atecSet ) ;
+ // Test event handler deregistration
+ controller.deregister( h2 ) ;
+ etecSet = asSet( (TimerEventHandler)h1 ) ;
+ atecSet = controller.handlers() ;
+ Assert.assertEquals( etecSet, atecSet ) ;
- // Test for correct generation of event sequence with
- // activated timers.
- controller.register( h2 ) ;
- generateEvents( controller, evIn ) ;
- List<TimerEvent> events1 = h1.events() ;
- List<TimerEvent> events2 = h2.events() ;
- Assert.assertEquals( events1, events2 ) ;
+ // Test for correct generation of event sequence with
+ // activated timers.
+ controller.register( h2 ) ;
+ generateEvents( controller, evIn ) ;
+ List<TimerEvent> events1 = h1.events() ;
+ List<TimerEvent> events2 = h2.events() ;
+ Assert.assertEquals( events1, events2 ) ;
- validateEvents( h1.events(), evOut ) ;
+ validateEvents( h1.events(), evOut ) ;
- // clean up
- controller.deregister( h1 ) ;
- controller.deregister( h2 ) ;
- disableAllControllables() ;
+ // clean up
+ controller.deregister( h1 ) ;
+ controller.deregister( h2 ) ;
+ disableAllControllables() ;
}
- @Configuration( afterTest = true )
+ @Configuration( afterTest = true )
public void tearDown() {
- TimerFactoryBuilder.destroy( tf ) ;
+ TimerFactoryBuilder.destroy( tf ) ;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/Client.java b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/Client.java
index 33df2e7..7856277 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/Client.java
@@ -54,200 +54,200 @@
// Test TimerFactoryBuilder
@Test()
public void factoryBuilderCreate1() {
- String name = "TF1" ;
- String description = "First Test Factory" ;
- TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
- Assert.assertEquals( tf.name(), name ) ;
- Assert.assertEquals( tf.description(), description ) ;
- TimerFactoryBuilder.destroy( tf ) ;
+ String name = "TF1" ;
+ String description = "First Test Factory" ;
+ TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
+ Assert.assertEquals( tf.name(), name ) ;
+ Assert.assertEquals( tf.description(), description ) ;
+ TimerFactoryBuilder.destroy( tf ) ;
}
@Test()
@ExpectedExceptions( { IllegalArgumentException.class } )
public void factoryBuilderCreate2() {
- String name = "TF1" ;
- String description = "First Test Factory" ;
- TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
- try {
- tf = TimerFactoryBuilder.make( name, description ) ;
- } finally {
- TimerFactoryBuilder.destroy( tf ) ;
- }
+ String name = "TF1" ;
+ String description = "First Test Factory" ;
+ TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
+ try {
+ tf = TimerFactoryBuilder.make( name, description ) ;
+ } finally {
+ TimerFactoryBuilder.destroy( tf ) ;
+ }
}
@Test()
public void factoryBuilderCreate3() {
- String name = "TF1" ;
- String description = "First Test Factory" ;
- TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
- TimerFactoryBuilder.destroy( tf ) ;
- tf = TimerFactoryBuilder.make( name, description ) ;
- TimerFactoryBuilder.destroy( tf ) ;
+ String name = "TF1" ;
+ String description = "First Test Factory" ;
+ TimerFactory tf = TimerFactoryBuilder.make( name, description ) ;
+ TimerFactoryBuilder.destroy( tf ) ;
+ tf = TimerFactoryBuilder.make( name, description ) ;
+ TimerFactoryBuilder.destroy( tf ) ;
}
@Test()
public void testVersionedHashSet() {
- String[] data = { "red", "orange", "yellow", "green", "blue", "indigo", "violet" } ;
- String toRemove1 = "green" ;
- String toRemove2 = "blue" ;
+ String[] data = { "red", "orange", "yellow", "green", "blue", "indigo", "violet" } ;
+ String toRemove1 = "green" ;
+ String toRemove2 = "blue" ;
- VersionedHashSet<String> tset = new VersionedHashSet<String>() ;
- long version = tset.version() ;
+ VersionedHashSet<String> tset = new VersionedHashSet<String>() ;
+ long version = tset.version() ;
- // test add
- for (String str : data)
- tset.add( str ) ;
- Assert.assertTrue( version != tset.version() ) ;
- version = tset.version() ;
+ // test add
+ for (String str : data)
+ tset.add( str ) ;
+ Assert.assertTrue( version != tset.version() ) ;
+ version = tset.version() ;
- // Add that does not change set does not change version
- tset.add( toRemove1 ) ;
- Assert.assertEquals( version, tset.version() ) ;
-
- // test direct remove
- tset.remove( toRemove1 ) ;
- Assert.assertTrue( version != tset.version() ) ;
- version = tset.version() ;
+ // Add that does not change set does not change version
+ tset.add( toRemove1 ) ;
+ Assert.assertEquals( version, tset.version() ) ;
- // Remove that does not change set does not change version
- tset.remove( toRemove1 ) ;
- Assert.assertEquals( version, tset.version() ) ;
+ // test direct remove
+ tset.remove( toRemove1 ) ;
+ Assert.assertTrue( version != tset.version() ) ;
+ version = tset.version() ;
- // test iterator without remove
- String rainbow = "" ;
- for (String str : tset)
- rainbow += " " + str ;
+ // Remove that does not change set does not change version
+ tset.remove( toRemove1 ) ;
+ Assert.assertEquals( version, tset.version() ) ;
- Assert.assertEquals( version, tset.version() ) ;
+ // test iterator without remove
+ String rainbow = "" ;
+ for (String str : tset)
+ rainbow += " " + str ;
- // test iterator with remove
- Iterator<String> iter = tset.iterator() ;
- while (iter.hasNext()) {
- String str = iter.next() ;
- if (str.equals( toRemove2 ))
- iter.remove() ;
- }
+ Assert.assertEquals( version, tset.version() ) ;
- Assert.assertTrue( version != tset.version() ) ;
+ // test iterator with remove
+ Iterator<String> iter = tset.iterator() ;
+ while (iter.hasNext()) {
+ String str = iter.next() ;
+ if (str.equals( toRemove2 ))
+ iter.remove() ;
+ }
+
+ Assert.assertTrue( version != tset.version() ) ;
}
private static void sleep( int time ) {
- try {
- Thread.sleep( time ) ;
- } catch (Exception exc) {
- // ignore it
- }
+ try {
+ Thread.sleep( time ) ;
+ } catch (Exception exc) {
+ // ignore it
+ }
}
- private void recordCall( TimingPoints tp, Timer top,
- TimerEventController controller, int transportDelay ) {
+ private void recordCall( TimingPoints tp, Timer top,
+ TimerEventController controller, int transportDelay ) {
- controller.enter( top ) ;
+ controller.enter( top ) ;
- tp.enter_hasNextNext() ;
- sleep( 1 ) ;
- tp.exit_hasNextNext() ;
+ tp.enter_hasNextNext() ;
+ sleep( 1 ) ;
+ tp.exit_hasNextNext() ;
- tp.enter_connectionSetup() ;
- sleep( 4 ) ;
- tp.exit_connectionSetup() ;
+ tp.enter_connectionSetup() ;
+ sleep( 4 ) ;
+ tp.exit_connectionSetup() ;
- tp.enter_clientEncoding() ;
- sleep( 100 ) ;
- tp.exit_clientEncoding() ;
+ tp.enter_clientEncoding() ;
+ sleep( 100 ) ;
+ tp.exit_clientEncoding() ;
- tp.enter_clientTransportAndWait() ;
- sleep( transportDelay ) ;
- tp.exit_clientTransportAndWait() ;
+ tp.enter_clientTransportAndWait() ;
+ sleep( transportDelay ) ;
+ tp.exit_clientTransportAndWait() ;
- tp.enter_clientDecoding() ;
- sleep( 40 ) ;
- tp.exit_clientDecoding() ;
+ tp.enter_clientDecoding() ;
+ sleep( 40 ) ;
+ tp.exit_clientDecoding() ;
- controller.exit( top ) ;
+ controller.exit( top ) ;
}
Map<Timer,Statistics> makeData() {
- // Setup timing points and a top-level timer
- Properties props = new Properties() ;
- props.setProperty( "org.omg.CORBA.ORBClass",
- "com.sun.corba.ee.impl.orb.ORBImpl" ) ;
- ORB orb = (ORB)ORB.init( new String[0], props ) ;
+ // Setup timing points and a top-level timer
+ Properties props = new Properties() ;
+ props.setProperty( "org.omg.CORBA.ORBClass",
+ "com.sun.corba.ee.impl.orb.ORBImpl" ) ;
+ ORB orb = (ORB)ORB.init( new String[0], props ) ;
- try {
- TimerManager<TimingPoints> tm = orb.getTimerManager() ;
- TimingPoints tp = tm.points() ;
- TimerFactory tf = tm.factory() ;
- TimerEventController controller = tm.controller() ;
- StatsEventHandler handler = tf.makeStatsEventHandler( "TestStats" ) ;
- controller.register( handler ) ;
- Timer top = tf.makeTimer( "top", "Encloses the entire operation" ) ;
- top.enable() ;
- tp.transport.enable() ;
- handler.clear() ;
+ try {
+ TimerManager<TimingPoints> tm = orb.getTimerManager() ;
+ TimingPoints tp = tm.points() ;
+ TimerFactory tf = tm.factory() ;
+ TimerEventController controller = tm.controller() ;
+ StatsEventHandler handler = tf.makeStatsEventHandler( "TestStats" ) ;
+ controller.register( handler ) ;
+ Timer top = tf.makeTimer( "top", "Encloses the entire operation" ) ;
+ top.enable() ;
+ tp.transport.enable() ;
+ handler.clear() ;
- // Simulate the actions of the ORB client transport
- recordCall( tp, top, controller, 25 ) ;
- recordCall( tp, top, controller, 31 ) ;
- recordCall( tp, top, controller, 27 ) ;
- recordCall( tp, top, controller, 42 ) ;
- recordCall( tp, top, controller, 19 ) ;
- recordCall( tp, top, controller, 21 ) ;
- recordCall( tp, top, controller, 23 ) ;
- recordCall( tp, top, controller, 25 ) ;
- recordCall( tp, top, controller, 34 ) ;
- recordCall( tp, top, controller, 33 ) ;
- recordCall( tp, top, controller, 31 ) ;
- recordCall( tp, top, controller, 28 ) ;
- recordCall( tp, top, controller, 27 ) ;
- recordCall( tp, top, controller, 29 ) ;
- recordCall( tp, top, controller, 30 ) ;
- recordCall( tp, top, controller, 31 ) ;
- recordCall( tp, top, controller, 28 ) ;
+ // Simulate the actions of the ORB client transport
+ recordCall( tp, top, controller, 25 ) ;
+ recordCall( tp, top, controller, 31 ) ;
+ recordCall( tp, top, controller, 27 ) ;
+ recordCall( tp, top, controller, 42 ) ;
+ recordCall( tp, top, controller, 19 ) ;
+ recordCall( tp, top, controller, 21 ) ;
+ recordCall( tp, top, controller, 23 ) ;
+ recordCall( tp, top, controller, 25 ) ;
+ recordCall( tp, top, controller, 34 ) ;
+ recordCall( tp, top, controller, 33 ) ;
+ recordCall( tp, top, controller, 31 ) ;
+ recordCall( tp, top, controller, 28 ) ;
+ recordCall( tp, top, controller, 27 ) ;
+ recordCall( tp, top, controller, 29 ) ;
+ recordCall( tp, top, controller, 30 ) ;
+ recordCall( tp, top, controller, 31 ) ;
+ recordCall( tp, top, controller, 28 ) ;
- return handler.stats() ;
- } finally {
- orb.destroy() ;
- }
+ return handler.stats() ;
+ } finally {
+ orb.destroy() ;
+ }
}
@Test()
void generateStatsTable() {
- Map<Timer, Statistics> data = makeData() ;
+ Map<Timer, Statistics> data = makeData() ;
- TimerUtils.writeHtmlTable( data, "stats.html",
- "Client Test Timing Data" ) ;
+ TimerUtils.writeHtmlTable( data, "stats.html",
+ "Client Test Timing Data" ) ;
}
public static void main( String[] args ) {
- TestNG tng = new TestNG() ;
+ TestNG tng = new TestNG() ;
- Class<?> cls = null ;
+ Class<?> cls = null ;
- try {
- cls = Class.forName( "corba.timer.TimerPointsSuite" ) ;
- } catch (Exception exc) {
- System.out.println( "Caught exception: " + exc ) ;
- exc.printStackTrace() ;
- }
+ try {
+ cls = Class.forName( "corba.timer.TimerPointsSuite" ) ;
+ } catch (Exception exc) {
+ System.out.println( "Caught exception: " + exc ) ;
+ exc.printStackTrace() ;
+ }
- List<Class<?>> classes = new ArrayList<Class<?>>( asList(
- Client.class,
- NamedBaseSuite.class,
- ControllableBaseSuite.class,
- TimerFactorySuite.class,
- ActivationSuite.class ) ) ;
+ List<Class<?>> classes = new ArrayList<Class<?>>( asList(
+ Client.class,
+ NamedBaseSuite.class,
+ ControllableBaseSuite.class,
+ TimerFactorySuite.class,
+ ActivationSuite.class ) ) ;
- if (cls != null)
- classes.add( cls ) ;
+ if (cls != null)
+ classes.add( cls ) ;
- Class[] tngClasses = classes.toArray( new Class<?>[ classes.size() ] ) ;
+ Class[] tngClasses = classes.toArray( new Class<?>[ classes.size() ] ) ;
- tng.setTestClasses( tngClasses ) ;
+ tng.setTestClasses( tngClasses ) ;
- tng.run() ;
+ tng.run() ;
System.out.println("tng.hasFailure="+tng.hasFailure());
- System.exit( tng.hasFailure() ? 1 : 0 ) ;
+ System.exit( tng.hasFailure() ? 1 : 0 ) ;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/ControllableBaseSuite.java b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/ControllableBaseSuite.java
index 0975eb1..b518c6d 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/ControllableBaseSuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/ControllableBaseSuite.java
@@ -47,40 +47,40 @@
private ControllableTest ct ;
private static class ControllableTest extends ControllableBase {
- public ControllableTest( int id, String name, String description,
- TimerFactory factory ) {
+ public ControllableTest( int id, String name, String description,
+ TimerFactory factory ) {
- super( id, name, description, TimerFactoryImpl.class.cast( factory ) ) ;
- }
+ super( id, name, description, TimerFactoryImpl.class.cast( factory ) ) ;
+ }
}
@Configuration( beforeTest = true )
public void setUp() {
- factory = TimerFactoryBuilder.make( "CTF", "No description" ) ;
- ct = new ControllableTest( id, name, description, factory ) ;
+ factory = TimerFactoryBuilder.make( "CTF", "No description" ) ;
+ ct = new ControllableTest( id, name, description, factory ) ;
}
- @Configuration( afterTest = true )
+ @Configuration( afterTest = true )
public void tearDown() {
- TimerFactoryBuilder.destroy( factory ) ;
+ TimerFactoryBuilder.destroy( factory ) ;
}
@Test()
public void testId() {
- Assert.assertEquals( id, ct.id() ) ;
+ Assert.assertEquals( id, ct.id() ) ;
}
- @Test()
+ @Test()
public void testDescription() {
- Assert.assertEquals( description, ct.description() ) ;
+ Assert.assertEquals( description, ct.description() ) ;
}
@Test()
public void testEnable() {
- Assert.assertFalse( ct.isEnabled() ) ;
- ct.enable() ;
- Assert.assertTrue( ct.isEnabled() ) ;
- ct.disable() ;
- Assert.assertFalse( ct.isEnabled() ) ;
+ Assert.assertFalse( ct.isEnabled() ) ;
+ ct.enable() ;
+ Assert.assertTrue( ct.isEnabled() ) ;
+ ct.disable() ;
+ Assert.assertFalse( ct.isEnabled() ) ;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/NamedBaseSuite.java b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/NamedBaseSuite.java
index 12da4ee..f21cb5c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/NamedBaseSuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/NamedBaseSuite.java
@@ -44,94 +44,94 @@
private NamedTest nb2 ;
private static class NamedTest extends NamedBase {
- public NamedTest( TimerFactory factory, String name ) {
- super( factory, name ) ;
- }
+ public NamedTest( TimerFactory factory, String name ) {
+ super( factory, name ) ;
+ }
- public void finish( TimerFactory factory ) {
- setFactory( factory ) ;
- }
+ public void finish( TimerFactory factory ) {
+ setFactory( factory ) ;
+ }
}
@Configuration( beforeTest = true )
public void setUp() {
- factory = TimerFactoryBuilder.make( "NTF", "No description" ) ;
- nb1 = new NamedTest( factory, name ) ;
- nb2 = new NamedTest( null, name ) ;
+ factory = TimerFactoryBuilder.make( "NTF", "No description" ) ;
+ nb1 = new NamedTest( factory, name ) ;
+ nb2 = new NamedTest( null, name ) ;
}
- @Configuration( afterTest = true )
+ @Configuration( afterTest = true )
public void tearDown() {
- TimerFactoryBuilder.destroy( factory ) ;
+ TimerFactoryBuilder.destroy( factory ) ;
}
- @Test()
+ @Test()
public void name1() {
- Assert.assertEquals( name, nb1.name() ) ;
+ Assert.assertEquals( name, nb1.name() ) ;
}
- @Test()
+ @Test()
public void name2() {
- Assert.assertEquals( name, nb2.name() ) ;
+ Assert.assertEquals( name, nb2.name() ) ;
}
@Test()
public void factory1() {
- Assert.assertEquals( factory, nb1.factory() ) ;
+ Assert.assertEquals( factory, nb1.factory() ) ;
}
@Test()
- @ExpectedExceptions( { IllegalStateException.class } )
+ @ExpectedExceptions( { IllegalStateException.class } )
public void factory2() {
- TimerFactory tf = nb2.factory() ;
+ TimerFactory tf = nb2.factory() ;
}
@Test()
public void equals() {
- Assert.assertEquals( nb1, nb2 ) ;
+ Assert.assertEquals( nb1, nb2 ) ;
}
@Test()
public void hashCode1() {
- Assert.assertEquals( nb1.hashCode(), name.hashCode() ) ;
+ Assert.assertEquals( nb1.hashCode(), name.hashCode() ) ;
}
@Test()
public void hashCode2() {
- Assert.assertEquals( nb2.hashCode(), name.hashCode() ) ;
+ Assert.assertEquals( nb2.hashCode(), name.hashCode() ) ;
}
@Test()
public void toString1() {
- Assert.assertEquals( factory.name() + ":" +
- name, nb1.toString() ) ;
+ Assert.assertEquals( factory.name() + ":" +
+ name, nb1.toString() ) ;
}
@Test()
- @ExpectedExceptions( { IllegalStateException.class } )
+ @ExpectedExceptions( { IllegalStateException.class } )
public void toString2() {
- String ts = nb2.toString() ;
+ String ts = nb2.toString() ;
}
@Test()
- @ExpectedExceptions( { IllegalStateException.class } )
+ @ExpectedExceptions( { IllegalStateException.class } )
public void setFactory1() {
- nb1.finish( factory ) ;
+ nb1.finish( factory ) ;
}
- @Test( dependsOnMethods = { "toString2", "factory2" } )
+ @Test( dependsOnMethods = { "toString2", "factory2" } )
public void setFactory2() {
- nb2.finish( factory ) ;
+ nb2.finish( factory ) ;
}
@Test( dependsOnMethods = { "setFactory2" } )
- public void factory2Post() {
- Assert.assertEquals( factory, nb2.factory() ) ;
+ public void factory2Post() {
+ Assert.assertEquals( factory, nb2.factory() ) ;
}
@Test( dependsOnMethods = { "setFactory2" } )
- public void toString2Post() {
- Assert.assertEquals( factory.name() + ":" +
- name, nb2.toString() ) ;
+ public void toString2Post() {
+ Assert.assertEquals( factory.name() + ":" +
+ name, nb2.toString() ) ;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/TimerFactorySuite.java b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/TimerFactorySuite.java
index 223ac91..00deda2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/TimerFactorySuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/TimerFactorySuite.java
@@ -56,121 +56,121 @@
private TimerGroup tg1 ;
private static final int EXPECTED_NUM_TIMERS = 2 ;
-
+
// Remember, the factory is also a TimerGroup!
private static final int EXPECTED_NUM_TIMER_GROUPS = 2 ;
- private static final int EXPECTED_NUM_IDS =
- EXPECTED_NUM_TIMERS + EXPECTED_NUM_TIMER_GROUPS ;
+ private static final int EXPECTED_NUM_IDS =
+ EXPECTED_NUM_TIMERS + EXPECTED_NUM_TIMER_GROUPS ;
@Configuration( beforeTest = true )
public void setUp() {
- tf = TimerFactoryBuilder.make( tfName, tfDescription ) ;
- t1 = tf.makeTimer( timer1Name, timer1Description ) ;
- t2 = tf.makeTimer( timer2Name, timer2Description ) ;
- tg1 = tf.makeTimerGroup( timerGroup1Name, timerGroup1Description ) ;
+ tf = TimerFactoryBuilder.make( tfName, tfDescription ) ;
+ t1 = tf.makeTimer( timer1Name, timer1Description ) ;
+ t2 = tf.makeTimer( timer2Name, timer2Description ) ;
+ tg1 = tf.makeTimerGroup( timerGroup1Name, timerGroup1Description ) ;
}
- @Configuration( afterTest = true )
+ @Configuration( afterTest = true )
public void tearDown() {
- TimerFactoryBuilder.destroy( tf ) ;
+ TimerFactoryBuilder.destroy( tf ) ;
}
@Test()
public void testNumberOfIds() {
- Assert.assertEquals( EXPECTED_NUM_IDS, tf.numberOfIds() ) ;
+ Assert.assertEquals( EXPECTED_NUM_IDS, tf.numberOfIds() ) ;
}
@Test()
public void testGetControllable1() {
- int id = t1.id() ;
- Controllable con = tf.getControllable( id ) ;
- Assert.assertTrue( con instanceof Timer ) ;
- Timer timer = Timer.class.cast( con ) ;
- Assert.assertEquals( t1, timer ) ;
+ int id = t1.id() ;
+ Controllable con = tf.getControllable( id ) ;
+ Assert.assertTrue( con instanceof Timer ) ;
+ Timer timer = Timer.class.cast( con ) ;
+ Assert.assertEquals( t1, timer ) ;
}
@Test()
public void testGetControllable2() {
- int id = t2.id() ;
- Controllable con = tf.getControllable( id ) ;
- Assert.assertTrue( con instanceof Timer ) ;
- Timer timer = Timer.class.cast( con ) ;
- Assert.assertEquals( t2, timer ) ;
+ int id = t2.id() ;
+ Controllable con = tf.getControllable( id ) ;
+ Assert.assertTrue( con instanceof Timer ) ;
+ Timer timer = Timer.class.cast( con ) ;
+ Assert.assertEquals( t2, timer ) ;
}
@Test()
public void testGetControllable3() {
- int id = tg1.id() ;
- Controllable con = tf.getControllable( id ) ;
- Assert.assertTrue( con instanceof TimerGroup ) ;
- TimerGroup tg = TimerGroup.class.cast( con ) ;
- Assert.assertEquals( tg1, tg ) ;
+ int id = tg1.id() ;
+ Controllable con = tf.getControllable( id ) ;
+ Assert.assertTrue( con instanceof TimerGroup ) ;
+ TimerGroup tg = TimerGroup.class.cast( con ) ;
+ Assert.assertEquals( tg1, tg ) ;
}
@Test()
public void testMakeLogEventHandler() {
- String name = "LogEventHandler1" ;
- TimerEventHandler h1 = tf.makeLogEventHandler( name ) ;
- Assert.assertEquals( h1.name(), name ) ;
- try {
- tf.makeLogEventHandler( name ) ;
- Assert.fail( "Should throw an exception" ) ;
- } catch (IllegalArgumentException exc) {
- // this is correct
- } catch (Throwable thr) {
- Assert.fail( "Unexpected exception " + thr ) ;
- }
- try {
- tf.makeStatsEventHandler( name ) ;
- Assert.fail( "Should throw an exception" ) ;
- } catch (IllegalArgumentException exc) {
- // this is correct
- } catch (Throwable thr) {
- Assert.fail( "Unexpected exception " + thr ) ;
- }
- tf.removeTimerEventHandler( h1 ) ;
- h1 = tf.makeLogEventHandler( name ) ;
- tf.removeTimerEventHandler( h1 ) ;
- h1 = tf.makeStatsEventHandler( name ) ;
+ String name = "LogEventHandler1" ;
+ TimerEventHandler h1 = tf.makeLogEventHandler( name ) ;
+ Assert.assertEquals( h1.name(), name ) ;
+ try {
+ tf.makeLogEventHandler( name ) ;
+ Assert.fail( "Should throw an exception" ) ;
+ } catch (IllegalArgumentException exc) {
+ // this is correct
+ } catch (Throwable thr) {
+ Assert.fail( "Unexpected exception " + thr ) ;
+ }
+ try {
+ tf.makeStatsEventHandler( name ) ;
+ Assert.fail( "Should throw an exception" ) ;
+ } catch (IllegalArgumentException exc) {
+ // this is correct
+ } catch (Throwable thr) {
+ Assert.fail( "Unexpected exception " + thr ) ;
+ }
+ tf.removeTimerEventHandler( h1 ) ;
+ h1 = tf.makeLogEventHandler( name ) ;
+ tf.removeTimerEventHandler( h1 ) ;
+ h1 = tf.makeStatsEventHandler( name ) ;
}
@Test()
public void testTimers() {
- Map<String,? extends Timer> tmap = tf.timers() ;
- Assert.assertEquals( tmap.size(), EXPECTED_NUM_TIMERS ) ;
- Timer x1 = tmap.get( timer1Name ) ;
- Assert.assertEquals( x1, t1 ) ;
- Timer x2 = tmap.get( timer2Name ) ;
- Assert.assertEquals( x2, t2 ) ;
+ Map<String,? extends Timer> tmap = tf.timers() ;
+ Assert.assertEquals( tmap.size(), EXPECTED_NUM_TIMERS ) ;
+ Timer x1 = tmap.get( timer1Name ) ;
+ Assert.assertEquals( x1, t1 ) ;
+ Timer x2 = tmap.get( timer2Name ) ;
+ Assert.assertEquals( x2, t2 ) ;
}
@Test()
public void testTimerGroups() {
- Map<String,? extends TimerGroup> tmap = tf.timerGroups() ;
- Assert.assertEquals( tmap.size(), EXPECTED_NUM_TIMER_GROUPS ) ;
- TimerGroup x1 = tmap.get( timerGroup1Name ) ;
- Assert.assertEquals( x1, tg1 ) ;
- TimerGroup x2 = tmap.get( tfName ) ;
- Assert.assertEquals( x2, tf ) ;
+ Map<String,? extends TimerGroup> tmap = tf.timerGroups() ;
+ Assert.assertEquals( tmap.size(), EXPECTED_NUM_TIMER_GROUPS ) ;
+ TimerGroup x1 = tmap.get( timerGroup1Name ) ;
+ Assert.assertEquals( x1, tg1 ) ;
+ TimerGroup x2 = tmap.get( tfName ) ;
+ Assert.assertEquals( x2, tf ) ;
}
@Test()
public void testMakeController() {
- String name = "Controller1" ;
- TimerEventController controller = tf.makeController( name ) ;
- Assert.assertEquals( controller.name(), name ) ;
- try {
- tf.makeController( name ) ;
- Assert.fail( "Should throw an exception" ) ;
- } catch (IllegalArgumentException exc) {
- // this is correct
- } catch (Throwable thr) {
- Assert.fail( "Unexpected exception " + thr ) ;
- }
- tf.removeController( controller ) ;
- controller = tf.makeController( name ) ;
+ String name = "Controller1" ;
+ TimerEventController controller = tf.makeController( name ) ;
+ Assert.assertEquals( controller.name(), name ) ;
+ try {
+ tf.makeController( name ) ;
+ Assert.fail( "Should throw an exception" ) ;
+ } catch (IllegalArgumentException exc) {
+ // this is correct
+ } catch (Throwable thr) {
+ Assert.fail( "Unexpected exception " + thr ) ;
+ }
+ tf.removeController( controller ) ;
+ controller = tf.makeController( name ) ;
}
// enabledSet and activeSet are tested in the ActivationSuite
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/TimerPointsSuite.java b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/TimerPointsSuite.java
index 6ab7dbe..b5caf80 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/TimerPointsSuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/TimerPointsSuite.java
@@ -48,19 +48,19 @@
public class TimerPointsSuite {
@Test()
public void testXMLParser() {
- // We should be running this test from the corba/timer directory.
- String fileName = "tests/test/timing.xml" ;
+ // We should be running this test from the corba/timer directory.
+ String fileName = "tests/test/timing.xml" ;
- Pair<String,TimerFactory> result = null ;
- try {
- // Parse the XML file.
- result = TimerPointSourceGenerator.parseDescription( fileName ) ;
+ Pair<String,TimerFactory> result = null ;
+ try {
+ // Parse the XML file.
+ result = TimerPointSourceGenerator.parseDescription( fileName ) ;
- // Try to generate the source file
- TimerPointSourceGenerator.generateSourceFile( "gen", result ) ;
- } catch (IOException ioexc) {
- ioexc.printStackTrace() ;
- Assert.fail( "IOException: " + ioexc ) ;
- }
+ // Try to generate the source file
+ TimerPointSourceGenerator.generateSourceFile( "gen", result ) ;
+ } catch (IOException ioexc) {
+ ioexc.printStackTrace() ;
+ Assert.fail( "IOException: " + ioexc ) ;
+ }
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/timing.xml b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/timing.xml
index b7ee359..971511c 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/timing.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/test/timing.xml
@@ -35,34 +35,34 @@
<timer name="test7" description="A test timer"/>
<timerGroup name="tg1" description="A test timer group">
- <contains name="test1"/>
- <contains name="test2"/>
- <contains name="test3"/>
- <contains name="tg3"/>
+ <contains name="test1"/>
+ <contains name="test2"/>
+ <contains name="test3"/>
+ <contains name="tg3"/>
</timerGroup>
<timerGroup name="tg2" description="A test timer group">
- <contains name="test4"/>
- <contains name="test5"/>
- <contains name="tg1"/>
+ <contains name="test4"/>
+ <contains name="test5"/>
+ <contains name="tg1"/>
</timerGroup>
<timerGroup name="tg3" description="A test timer group">
- <contains name="test6"/>
- <contains name="test7"/>
- <contains name="tg2"/>
+ <contains name="test6"/>
+ <contains name="test7"/>
+ <contains name="tg2"/>
</timerGroup>
<timerGroup name="transportClient" description="Major events in client side request cycle">
- <contains name="hasNextNext"/>
- <contains name="connectionSetup"/>
- <contains name="clientEncoding"/>
- <contains name="clientTransportAndWait"/>
- <contains name="clientDecoding"/>
+ <contains name="hasNextNext"/>
+ <contains name="connectionSetup"/>
+ <contains name="clientEncoding"/>
+ <contains name="clientTransportAndWait"/>
+ <contains name="clientDecoding"/>
</timerGroup>
<timerGroup name="transport" description="All transport activity">
- <contains name="transportClient"/>
+ <contains name="transportClient"/>
</timerGroup>
</timing>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/LogProcessorAverager.java b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/LogProcessorAverager.java
index b21c262..2c95434 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/LogProcessorAverager.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/LogProcessorAverager.java
@@ -64,75 +64,75 @@
private static final long SCALE = 1000000000;
- public static void main(String[] av)
+ public static void main(String[] av)
{
- data = new HashMap<Integer, Point>();
- beginPointNameToInt = new HashMap<String, Integer>();
- filename = av[0];
+ data = new HashMap<Integer, Point>();
+ beginPointNameToInt = new HashMap<String, Integer>();
+ filename = av[0];
- try {
- BufferedReader br = new BufferedReader(new FileReader(filename));
- readPoints(br);
- readData(br);
- showResults();
- } catch (Exception e) {
+ try {
+ BufferedReader br = new BufferedReader(new FileReader(filename));
+ readPoints(br);
+ readData(br);
+ showResults();
+ } catch (Exception e) {
e.printStackTrace();
}
}
public static void readPoints(BufferedReader br)
- throws Exception
+ throws Exception
{
- String line;
- int id = 0;
- while ((line = br.readLine()) != null) {
- if (line.equals("#####")) {
- return;
- }
- String[] beginOrEndAndPointName = line.split(" ");
- String beginOrEnd = beginOrEndAndPointName[0];
- String name = beginOrEndAndPointName[1];
- int intId = id++;
- if (beginOrEnd.equals("BEGIN")) {
- beginPointNameToInt.put(name, intId);
- data.put(intId, new BeginPoint(intId, name));
- } else {
- data.put(intId,
- new EndPoint(intId, name, data, beginPointNameToInt));
- }
- }
+ String line;
+ int id = 0;
+ while ((line = br.readLine()) != null) {
+ if (line.equals("#####")) {
+ return;
+ }
+ String[] beginOrEndAndPointName = line.split(" ");
+ String beginOrEnd = beginOrEndAndPointName[0];
+ String name = beginOrEndAndPointName[1];
+ int intId = id++;
+ if (beginOrEnd.equals("BEGIN")) {
+ beginPointNameToInt.put(name, intId);
+ data.put(intId, new BeginPoint(intId, name));
+ } else {
+ data.put(intId,
+ new EndPoint(intId, name, data, beginPointNameToInt));
+ }
+ }
}
public static void readData(BufferedReader br)
- throws Exception
+ throws Exception
{
- String line;
- while ((line = br.readLine()) != null) {
- String[] idAndTime = line.split(" ");
- int id = Integer.parseInt(idAndTime[0]);
- long time = Long.parseLong(idAndTime[1]);
- data.get(id).setValue(time);
- }
+ String line;
+ while ((line = br.readLine()) != null) {
+ String[] idAndTime = line.split(" ");
+ int id = Integer.parseInt(idAndTime[0]);
+ long time = Long.parseLong(idAndTime[1]);
+ data.get(id).setValue(time);
+ }
}
public static void showResults()
{
- // Remove begin points.
- for (Integer id : beginPointNameToInt.values()) {
- data.remove(id);
- }
- System.out.println("----------------------------------------");
- System.out.println(filename);
- for (Point point : data.values()) {
- System.out.println(point.getName()
- + " "
- + point.getAverage() / SCALE
- + " "
- + format(point.getAverage() / SCALE)
- + " "
- + " iterations " + point.getIterations());
- }
- System.out.println("----------------------------------------");
+ // Remove begin points.
+ for (Integer id : beginPointNameToInt.values()) {
+ data.remove(id);
+ }
+ System.out.println("----------------------------------------");
+ System.out.println(filename);
+ for (Point point : data.values()) {
+ System.out.println(point.getName()
+ + " "
+ + point.getAverage() / SCALE
+ + " "
+ + format(point.getAverage() / SCALE)
+ + " "
+ + " iterations " + point.getIterations());
+ }
+ System.out.println("----------------------------------------");
}
public static String format(double d) {
@@ -148,9 +148,9 @@
Point(int intId, String name)
{
- this.intId = intId;
- this.name = name;
- value = -1;
+ this.intId = intId;
+ this.name = name;
+ value = -1;
}
int getIntId() { return intId; }
String getName() { return name; }
@@ -158,9 +158,9 @@
void setValue(long x) { value = x; }
double getAverage() { throw new RuntimeException("Not Implemented"); }
int getIterations() { throw new RuntimeException("Not Implemented"); }
- String toStringString()
+ String toStringString()
{
- return intId + " " + name + " " + value;
+ return intId + " " + name + " " + value;
}
}
@@ -168,11 +168,11 @@
{
BeginPoint(int intId, String name)
{
- super(intId, name);
+ super(intId, name);
}
public String toString()
{
- return "BeginPoint[ " + toStringString() + " ]";
+ return "BeginPoint[ " + toStringString() + " ]";
}
}
@@ -183,32 +183,32 @@
int iterations;
EndPoint(int intId, String name, Map<Integer, Point> data,
- Map<String, Integer> beginPointNameToInt)
+ Map<String, Integer> beginPointNameToInt)
{
- super(intId, name);
- this.data = data;
- this.beginPointNameToInt = beginPointNameToInt;
- iterations = 0;
+ super(intId, name);
+ this.data = data;
+ this.beginPointNameToInt = beginPointNameToInt;
+ iterations = 0;
}
void setValue(long endTime)
{
- int startId = beginPointNameToInt.get(name);
- long startTime = data.get(startId).getValue();
- long elapsedTime = endTime - startTime;
- value += elapsedTime;
- iterations++;
+ int startId = beginPointNameToInt.get(name);
+ long startTime = data.get(startId).getValue();
+ long elapsedTime = endTime - startTime;
+ value += elapsedTime;
+ iterations++;
}
- double getAverage()
+ double getAverage()
{
- return value / iterations;
+ return value / iterations;
}
int getIterations()
{
- return iterations;
+ return iterations;
}
public String toString()
{
- return "EndPoint[ " + toStringString() + " " + iterations + " ]";
+ return "EndPoint[ " + toStringString() + " " + iterations + " ]";
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/TimerPointSourceGenerator.java b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/TimerPointSourceGenerator.java
index deba67f..517a5ed 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/TimerPointSourceGenerator.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/TimerPointSourceGenerator.java
@@ -64,376 +64,376 @@
*
* Note on bootstrapping: the time point file needs to be generated
* before the bulk of the ORB is built. This requires compiling
- * the newtimer and codegen classes into a library file that is
+ * the newtimer and codegen classes into a library file that is
* checked into SCCS.
*/
public class TimerPointSourceGenerator {
private static class TimingInfoProcessor {
- private boolean done = false ;
- private String pkg ;
- private TimerFactory tf ;
- private Map<String,List<String>> contents ;
- private TimerGroup currentTimerGroup ;
+ private boolean done = false ;
+ private String pkg ;
+ private TimerFactory tf ;
+ private Map<String,List<String>> contents ;
+ private TimerGroup currentTimerGroup ;
- private void checkForValidIdentifier( String name ) {
- if (!Identifier.isValidIdentifier( name ))
- throw new IllegalArgumentException(
- "name " + name + " is not a valid Java identifier" ) ;
- }
+ private void checkForValidIdentifier( String name ) {
+ if (!Identifier.isValidIdentifier( name ))
+ throw new IllegalArgumentException(
+ "name " + name + " is not a valid Java identifier" ) ;
+ }
- private void checkDone() {
- if (done)
- throw new IllegalStateException(
- "past getResult: no other methods may be called" ) ;
- }
+ private void checkDone() {
+ if (done)
+ throw new IllegalStateException(
+ "past getResult: no other methods may be called" ) ;
+ }
- public TimingInfoProcessor( String name, String pkg ) {
- this.done = false ;
- this.pkg = pkg ;
- checkForValidIdentifier( name ) ;
- if (!Identifier.isValidFullIdentifier( pkg ))
- throw new IllegalArgumentException(
- pkg + " is not a valid package name" ) ;
- this.tf = TimerFactoryBuilder.make( name, name ) ;
- this.contents = new HashMap<String,List<String>>() ;
- this.currentTimerGroup = null ;
- }
+ public TimingInfoProcessor( String name, String pkg ) {
+ this.done = false ;
+ this.pkg = pkg ;
+ checkForValidIdentifier( name ) ;
+ if (!Identifier.isValidFullIdentifier( pkg ))
+ throw new IllegalArgumentException(
+ pkg + " is not a valid package name" ) ;
+ this.tf = TimerFactoryBuilder.make( name, name ) ;
+ this.contents = new HashMap<String,List<String>>() ;
+ this.currentTimerGroup = null ;
+ }
- public void addTimer( String name, String desc ) {
- checkDone() ;
- checkForValidIdentifier( name ) ;
- tf.makeTimer( name, desc ) ;
- currentTimerGroup = null ;
- }
+ public void addTimer( String name, String desc ) {
+ checkDone() ;
+ checkForValidIdentifier( name ) ;
+ tf.makeTimer( name, desc ) ;
+ currentTimerGroup = null ;
+ }
- public void addTimerGroup( String name, String desc ) {
- checkDone() ;
- checkForValidIdentifier( name ) ;
- currentTimerGroup = tf.makeTimerGroup( name, desc ) ;
- }
+ public void addTimerGroup( String name, String desc ) {
+ checkDone() ;
+ checkForValidIdentifier( name ) ;
+ currentTimerGroup = tf.makeTimerGroup( name, desc ) ;
+ }
- public void contains( String name ) {
- checkDone() ;
- if (currentTimerGroup == null) {
- throw new IllegalStateException(
- "contains must be called after an addTimerGroup call" ) ;
- } else {
- String cname = currentTimerGroup.name() ;
- List<String> list = contents.get( cname ) ;
- if (list == null) {
- list = new ArrayList<String>() ;
- contents.put( cname, list ) ;
- }
+ public void contains( String name ) {
+ checkDone() ;
+ if (currentTimerGroup == null) {
+ throw new IllegalStateException(
+ "contains must be called after an addTimerGroup call" ) ;
+ } else {
+ String cname = currentTimerGroup.name() ;
+ List<String> list = contents.get( cname ) ;
+ if (list == null) {
+ list = new ArrayList<String>() ;
+ contents.put( cname, list ) ;
+ }
- list.add( name ) ;
- }
- }
+ list.add( name ) ;
+ }
+ }
- private static Controllable getControllable( TimerFactory tf, String name ) {
- Controllable result = tf.timers().get( name ) ;
- if (result == null)
- result = tf.timerGroups().get( name ) ;
- if (result == null)
- throw new IllegalArgumentException(
- name + " is not a valid Timer or TimerGroup name" ) ;
- return result ;
- }
+ private static Controllable getControllable( TimerFactory tf, String name ) {
+ Controllable result = tf.timers().get( name ) ;
+ if (result == null)
+ result = tf.timerGroups().get( name ) ;
+ if (result == null)
+ throw new IllegalArgumentException(
+ name + " is not a valid Timer or TimerGroup name" ) ;
+ return result ;
+ }
- private void updateTimerFactoryContents() {
- // Use the Map<String,List<String>> to fill in the TimerGroup
- // containment relation
- for (String str : contents.keySet()) {
- List<String> list = contents.get(str) ;
- TimerGroup tg = tf.timerGroups().get( str ) ;
- for (String content : list) {
- tg.add( getControllable( tf, content ) ) ;
- }
- }
- }
+ private void updateTimerFactoryContents() {
+ // Use the Map<String,List<String>> to fill in the TimerGroup
+ // containment relation
+ for (String str : contents.keySet()) {
+ List<String> list = contents.get(str) ;
+ TimerGroup tg = tf.timerGroups().get( str ) ;
+ for (String content : list) {
+ tg.add( getControllable( tf, content ) ) ;
+ }
+ }
+ }
- public Pair<String,TimerFactory> getResult() {
- checkDone() ;
- done = true ;
- updateTimerFactoryContents() ;
- Pair<String,TimerFactory> result =
- new Pair<String,TimerFactory>( pkg, tf ) ;
- return result ;
- }
+ public Pair<String,TimerFactory> getResult() {
+ checkDone() ;
+ done = true ;
+ updateTimerFactoryContents() ;
+ Pair<String,TimerFactory> result =
+ new Pair<String,TimerFactory>( pkg, tf ) ;
+ return result ;
+ }
}
private static class Handler extends DefaultHandler {
- private static final int WIDTH = 4 ;
+ private static final int WIDTH = 4 ;
- // Names of XML elements and attributes
- private static final String TIMER_ELEMENT = "timer" ;
- private static final String TIMING_ELEMENT = "timing" ;
- private static final String TIMER_GROUP_ELEMENT = "timerGroup" ;
- private static final String CONTAINS_ELEMENT = "contains" ;
+ // Names of XML elements and attributes
+ private static final String TIMER_ELEMENT = "timer" ;
+ private static final String TIMING_ELEMENT = "timing" ;
+ private static final String TIMER_GROUP_ELEMENT = "timerGroup" ;
+ private static final String CONTAINS_ELEMENT = "contains" ;
- private static final String NAME_ATTR = "name" ;
- private static final String DESCRIPTION_ATTR = "description" ;
- private static final String PACKAGE_ATTR = "package" ;
+ private static final String NAME_ATTR = "name" ;
+ private static final String DESCRIPTION_ATTR = "description" ;
+ private static final String PACKAGE_ATTR = "package" ;
- private boolean debug ;
- private int level ;
- private char[] pad ;
- private TimingInfoProcessor tip ;
- private Pair<String,TimerFactory> result ;
+ private boolean debug ;
+ private int level ;
+ private char[] pad ;
+ private TimingInfoProcessor tip ;
+ private Pair<String,TimerFactory> result ;
- public Handler( boolean debug ) {
- this.debug = debug ;
- this.level = 0 ;
- setPad() ;
- this.tip = null ;
- this.result = null ;
- }
-
- private void indent() {
- level++ ;
- setPad() ;
- }
-
- private void undent() {
- level-- ;
- setPad() ;
- }
-
- private void setPad() {
- int length = WIDTH * level ;
- pad = new char[length] ;
- for (int ctr=0; ctr<length; ctr++)
- pad[ctr] = ' ' ;
- }
-
- private void dprint( String msg ) {
- if (debug) {
- System.out.print( pad ) ;
- System.out.println( msg ) ;
- }
- }
-
- public void startDocument() throws SAXException {
- dprint( "startDocument called" ) ;
- }
-
- public void endDocument() throws SAXException {
- dprint( "endDocument called" ) ;
- result = tip.getResult() ;
- }
-
- public void startElement( String namespaceURI,
- String lName, String qName, Attributes attrs )
- throws SAXException {
-
- indent() ;
-
- // only qName is useful
- dprint( "namespaceURI=" + namespaceURI ) ;
- dprint( "lName=" + lName ) ;
- dprint( "qName=" + qName ) ;
- dprint( "Attributes:" ) ;
-
- // only local name, value are useful
- for (int ctr=0; ctr<attrs.getLength(); ctr++) {
- dprint( "\tlocal name =" + attrs.getLocalName(ctr) ) ;
- dprint( "\tqualified name=" + attrs.getQName(ctr) ) ;
- dprint( "\tvalue =" + attrs.getValue(ctr) ) ;
- }
-
- if (qName.equals( TIMING_ELEMENT )) {
- String name = attrs.getValue( NAME_ATTR ) ;
- String pkg = attrs.getValue( PACKAGE_ATTR ) ;
- tip = new TimingInfoProcessor( name, pkg ) ;
- } else if (qName.equals( TIMER_ELEMENT )) {
- String name = attrs.getValue( NAME_ATTR ) ;
- String desc = attrs.getValue( DESCRIPTION_ATTR ) ;
- tip.addTimer( name, desc ) ;
- } else if (qName.equals( TIMER_GROUP_ELEMENT )) {
- String name = attrs.getValue( NAME_ATTR ) ;
- String desc = attrs.getValue( DESCRIPTION_ATTR ) ;
- tip.addTimerGroup( name, desc ) ;
- } else if (qName.equals( CONTAINS_ELEMENT )) {
- String name = attrs.getValue( NAME_ATTR ) ;
- tip.contains( name ) ;
- } else {
- throw new IllegalStateException(
- "Unknown XML element: " + qName ) ;
- }
- }
-
- public void endElement( String namespaceURI,
- String lName, String qName ) throws SAXException {
-
- undent() ;
- }
-
- public Pair<String,TimerFactory> getResult() {
- return result ;
- }
+ public Handler( boolean debug ) {
+ this.debug = debug ;
+ this.level = 0 ;
+ setPad() ;
+ this.tip = null ;
+ this.result = null ;
}
- public static Pair<String,TimerFactory> parseDescription(
- String fileName ) throws IOException {
- return parseDescription( fileName, false ) ;
+ private void indent() {
+ level++ ;
+ setPad() ;
+ }
+
+ private void undent() {
+ level-- ;
+ setPad() ;
+ }
+
+ private void setPad() {
+ int length = WIDTH * level ;
+ pad = new char[length] ;
+ for (int ctr=0; ctr<length; ctr++)
+ pad[ctr] = ' ' ;
+ }
+
+ private void dprint( String msg ) {
+ if (debug) {
+ System.out.print( pad ) ;
+ System.out.println( msg ) ;
+ }
+ }
+
+ public void startDocument() throws SAXException {
+ dprint( "startDocument called" ) ;
+ }
+
+ public void endDocument() throws SAXException {
+ dprint( "endDocument called" ) ;
+ result = tip.getResult() ;
+ }
+
+ public void startElement( String namespaceURI,
+ String lName, String qName, Attributes attrs )
+ throws SAXException {
+
+ indent() ;
+
+ // only qName is useful
+ dprint( "namespaceURI=" + namespaceURI ) ;
+ dprint( "lName=" + lName ) ;
+ dprint( "qName=" + qName ) ;
+ dprint( "Attributes:" ) ;
+
+ // only local name, value are useful
+ for (int ctr=0; ctr<attrs.getLength(); ctr++) {
+ dprint( "\tlocal name =" + attrs.getLocalName(ctr) ) ;
+ dprint( "\tqualified name=" + attrs.getQName(ctr) ) ;
+ dprint( "\tvalue =" + attrs.getValue(ctr) ) ;
+ }
+
+ if (qName.equals( TIMING_ELEMENT )) {
+ String name = attrs.getValue( NAME_ATTR ) ;
+ String pkg = attrs.getValue( PACKAGE_ATTR ) ;
+ tip = new TimingInfoProcessor( name, pkg ) ;
+ } else if (qName.equals( TIMER_ELEMENT )) {
+ String name = attrs.getValue( NAME_ATTR ) ;
+ String desc = attrs.getValue( DESCRIPTION_ATTR ) ;
+ tip.addTimer( name, desc ) ;
+ } else if (qName.equals( TIMER_GROUP_ELEMENT )) {
+ String name = attrs.getValue( NAME_ATTR ) ;
+ String desc = attrs.getValue( DESCRIPTION_ATTR ) ;
+ tip.addTimerGroup( name, desc ) ;
+ } else if (qName.equals( CONTAINS_ELEMENT )) {
+ String name = attrs.getValue( NAME_ATTR ) ;
+ tip.contains( name ) ;
+ } else {
+ throw new IllegalStateException(
+ "Unknown XML element: " + qName ) ;
+ }
+ }
+
+ public void endElement( String namespaceURI,
+ String lName, String qName ) throws SAXException {
+
+ undent() ;
+ }
+
+ public Pair<String,TimerFactory> getResult() {
+ return result ;
+ }
+ }
+
+ public static Pair<String,TimerFactory> parseDescription(
+ String fileName ) throws IOException {
+ return parseDescription( fileName, false ) ;
}
/** Return the package for the file to generate and a TimerFactory
* that contains all of the information from the XML source file
* given by fileName.
*/
- public static Pair<String,TimerFactory> parseDescription(
- String fileName, boolean debug ) throws IOException {
+ public static Pair<String,TimerFactory> parseDescription(
+ String fileName, boolean debug ) throws IOException {
- Handler handler = new Handler( debug ) ;
- SAXParserFactory factory = SAXParserFactory.newInstance() ;
- factory.setValidating( true ) ;
- File file = null ;
+ Handler handler = new Handler( debug ) ;
+ SAXParserFactory factory = SAXParserFactory.newInstance() ;
+ factory.setValidating( true ) ;
+ File file = null ;
- try {
- SAXParser saxParser = factory.newSAXParser() ;
- file = new File( fileName ) ;
- saxParser.parse( file, handler ) ;
- } catch (Exception exc) {
- System.out.println( "Exception in processing " + file + ": " + exc ) ;
- exc.printStackTrace() ;
- return null ;
- }
+ try {
+ SAXParser saxParser = factory.newSAXParser() ;
+ file = new File( fileName ) ;
+ saxParser.parse( file, handler ) ;
+ } catch (Exception exc) {
+ System.out.println( "Exception in processing " + file + ": " + exc ) ;
+ exc.printStackTrace() ;
+ return null ;
+ }
- return handler.getResult() ;
+ return handler.getResult() ;
}
/** Generate the source file for the Timers in the TimerFactory from the description.
- * The file is generated in the directory given by the package from the description
+ * The file is generated in the directory given by the package from the description
* starting at the dirName. The name of the file is NAME.java, where NAME
* is the TimerFactory name from the description.
*/
- public static void generateSourceFile( String dirName,
- Pair<String,TimerFactory> description ) throws IOException {
+ public static void generateSourceFile( String dirName,
+ Pair<String,TimerFactory> description ) throws IOException {
- _clear() ;
- _package( description.first() ) ;
- _import( "java.lang.Object" ) ;
- _import( "java.lang.String" ) ;
- _import( "com.sun.corba.ee.spi.orb.ORB" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.Controllable" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerManager" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerFactory" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.Timer" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerEventController" ) ;
- _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerGroup" ) ;
+ _clear() ;
+ _package( description.first() ) ;
+ _import( "java.lang.Object" ) ;
+ _import( "java.lang.String" ) ;
+ _import( "com.sun.corba.ee.spi.orb.ORB" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.Controllable" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerManager" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerFactory" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.Timer" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerEventController" ) ;
+ _import( "com.sun.corba.ee.spi.orbutil.newtimer.TimerGroup" ) ;
- TimerFactory tf = description.second() ;
- _class( PUBLIC, tf.name(), _t("Object") ) ;
+ TimerFactory tf = description.second() ;
+ _class( PUBLIC, tf.name(), _t("Object") ) ;
- // no static initializer needed
-
- generateFields( tf ) ;
- generateConstructor( tf ) ;
- generateEnterExitMethods( tf ) ;
+ // no static initializer needed
- _end() ; // of class generation
+ generateFields( tf ) ;
+ generateConstructor( tf ) ;
+ generateEnterExitMethods( tf ) ;
- File dir = new File( dirName ) ;
- String pkg = description.first() ;
- String fileDir = pkg.replace( '.', File.separatorChar ) ;
- File fdir = new File( dir, fileDir ) ;
- // mkdirs only returns true if dirs were created, so
- // false may or may not indicate an error.
- fdir.mkdirs() ;
- File file = new File( fdir, tf.name() + ".java" ) ;
- PrintStream ps = new PrintStream( file ) ;
- _sourceCode( ps, new Properties() ) ;
+ _end() ; // of class generation
+
+ File dir = new File( dirName ) ;
+ String pkg = description.first() ;
+ String fileDir = pkg.replace( '.', File.separatorChar ) ;
+ File fdir = new File( dir, fileDir ) ;
+ // mkdirs only returns true if dirs were created, so
+ // false may or may not indicate an error.
+ fdir.mkdirs() ;
+ File file = new File( fdir, tf.name() + ".java" ) ;
+ PrintStream ps = new PrintStream( file ) ;
+ _sourceCode( ps, new Properties() ) ;
}
private static void generateFields( TimerFactory tf ) {
- _data( PRIVATE|FINAL, _t("TimerEventController"), "controller" ) ;
+ _data( PRIVATE|FINAL, _t("TimerEventController"), "controller" ) ;
- for (Timer t : tf.timers().values()) {
- Type type = _t("Timer") ;
- _data( PUBLIC|FINAL, type, t.name() ) ;
- }
+ for (Timer t : tf.timers().values()) {
+ Type type = _t("Timer") ;
+ _data( PUBLIC|FINAL, type, t.name() ) ;
+ }
- for (TimerGroup tg : tf.timerGroups().values()) {
- Type type = _t("TimerGroup") ;
- _data( PUBLIC|FINAL, type, tg.name() ) ;
- }
+ for (TimerGroup tg : tf.timerGroups().values()) {
+ Type type = _t("TimerGroup") ;
+ _data( PUBLIC|FINAL, type, tg.name() ) ;
+ }
}
private static void generateConstructor( TimerFactory tf ) {
- _constructor( PUBLIC ) ;
- _arg( _t("TimerFactory"), "tf" ) ;
- _arg( _t("TimerEventController"), "controller" ) ;
- _body() ;
+ _constructor( PUBLIC ) ;
+ _arg( _t("TimerFactory"), "tf" ) ;
+ _arg( _t("TimerEventController"), "controller" ) ;
+ _body() ;
- // set up orb and tm
- _assign( _field( _this(), "controller" ), _v( "controller" ) ) ;
+ // set up orb and tm
+ _assign( _field( _this(), "controller" ), _v( "controller" ) ) ;
- // create all timers
- Signature tsig = _s( _t("Timer"), _t("String"), _t("String") ) ;
- for (Timer t : tf.timers().values() ) {
- _assign( _v( t.name() ),
- _call( _v("tf"), "makeTimer", tsig,
- _const(t.name()), _const(t.description()))) ;
- }
-
- // create all timer groups
- Signature tgsig = _s( _t("TimerGroup"), _t("String"),
- _t("String") ) ;
- for (TimerGroup tg : tf.timerGroups().values() ) {
- _assign( _v( tg.name() ),
- _call( _v("tf"), "makeTimerGroup", tgsig,
- _const(tg.name()), _const(tg.description()))) ;
- }
-
- // fill in timer group containment
- Signature addSig = _s( _void(), _t("Controllable")) ;
- for (TimerGroup tg : tf.timerGroups().values() ) {
- for (Controllable c : tg.contents() ) {
- _expr(
- _call( _v(tg.name()), "add", addSig,
- _v(c.name()))) ;
- }
- }
+ // create all timers
+ Signature tsig = _s( _t("Timer"), _t("String"), _t("String") ) ;
+ for (Timer t : tf.timers().values() ) {
+ _assign( _v( t.name() ),
+ _call( _v("tf"), "makeTimer", tsig,
+ _const(t.name()), _const(t.description()))) ;
+ }
- _end() ;
+ // create all timer groups
+ Signature tgsig = _s( _t("TimerGroup"), _t("String"),
+ _t("String") ) ;
+ for (TimerGroup tg : tf.timerGroups().values() ) {
+ _assign( _v( tg.name() ),
+ _call( _v("tf"), "makeTimerGroup", tgsig,
+ _const(tg.name()), _const(tg.description()))) ;
+ }
+
+ // fill in timer group containment
+ Signature addSig = _s( _void(), _t("Controllable")) ;
+ for (TimerGroup tg : tf.timerGroups().values() ) {
+ for (Controllable c : tg.contents() ) {
+ _expr(
+ _call( _v(tg.name()), "add", addSig,
+ _v(c.name()))) ;
+ }
+ }
+
+ _end() ;
}
private static void generateEnterExitMethods( TimerFactory tf ) {
- // generate enter and exit method for each Timer
- for (Timer t : tf.timers().values() ) {
- generateMethod( "enter", t.name() ) ;
- generateMethod( "exit", t.name() ) ;
- }
+ // generate enter and exit method for each Timer
+ for (Timer t : tf.timers().values() ) {
+ generateMethod( "enter", t.name() ) ;
+ generateMethod( "exit", t.name() ) ;
+ }
}
// XXX we should add JavaDoc support to codegen, and use it
// for the enter/exit methods.
private static void generateMethod( String op, String timer ) {
- _method( PUBLIC, _void(), op+"_"+timer ) ;
- _body() ;
- Signature sig = _s(_void(), _t("TimerEventController")) ;
- _expr( _call( _v("controller"), op, sig, _v(timer))) ;
- _end() ;
+ _method( PUBLIC, _void(), op+"_"+timer ) ;
+ _body() ;
+ Signature sig = _s(_void(), _t("TimerEventController")) ;
+ _expr( _call( _v("controller"), op, sig, _v(timer))) ;
+ _end() ;
}
public static void main( String[] args ) {
- // arguments: infile outdir debug
- if (args.length != 3) {
- System.out.println( "Required arguments: input-file output-directory" ) ;
- System.exit( 1 ) ;
- } else {
- try {
- String infile = args[0] ;
- String outdir = args[1] ;
- boolean debug = Boolean.parseBoolean( args[2] ) ;
- Pair<String,TimerFactory> result = parseDescription( infile,
- debug ) ;
- generateSourceFile( outdir, result ) ;
- } catch (Exception exc) {
- System.out.println( "Failed with exception: " + exc ) ;
- exc.printStackTrace() ;
- System.exit( 1 ) ;
- }
- }
+ // arguments: infile outdir debug
+ if (args.length != 3) {
+ System.out.println( "Required arguments: input-file output-directory" ) ;
+ System.exit( 1 ) ;
+ } else {
+ try {
+ String infile = args[0] ;
+ String outdir = args[1] ;
+ boolean debug = Boolean.parseBoolean( args[2] ) ;
+ Pair<String,TimerFactory> result = parseDescription( infile,
+ debug ) ;
+ generateSourceFile( outdir, result ) ;
+ } catch (Exception exc) {
+ System.out.println( "Failed with exception: " + exc ) ;
+ exc.printStackTrace() ;
+ System.exit( 1 ) ;
+ }
+ }
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/TimerUtils.java b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/TimerUtils.java
index d50c557..5bd7fca 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/TimerUtils.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/corba/timer/tests/utils/TimerUtils.java
@@ -34,85 +34,85 @@
public class TimerUtils {
- private TimerUtils() {}
+ private TimerUtils() {}
- public static void dumpLogToFile( TimerFactory tf, LogEventHandler log,
- File file ) {
-
- PrintStream ps = null ;
- try {
- ps = new PrintStream( file ) ;
+ public static void dumpLogToFile( TimerFactory tf, LogEventHandler log,
+ File file ) {
- // Dump the timer and timer group names to the file in numerical order
- // Time group names are not used, but this will be compatible
- // with the log event processor.
- for (int ctr=0; ctr<tf.numberOfIds(); ctr++) {
- Controllable con = tf.getControllable( ctr ) ;
- ps.println( "BEGIN " + con.name() ) ;
- ps.println( "END " + con.name() ) ;
- }
+ PrintStream ps = null ;
+ try {
+ ps = new PrintStream( file ) ;
- ps.println( "#####" ) ;
+ // Dump the timer and timer group names to the file in numerical order
+ // Time group names are not used, but this will be compatible
+ // with the log event processor.
+ for (int ctr=0; ctr<tf.numberOfIds(); ctr++) {
+ Controllable con = tf.getControllable( ctr ) ;
+ ps.println( "BEGIN " + con.name() ) ;
+ ps.println( "END " + con.name() ) ;
+ }
- // Dump the timer info
- for ( TimerEvent event : log ) {
- int id = event.timer().id() ;
- if (event.type() == TimerEvent.TimerEventType.ENTER)
- id = 2*id ;
- else // EXIT event
- id = 2*id + 1 ;
- ps.println( id + " " + event.time() ) ;
- }
- } catch (Exception exc) {
- System.out.println( "Error in dumping " + log + " to file " + file
- + ": " + exc ) ;
- exc.printStackTrace() ;
- } finally {
- if (ps != null)
- ps.close() ;
- }
+ ps.println( "#####" ) ;
+
+ // Dump the timer info
+ for ( TimerEvent event : log ) {
+ int id = event.timer().id() ;
+ if (event.type() == TimerEvent.TimerEventType.ENTER)
+ id = 2*id ;
+ else // EXIT event
+ id = 2*id + 1 ;
+ ps.println( id + " " + event.time() ) ;
+ }
+ } catch (Exception exc) {
+ System.out.println( "Error in dumping " + log + " to file " + file
+ + ": " + exc ) ;
+ exc.printStackTrace() ;
+ } finally {
+ if (ps != null)
+ ps.close() ;
+ }
}
private static class Connector {
- public String name ;
- public long count ;
- public double min ;
- public double max ;
- public double average ;
- public double standardDeviation ;
-
- public Connector( String name, long count, double min,
- double max, double average, double standardDeviation ) {
+ public String name ;
+ public long count ;
+ public double min ;
+ public double max ;
+ public double average ;
+ public double standardDeviation ;
- this.name = name ;
- this.count = count ;
- this.min = min ;
- this.max = max ;
- this.average = average ;
- this.standardDeviation = standardDeviation ;
- }
+ public Connector( String name, long count, double min,
+ double max, double average, double standardDeviation ) {
+
+ this.name = name ;
+ this.count = count ;
+ this.min = min ;
+ this.max = max ;
+ this.average = average ;
+ this.standardDeviation = standardDeviation ;
+ }
}
private static String concat( String[] strs ) {
- StringBuilder sb = new StringBuilder() ;
- for( String str : strs ) {
- sb.append( str ) ;
- sb.append( '\n' ) ;
- }
- return sb.toString() ;
+ StringBuilder sb = new StringBuilder() ;
+ for( String str : strs ) {
+ sb.append( str ) ;
+ sb.append( '\n' ) ;
+ }
+ return sb.toString() ;
}
/** Write the Timer data in the Map to the named file with the given
* title.
*/
public static void writeHtmlTable( Map<Timer, Statistics> data,
- String fname, String title ) {
+ String fname, String title ) {
- // open a file and a printWriter here
- PrintWriter pw = null ;
- try {
- pw = new PrintWriter( fname ) ;
- pw.println(
+ // open a file and a printWriter here
+ PrintWriter pw = null ;
+ try {
+ pw = new PrintWriter( fname ) ;
+ pw.println(
"<html>"+
"<head>"+
" <title>" + title + "</title>"+
@@ -129,29 +129,29 @@
" <td>std deviation</td>"+
" </tr>");
- for (Timer timer : data.keySet() ) {
- Statistics stats = data.get( timer ) ;
- pw.println(
- " <tr>"+
- " <td>"+timer.name()+"</td>"+
- " <td>"+stats.count()+"</td>"+
- " <td>"+stats.min()+"</td>"+
- " <td>"+stats.max()+"</td>"+
- " <td>"+stats.average()+"</td>"+
- " <td>"+stats.standardDeviation()+"</td>"+
- " </tr>");
- }
+ for (Timer timer : data.keySet() ) {
+ Statistics stats = data.get( timer ) ;
+ pw.println(
+ " <tr>"+
+ " <td>"+timer.name()+"</td>"+
+ " <td>"+stats.count()+"</td>"+
+ " <td>"+stats.min()+"</td>"+
+ " <td>"+stats.max()+"</td>"+
+ " <td>"+stats.average()+"</td>"+
+ " <td>"+stats.standardDeviation()+"</td>"+
+ " </tr>");
+ }
pw.println(
- "</table>"+
- "</body>"+
- "</html>");
+ "</table>"+
+ "</body>"+
+ "</html>");
- } catch (Exception exc) {
- throw new RuntimeException( exc ) ;
- } finally {
- if (pw != null)
- pw.close() ;
- }
+ } catch (Exception exc) {
+ throw new RuntimeException( exc ) ;
+ } finally {
+ if (pw != null)
+ pw.close() ;
+ }
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/properties.xml b/appserver/tests/v2-tests/appserv-tests/devtestsNG/properties.xml
index d067039..900166f 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/properties.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/properties.xml
@@ -36,11 +36,11 @@
<target name="init-common" depends="setToolProperty,setS1ASclassPath">
<!-- Appserver setup properties -->
-<echo message="Loading props from file ${env.APS_HOME}/config.properties"
+<echo message="Loading props from file ${env.APS_HOME}/config.properties"
level="verbose"/>
<property name="pe" value="Platform Edition of S1AS"/>
- <property file="${env.APS_HOME}/config.properties"/>
+ <property file="${env.APS_HOME}/config.properties"/>
<echo message="admin.domain ${admin.domain}" level="verbose"/>
<echo message="admin.user ${admin.user}" level="verbose"/>
<echo message="admin.port ${admin.port}" level="verbose"/>
@@ -85,21 +85,21 @@
<property name="appclient.application.args" value="" />
<!-- Test Harnes properties -->
- <property name="build.base.dir"
+ <property name="build.base.dir"
value="${env.APS_HOME}/build/module"/>
- <property name="build.webapps.dir"
+ <property name="build.webapps.dir"
value="${env.APS_HOME}/build/wars"/>
- <property name="build.classes.dir"
+ <property name="build.classes.dir"
value="${build.base.dir}/classes"/>
- <property name="build.assemble.dir"
+ <property name="build.assemble.dir"
value="${build.base.dir}/archive"/>
- <property name="results.dir"
+ <property name="results.dir"
value="${build.base.dir}/results"/>
<property name="build.s1astest.classpath"
value="${build.classes.dir}:${env.APS_HOME}/lib/reporter.jar:${s1as.classpath}:${db.classpath}:${Derby.classpath}"/>
- <property name="ejbjar.classes"
+ <property name="ejbjar.classes"
value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Bean*.class" />
- <property name="appclientjar.classes"
+ <property name="appclientjar.classes"
value="**/*Local*.class,**/*Remote*.class,**/*Client*.class" />
<property name="webclient.war.files"
value="${build.classes.dir}"/>
@@ -137,20 +137,20 @@
<fileset dir="${env.S1AS_HOME}/lib" includes="*.jar"/>
<!-- fileset dir="${env.S1AS_HOME}/imq/lib" includes="*.jar"/ -->
</path>
- <pathconvert pathsep=":"
- property="s1as.classpath"
+ <pathconvert pathsep=":"
+ property="s1as.classpath"
refid="s1as_classpath_jars"/>
</target>
-<target name="setToolProperty"
+<target name="setToolProperty"
depends="setOSConditions,setToolWin,setToolUnix">
</target>
<!--
- This was needed to make sure that we can
- differentiate between .exe/.bat for windows and .sh for solaris.
+ This was needed to make sure that we can
+ differentiate between .exe/.bat for windows and .sh for solaris.
-->
-<target name="setOSConditions">
+<target name="setOSConditions">
<condition property="isUnix">
<os family="unix"/>
</condition>
@@ -160,17 +160,17 @@
</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="ASANT" value="${env.S1AS_HOME}/bin/asant.bat"/>
- <property name="CAPTURESCHEMA"
+ <property name="CAPTURESCHEMA"
value="${env.S1AS_HOME}/bin/capture-schema.bat"/>
<property name="CHECKPATCH" value="${env.S1AS_HOME}/bin/checkpatch.bat"/>
<property name="INSTALLPATCH" value="${env.S1AS_HOME}/bin/installpatch.bat"/>
<property name="JSPC" value="${env.S1AS_HOME}/bin/jspc.bat"/>
<property name="LISTPATCH" value="${env.S1AS_HOME}/bin/listpatch.bat"/>
- <property name="PACKAGE-APPCLIENT"
+ <property name="PACKAGE-APPCLIENT"
value="${env.S1AS_HOME}/bin/package-appclient.bat"/>
<property name="VERIFIER" value="${env.S1AS_HOME}/bin/verifier.bat"/>
<property name="RMIC" value="${env.S1AS_HOME}/jdk/bin/rmic.exe"/>
@@ -178,15 +178,15 @@
<property name="WSCOMPILE" value="${env.S1AS_HOME}/bin/wscompile.bat"/>
<property name="WSIMPORT" value="${env.S1AS_HOME}/bin/wsimport.bat"/>
- <property name="pb.start.server"
+ <property name="pb.start.server"
value="${env.S1AS_HOME}/pointbase/server/StartServer.bat"/>
- <property name="pb.start.server1"
+ <property name="pb.start.server1"
value="${env.S1AS_HOME}/pointbase/server/StartServer1.bat"/>
<property name="IMQDBMGR" value="${env.S1AS_HOME}/imq/bin/imqdbmgr.bat"/>
<property name="ld.library.path" location="${env.S1AS_HOME}/lib;${env.S1AS_HOME}/bin"/>
</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="ASANT" value="${env.S1AS_HOME}/bin/asant"/>
@@ -195,23 +195,23 @@
<property name="INSTALLPATCH" value="${env.S1AS_HOME}/bin/installpatch"/>
<property name="JSPC" value="${env.S1AS_HOME}/bin/jspc"/>
<property name="LISTPATCH" value="${env.S1AS_HOME}/bin/listpatch"/>
- <property name="PACKAGE-APPCLIENT"
+ <property name="PACKAGE-APPCLIENT"
value="${env.S1AS_HOME}/bin/package-appclient"/>
<property name="VERIFIER" value="${env.S1AS_HOME}/bin/verifier"/>
<property name="RMIC" value="${env.S1AS_HOME}/jdk/bin/rmic"/>
<property name="TNAMESERV" value="${env.S1AS_HOME}/jdk/bin/tnameserv"/>
<property name="WSCOMPILE" value="${env.S1AS_HOME}/bin/wscompile"/>
<property name="WSIMPORT" value="${env.S1AS_HOME}/bin/wsimport"/>
- <property name="pb.start.server"
+ <property name="pb.start.server"
value="${env.S1AS_HOME}/pointbase/server/StartServer"/>
- <property name="pb.start.server1"
+ <property name="pb.start.server1"
value="${env.S1AS_HOME}/pointbase/server/StartServer1"/>
<property name="IMQDBMGR" value="${env.S1AS_HOME}/imq/bin/imqdbmgr"/>
<property name="ld.library.path" location="${env.S1AS_HOME}/lib:${env.S1AS_HOME}/bin"/>
</target>
<!--
-the fixFiles target removes all ^M charectars from the end of
+the fixFiles target removes all ^M charectars from the end of
lines of MANIFEST.MF files since they are very sensitive to it.
-->
<target name="fixFiles" depends="setOSConditions" >
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/build.xml b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/build.xml
index bc5f8ae..6668724 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/build.xml
@@ -52,8 +52,8 @@
</target>
<target name="usage">
- <echo>Usage: ant all
- </echo>
+ <echo>Usage: ant all
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/build.properties b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/build.properties
index 5521238..9645b46 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/build.properties
@@ -15,7 +15,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="my-module" value="web"/>
<property name="my-app-name" value="${my-module}-jsp-resource-injection-tag-handler"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/build.xml b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/build.xml
index 9d471b0..ea569b1 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/build.xml
@@ -68,7 +68,7 @@
<antcall target="common-build-war">
<param name="hasWebclient" value="yes"/>
</antcall>
- </target>
+ </target>
<!-- deploy war file -->
<target name="deploy" depends="init-common">
@@ -104,7 +104,7 @@
<!-- Undeploy the test app -->
<target name="undeploy" depends="init-common">
<antcall target="common-undeploy-war"/>
- </target>
+ </target>
<!-- Cleanup -->
<target name="clean" depends="init-common">
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/tests/WebTestNG.java b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/tests/WebTestNG.java
index 9f14f0b..b52f578 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/tests/WebTestNG.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/jspResourceInjectionTagHandler/tests/WebTestNG.java
@@ -57,7 +57,7 @@
while ((line = input.readLine()) != null) {
lastLine = line;
}
-
+
Assert.assertEquals(lastLine, EXPECTED_RESPONSE);
}
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/build.properties b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/build.properties
index a1c0a82..8bb93f2 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/build.properties
@@ -15,7 +15,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="my-module" value="web"/>
<property name="my-app-name" value="${my-module}-session-id-url-rewrite"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/build.xml b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/build.xml
index f74df7a..5b41c00 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/build.xml
@@ -57,7 +57,7 @@
<antcall target="common-build-war">
<param name="hasWebclient" value="yes"/>
</antcall>
- </target>
+ </target>
<target name="deploy" depends="init-common">
<antcall target="common-deploy-war"/>
@@ -98,9 +98,9 @@
<delete dir="test-report"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="common-undeploy-war"/>
- </target>
+ </target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/tests/WebTestNG.java b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/tests/WebTestNG.java
index 90d9a36..cd58f1e 100644
--- a/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/tests/WebTestNG.java
+++ b/appserver/tests/v2-tests/appserv-tests/devtestsNG/web/sessionIdUrlRewrite/tests/WebTestNG.java
@@ -40,7 +40,7 @@
System.out.println(get);
os.write(get.getBytes());
os.write("\n".getBytes());
-
+
InputStream is = sock.getInputStream();
BufferedReader bis = new BufferedReader(new InputStreamReader(is));
@@ -63,7 +63,7 @@
conn.connect();
int responseCode = conn.getResponseCode();
- assert responseCode == 200;
+ assert responseCode == 200;
bis = new BufferedReader(new InputStreamReader(conn.getInputStream()));
while ((line = bis.readLine()) != null) {
diff --git a/appserver/tests/v2-tests/appserv-tests/lib/ejbtimer_derby.sql b/appserver/tests/v2-tests/appserv-tests/lib/ejbtimer_derby.sql
index a4a5495..de55583 100755
--- a/appserver/tests/v2-tests/appserv-tests/lib/ejbtimer_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/lib/ejbtimer_derby.sql
@@ -2,8 +2,8 @@
create table EJB__TIMER__TBL (
CREATIONTIMERAW BIGINT NOT NULL,
-BLOB BLOB(2G),
-TIMERID VARCHAR(255) NOT NULL,
+BLOB BLOB(2G),
+TIMERID VARCHAR(255) NOT NULL,
CONTAINERID BIGINT NOT NULL,
OWNERID VARCHAR(255),
STATE INTEGER NOT NULL,
diff --git a/appserver/tests/v2-tests/appserv-tests/run.sh b/appserver/tests/v2-tests/appserv-tests/run.sh
index 5b3567b..d127fc7 100644
--- a/appserver/tests/v2-tests/appserv-tests/run.sh
+++ b/appserver/tests/v2-tests/appserv-tests/run.sh
@@ -114,7 +114,7 @@
elif [ "$1" = "all" ]; then
TEST_TARGET="all";
else
- usage;
+ usage;
fi
echo "granting permissions...";
echo "grant codeBase \"file:${APS_HOME}/-\" {permission java.security.AllPermission;};" >> $S1AS_HOME/lib/appclient/client.policy;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/build.properties
index 4e45dbb..392f848 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/build.properties
@@ -14,7 +14,7 @@
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#
-
+
admin.domain=domain1
admin.domain.dir=${env.S1AS_HOME}/domains
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/build.xml
index 09cce1e..97f0604 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/build.xml
@@ -35,7 +35,7 @@
<property name="classes.dir" value="classes" />
<property name="test.class" value="AdminGUITest" />
- <!-- uncomment this, when you want to run standalone
+ <!-- uncomment this, when you want to run standalone
<property file="./build.properties" />
-->
<property name="classpath" value="" />
@@ -66,7 +66,7 @@
debug="on" deprecation="off" optimize="off">
<classpath>
<path refid="base.classpath" />
- </classpath>
+ </classpath>
</javac>
</target>
@@ -87,18 +87,18 @@
<target name="run-test" depends="compile, get-version-common, init-common">
<!-- Not needed anymore, JSSE.java is doing this
- <antcall target="get-certdb-to-jks" />
- -->
+ <antcall target="get-certdb-to-jks" />
+ -->
<java classname="${test.class}" fork="yes" >
- <sysproperty key="ADMIN_HOST" value="${admin.host}" />
- <sysproperty key="ADMIN_PORT" value="${admin.port}" />
- <sysproperty key="ADMIN_PASSWORD" value="${admin.password}" />
- <sysproperty key="ADMIN_USER" value="${admin.user}" />
- <!--
- <sysproperty key="IS_EE" value="pe" />
- <sysproperty key="javax.net.ssl.trustStore" value="./certdb.jks" />
- <sysproperty key="javax.net.ssl.trustStorePassword" value="${ssl.password}" />
- -->
+ <sysproperty key="ADMIN_HOST" value="${admin.host}" />
+ <sysproperty key="ADMIN_PORT" value="${admin.port}" />
+ <sysproperty key="ADMIN_PASSWORD" value="${admin.password}" />
+ <sysproperty key="ADMIN_USER" value="${admin.user}" />
+ <!--
+ <sysproperty key="IS_EE" value="pe" />
+ <sysproperty key="javax.net.ssl.trustStore" value="./certdb.jks" />
+ <sysproperty key="javax.net.ssl.trustStorePassword" value="${ssl.password}" />
+ -->
<classpath>
<path refid="base.classpath" />
<pathelement location="${build.classes.dir}" />
@@ -112,8 +112,8 @@
<!-- Generate truststore for ee -->
<!-- =================================================================== -->
<target name="import-cert-jks" >
- <echo message="Installing certificate in ${keystore.file} ..."/>
- <exec executable="${env.JAVA_HOME}/bin/keytool">
+ <echo message="Installing certificate in ${keystore.file} ..."/>
+ <exec executable="${env.JAVA_HOME}/bin/keytool">
<arg value="-import"/>
<arg value="-noprompt"/>
<arg value="-trustcacerts"/>
@@ -130,14 +130,14 @@
<!-- Get certificate from NSS db to JKS format -->
<target name="get-certdb-to-jks" if="ee">
- <echo message="Installing certificate in ${ee} ..."/>
+ <echo message="Installing certificate in ${ee} ..."/>
<exec executable="${env.S1AS_HOME}/lib/certutil" output="./certdb.rfc">
<env key="LD_LIBRARY_PATH" path="${env.S1AS_HOME}/lib"/>
<arg line="-L -n ${cert.nickname}"/>
<arg line="-d ${admin.domain.dir}/${admin.domain}/config -a"/>
</exec>
<concat>
- <filelist dir="." files="certdb.rfc"/>
+ <filelist dir="." files="certdb.rfc"/>
</concat>
<antcall target="import-cert-jks">
<param name="cert.alias" value="${cert.nickname}"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/AdminGUITest.java b/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/AdminGUITest.java
index 90bce8e..c8ff0ce 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/AdminGUITest.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/AdminGUITest.java
@@ -22,7 +22,7 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
public class AdminGUITest {
-
+
private final String host = Util.getAdminHost();
private final String port = Util.getAdminPort();
private final String user = Util.getAdminUser();
@@ -39,7 +39,7 @@
{"Home Page Test : ", ""},
{"PropertySheet Page Test: ", ""},
{"TablePage Test : ", ""}};
-
+
public static void main( String args[] ) {
try {
AdminGUITest test = new AdminGUITest();
@@ -48,7 +48,7 @@
ex.printStackTrace();
}
}
-
+
public AdminGUITest() throws Exception {
if(host == null || port == null) {
URL = "http://localhost:4848";
@@ -67,9 +67,9 @@
sr = new WebConversation( );
status = new SimpleReporterAdapter("appserv-tests");
status.addDescription("Testing adminGUI..");
-
+
}
-
+
private void runTest() {
HttpUnitOptions.setScriptingEnabled(false);
testLoginPage();
@@ -78,17 +78,17 @@
testPropertySheetPage();
testTablePage();
printSummary();
-
+
}
-
+
private void testLoginPage() {
String loginPage = "/index.jsf";
-
+
try {
WebResponse client = sr.getResponse(URL+loginPage);
client = sr.getResponse(URL+loginPage);
String s = client != null ? client.getText() : null;
-
+
if(s != null) {
if((s.indexOf("Copyright") >= 0) && (s.indexOf("j_username") >= 0)) {
status.addStatus("admin-gui loginPage:", status.PASS);
@@ -110,15 +110,15 @@
fail++;
ex.printStackTrace();
}
-
+
}
-
+
private void testHomePage() {
String homePage = "/commonTask.jsf";
try {
WebResponse client = sr.getResponse(URL+homePage);
String s = client != null ? client.getText() : null;
-
+
if(s != null) {
if((s.indexOf("Deployment") >= 0) && (s.indexOf("Monitoring") >= 0)) {
status.addStatus("admin-gui homePage:", status.PASS);
@@ -141,7 +141,7 @@
ex.printStackTrace();
}
}
-
+
private void authorize() {
String loginPage = "/index.jsf";
try {
@@ -155,14 +155,14 @@
ex.printStackTrace();
}
}
-
+
private void testPropertySheetPage() {
String propertyPage = "/configuration/transactionService.jsf?configName=server-config";
-
+
try {
WebResponse client = sr.getResponse(URL+propertyPage);
String s = client != null ? client.getText() : null;
-
+
if(s != null) {
if((s.indexOf("transaction service settings") >= 0) && (s.indexOf("Heuristic") >= 0)) {
status.addStatus("admin-gui propertysheetPage:", status.PASS);
@@ -185,14 +185,14 @@
ex.printStackTrace();
}
}
-
+
private void testTablePage() {
String tablePage = "/applications/webApplications.jsf";
-
+
try {
WebResponse client = sr.getResponse(URL+tablePage);
String s = client != null ? client.getText() : null;
-
+
if(s != null) {
if((s.indexOf("deployButton") >= 0) && (s.indexOf("Deployed") >= 0)) {
status.addStatus("admin-gui tablePage:", status.PASS);
@@ -228,5 +228,5 @@
}
status.printSummary("admin-guiID");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/util/JSSE.java b/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/util/JSSE.java
index 955540c..d6e25ac 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/util/JSSE.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/util/JSSE.java
@@ -97,10 +97,10 @@
}
private static class AcceptAnyHostName implements HostnameVerifier{
- public boolean verify(String s, SSLSession ssl) {
- return true;
- }
- }
+ public boolean verify(String s, SSLSession ssl) {
+ return true;
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/util/Util.java b/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/util/Util.java
index 63fe5af..bc429c9 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/util/Util.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/admin-gui/src/util/Util.java
@@ -27,31 +27,31 @@
*/
public class Util {
- private static final String DAS_PORT;
- private static final String DAS_HOST;
- private static final String ADMIN_USER;
- private static final String ADMIN_PASSWD;
- private static final String INSTALL_TYPE;
- private static boolean IS_EE;
+ private static final String DAS_PORT;
+ private static final String DAS_HOST;
+ private static final String ADMIN_USER;
+ private static final String ADMIN_PASSWD;
+ private static final String INSTALL_TYPE;
+ private static boolean IS_EE;
- static {
- DAS_HOST = System.getProperty("ADMIN_HOST", "localhost");
- DAS_PORT = System.getProperty("ADMIN_PORT", "4849");
- ADMIN_USER = System.getProperty("ADMIN_USER", "admin");
- ADMIN_PASSWD = System.getProperty("ADMIN_PASSWORD", "adminadmin");
- try {
- IS_EE = NetUtils.isSecurePort(DAS_HOST, Integer.parseInt(DAS_PORT));
- } catch(Exception ex) {
- //default make it PE. Squelch it, and let the connection handle this
- IS_EE=false;
- }
+ static {
+ DAS_HOST = System.getProperty("ADMIN_HOST", "localhost");
+ DAS_PORT = System.getProperty("ADMIN_PORT", "4849");
+ ADMIN_USER = System.getProperty("ADMIN_USER", "admin");
+ ADMIN_PASSWD = System.getProperty("ADMIN_PASSWORD", "adminadmin");
+ try {
+ IS_EE = NetUtils.isSecurePort(DAS_HOST, Integer.parseInt(DAS_PORT));
+ } catch(Exception ex) {
+ //default make it PE. Squelch it, and let the connection handle this
+ IS_EE=false;
+ }
- if (IS_EE)
- INSTALL_TYPE = "ee";
- else
- INSTALL_TYPE = "pe";
+ if (IS_EE)
+ INSTALL_TYPE = "ee";
+ else
+ INSTALL_TYPE = "pe";
- }
+ }
public static String getAdminHost() {
return DAS_HOST;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/admin/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/admin/build.xml
index 4cf5694..fc0c3c1 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/admin/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/admin/build.xml
@@ -22,7 +22,7 @@
<!ENTITY props SYSTEM "file:./../../config/properties.xml">
<!ENTITY commonee SYSTEM "file:./../../config/ee-common.xml">]>
<project name="Admin Infrastructure" default="all" basedir=".">
- <property name="src.dir" value="src"/>
+ <property name="src.dir" value="src"/>
&props;
&common;
&commonee;
@@ -47,15 +47,15 @@
<target name="run-test" depends="runmain"/>
<target name="runmain" depends="build, get-version-common">
<java classname="TestDriver"
- dir="."
+ dir="."
fork="yes">
- <arg value="${admin.user}"/>
- <arg value="${admin.password}"/>
- <arg value="${admin.host}"/>
- <arg value="${admin.port}"/>
- <!-- following is to check if the protocol is https"/-->
- <arg value="${enterprise}"/>
- <arg value="tests.list"/>
+ <arg value="${admin.user}"/>
+ <arg value="${admin.password}"/>
+ <arg value="${admin.host}"/>
+ <arg value="${admin.port}"/>
+ <!-- following is to check if the protocol is https"/-->
+ <arg value="${enterprise}"/>
+ <arg value="tests.list"/>
<classpath>
<pathelement path="${s1astest.classpath}"/>
<pathelement path="${build.classes.dir}/admin"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/DottedNamesTest.java b/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/DottedNamesTest.java
index 7d80a6b..0b1df05 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/DottedNamesTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/DottedNamesTest.java
@@ -25,7 +25,7 @@
public class DottedNamesTest implements RemoteAdminQuicklookTest {
private MBeanServerConnection mbsc;
-
+
private static final String DNONS = "com.sun.appserv:name=dotted-name-get-set,type=dotted-name-support";
private static final String ADMIN_LOG_SERVICE_DN = "server.log-service.module-log-levels.admin";
private static final String ADMIN_LISTENER_NAME = "admin-listener"; //this is the default name
@@ -58,7 +58,7 @@
final String name = this.getClass().getName() + ": Testing admin dotted names";
return (name);
}
-
+
private void testLogLevelDottedName() throws RuntimeException {
TestLogLevel set = selectLogLevel();
System.out.println("Selected value randomly to set: " + set.name());
@@ -106,7 +106,7 @@
//break;
}
}
- if (!exists)
+ if (!exists)
throw new RuntimeException("The admin listener does not exist, this is not possible");
}
private String[] getListeners() throws Exception {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/MBeanServerConnectionFactory.java b/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/MBeanServerConnectionFactory.java
index f85d4da..8d3a3d2 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/MBeanServerConnectionFactory.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/MBeanServerConnectionFactory.java
@@ -23,14 +23,14 @@
/** A class to create an @{link MBeanServerConnection} to appserver.
*/
public class MBeanServerConnectionFactory {
-
+
/** Creates a new instance of MBeanServerConnectionFactory */
private MBeanServerConnectionFactory() {
}
-
- public static final MBeanServerConnection getMBeanServerConnectionHTTPOrHTTPS(final String adminUser, final String
+
+ public static final MBeanServerConnection getMBeanServerConnectionHTTPOrHTTPS(final String adminUser, final String
adminPassword, final String adminHost, final String adminPort, final String isSecure) throws RuntimeException {
-
+
MBeanServerConnection mbsc = null;
try {
final String protocol = AppserverConnectionSource.PROTOCOL_HTTP;
@@ -44,7 +44,7 @@
throw new RuntimeException(e);
}
}
-
+
private static TLSParams getDummyTLSParams() {
final X509TrustManager[] tms = TrustAnyTrustManager.getInstanceArray();
return ( new TLSParams(tms, null) );
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/RemoteAdminQuicklookTest.java b/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/RemoteAdminQuicklookTest.java
index e0964e8..6c55912 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/RemoteAdminQuicklookTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/RemoteAdminQuicklookTest.java
@@ -21,16 +21,16 @@
* com.sun.ejte.ccl.reporter.SimpleReporterAdapter.PASS and FAIL.
*/
public String test() throws RuntimeException;
-
+
/** Sets the MBeanServerConnection for testing the stuff remotely. The parameter may
* not be null.
*/
public void setMBeanServerConnection(final MBeanServerConnection c);
-
+
/** Returns the name of the test.
*/
public String getName();
-
+
/** Returns the time taken by the test to execute in milliseconds
* @return long denoting the time taken for this test to execute
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/TestDriver.java b/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/TestDriver.java
index b664dea..1ef75de 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/TestDriver.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/admin/src/TestDriver.java
@@ -25,7 +25,7 @@
import com.sun.enterprise.util.net.NetUtils;
public class TestDriver {
-
+
private final String adminUser;
private final String adminPassword;
private final String adminHost;
@@ -34,7 +34,7 @@
private final File testFile;
private List<RemoteAdminQuicklookTest> tests;
private MBeanServerConnection mbsc;
-
+
private static final String SCRIPT_COMMENT = "#"; //this is how comment is denoted, traditionally
private static final SimpleReporterAdapter reporter = new SimpleReporterAdapter("appserv-tests");
private static final String DESC = "Admin Infrastructure Tests";
@@ -54,7 +54,7 @@
initializeConnection();
initializeTestClasses();
}
-
+
public static void main(final String[] env) throws Exception {
final TestDriver t = new TestDriver(env);
t.testAndReportAll();
@@ -82,7 +82,7 @@
} catch(final Exception e) {}
}
}
-
+
private RemoteAdminQuicklookTest c2T(final String testClass) throws RuntimeException {
try {
final Class c = Class.forName(testClass);
@@ -105,7 +105,7 @@
reporter.addStatus(t.getName(), reporter.PASS);
} catch(final Exception e) {
e.printStackTrace();
- reporter.addStatus(t.getName(), reporter.FAIL);
+ reporter.addStatus(t.getName(), reporter.FAIL);
total += t.getExecutionTime();
reporter.printSummary(getSummaryString(total));
System.out.println(getSummaryString(total));
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/build.xml
index 569532c..e971963 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/build.xml
@@ -27,49 +27,49 @@
<param name="ejb-target" value="all"/>
</antcall>
</target>
-
+
<target name="run-test">
<antcall target="runejbtargets">
<param name="ejb-target" value="run-test"/>
</antcall>
</target>
-
+
<target name="clean">
<antcall target="runejbtargets">
<param name="ejb-target" value="clean"/>
</antcall>
</target>
-
+
<target name="build">
<antcall target="runejbtargets">
<param name="ejb-target" value="build"/>
</antcall>
</target>
-
+
<target name="deploy">
<antcall target="runejbtargets">
<param name="ejb-target" value="deploy"/>
</antcall>
</target>
-
+
<target name="undeploy">
<antcall target="runejbtargets">
<param name="ejb-target" value="undeploy"/>
</antcall>
</target>
-
+
<target name="run">
<antcall target="runejbtargets">
<param name="ejb-target" value="run"/>
</antcall>
</target>
-
+
<target name="setup">
<antcall target="runejbtargets">
<param name="ejb-target" value="setup"/>
</antcall>
</target>
-
+
<target name="unsetup">
<antcall target="runejbtargets">
<param name="ejb-target" value="unsetup"/>
@@ -90,7 +90,7 @@
</target>
<target name="usage">
- <echo> Usage:
+ <echo> Usage:
======== Targets by execution granularity =========
ant clean (Cleans all ejb tests)
@@ -107,11 +107,11 @@
ant all (Executes all the ejb tests)
===== Targets by technoloy and execution granularity ======
- Note: Run the command of the following type:
+ Note: Run the command of the following type:
% ant stateless -Dejb-target=clean
to run the 'clean' target for 'stateless' tests
- </echo>
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/build.xml
index 3acc71c..ffe69b5 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/build.xml
@@ -27,49 +27,49 @@
<param name="ejb-target" value="all"/>
</antcall>
</target>
-
+
<target name="run-test">
<antcall target="runejbtargets">
<param name="ejb-target" value="run-test"/>
</antcall>
</target>
-
+
<target name="clean">
<antcall target="runejbtargets">
<param name="ejb-target" value="clean"/>
</antcall>
</target>
-
+
<target name="build">
<antcall target="runejbtargets">
<param name="ejb-target" value="build"/>
</antcall>
</target>
-
+
<target name="deploy">
<antcall target="runejbtargets">
<param name="ejb-target" value="deploy"/>
</antcall>
</target>
-
+
<target name="undeploy">
<antcall target="runejbtargets">
<param name="ejb-target" value="undeploy"/>
</antcall>
</target>
-
+
<target name="run">
<antcall target="runejbtargets">
<param name="ejb-target" value="run"/>
</antcall>
</target>
-
+
<target name="setup">
<antcall target="runejbtargets">
<param name="ejb-target" value="setup"/>
</antcall>
</target>
-
+
<target name="unsetup">
<antcall target="runejbtargets">
<param name="ejb-target" value="unsetup"/>
@@ -90,7 +90,7 @@
</target>
<target name="usage">
- <echo> Usage:
+ <echo> Usage:
======== Targets by execution granularity =========
ant clean (Cleans all ejb tests)
@@ -107,11 +107,11 @@
ant all (Executes all the ejb tests)
===== Targets by technoloy and execution granularity ======
- Note: Run the command of the following type:
+ Note: Run the command of the following type:
% ant stateless -Dejb-target=clean
to run the 'clean' target for 'stateless' tests
- </echo>
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/build.xml
index ae72ce1..1bc90a1 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/build.xml
@@ -82,16 +82,16 @@
</target>
<target name="usage">
- <echo> Usage:
- ant converter (Executes the converter tests)
- ant all (Executes all the ejb session stateless tests)
- ant clean (cleans all the ejb session stateless tests)
- ant build (builds all the ejb session stateless tests)
- ant setup (sets up all resources for stateless tests)
- ant deploy (deploys all the ejb session stateless apps)
- ant run (Executes all the ejb session stateless tests)
- ant undeploy (undeploys all the session stateless apps)
- ant unsetup (unsets all resources for stateless tests)
- </echo>
+ <echo> Usage:
+ ant converter (Executes the converter tests)
+ ant all (Executes all the ejb session stateless tests)
+ ant clean (cleans all the ejb session stateless tests)
+ ant build (builds all the ejb session stateless tests)
+ ant setup (sets up all resources for stateless tests)
+ ant deploy (deploys all the ejb session stateless apps)
+ ant run (Executes all the ejb session stateless tests)
+ ant undeploy (undeploys all the session stateless apps)
+ ant unsetup (unsets all resources for stateless tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/build.properties
index 6a2096b..acce2ac 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/build.properties
@@ -15,28 +15,28 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="ejb-stateless"/>
-<property name="appname" value="${module}-converter"/>
+<property name="appname" value="${module}-converter"/> \u0020
-<property name="assemble"
- value="${build.classes.dir}/archive"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
-<property name="appclient.jar"
- value="${assemble.dir}/${appname}-client.jar"/>
+<property name="assemble"\u0020
+ value="${build.classes.dir}/archive"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
+<property name="appclient.jar"\u0020
+ value="${assemble.dir}/${appname}-client.jar"/> \u0020
-<property name="test.client"
- value="com.sun.s1peqe.ejb.stateless.converter.client.ConverterClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.ejb.stateless.converter.client.ConverterClient"/>
<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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.xml"/>
<property name="app.type" value="application"/>
@@ -46,8 +46,8 @@
<!-- ============================================================ -->
<!--
<property name="jndi.name" value="converter"/>
-<property name="provider.url" value="iiop://localhost:${orb.port}"/>
-<property name="ctxfactory" value="com.sun.enterprise.naming.SerialInitContextFactory"/>
-<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/>
+<property name="provider.url" value="iiop://localhost:${orb.port}"/>\u0020
+<property name="ctxfactory" value="com.sun.enterprise.naming.SerialInitContextFactory"/>\u0020
+<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/>\u0020
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/build.xml
index 68286fc..982d717 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/build.xml
@@ -59,7 +59,7 @@
<delete file="${env.S1AS_HOME}/lib/dtds/static-verification_1_4.dtd"/>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -71,8 +71,8 @@
<target name="build" depends="compile">
<antcall target="build-ear-common"/>
- </target>
-
+ </target>
+
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -93,27 +93,27 @@
<target name="run-standalone-client" depends="init-common">
<property name="jndi.name" value="converter"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<!--
- <property name="ctxfactory"
- value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
+ <property name="ctxfactory"
+ value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
-->
- <echo message="provider.url used is ${provider.url}"/>
+ <echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
</java>
</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/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/client/ConverterClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/client/ConverterClient.java
index 9280b51..dc6c2e8 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/client/ConverterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/client/ConverterClient.java
@@ -31,7 +31,7 @@
/**
* A simple java client. This uses the services provided by the <code>ConverterBean</code> and
- * converts 100 US dollars to Yen and 100 Yen to Euro.
+ * converts 100 US dollars to Yen and 100 Yen to Euro.
* <p>In this regard, it does the following in order
* <ul>
* <li>Locates the home interface of the enterprise bean
@@ -41,21 +41,21 @@
* <br>
* <b>Locating the home interface:</b>
* <blockquote><pre>
- * Context initial = new InitialContext();
- * Context myEnv = (Context)initial.lookup("java:comp/env");
- * Object objref = myEnv.lookup("ejb/SimpleConverter");
+ * Context initial = new InitialContext();
+ * Context myEnv = (Context)initial.lookup("java:comp/env");
+ * Object objref = myEnv.lookup("ejb/SimpleConverter");
* ConverterHome home = (ConverterHome)PortableRemoteObject.narrow(objref, ConverterHome.class);
* </pre></blockquote>
* <br>
* <b>Creating the remote interface:</b>
* <blockquote><pre>
- * Converter currencyConverter = home.create();
+ * Converter currencyConverter = home.create();
* </pre></blockquote>
* <br>
* <b>Invoking business methods:</b>
* <blockquote><pre>
* BigDecimal param = new BigDecimal ("100.00");
- * amount = currencyConverter.dollarToYen(param);
+ * amount = currencyConverter.dollarToYen(param);
* amount = currencyConverter.yenToEuro(param);
* </pre></blockquote>
* <br>
@@ -70,7 +70,7 @@
public class ConverterClient {
- private SimpleReporterAdapter stat =
+ private SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
ConverterClient() {
@@ -84,12 +84,12 @@
*
*/
public static void main(String[] args) {
- ConverterClient client = new ConverterClient();
- client.run(args);
+ ConverterClient client = new ConverterClient();
+ client.run(args);
}
private void run(String[] args) {
- String testId = null;
+ String testId = null;
String xmlfile = args[0];
try {
@@ -107,7 +107,7 @@
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
} finally {
- stat.printSummary(testId);
+ stat.printSummary(testId);
}
}
@@ -131,7 +131,7 @@
Document doc = db.parse(xmlFile);
System.out.println(" get root ");
Element root = doc.getDocumentElement();
- System.out.println( "The failed count is: " + findValue( root, search));
+ System.out.println( "The failed count is: " + findValue( root, search));
if ( findValue( root, search).equals("100"))
passed = true;
} catch (org.xml.sax.SAXException se) {
@@ -146,7 +146,7 @@
private boolean validArchive( String xmlfile) throws Exception{
- // check the xml results file generated by running AVK StaticCheck
+ // check the xml results file generated by running AVK StaticCheck
System.out.println("xmlfile is " + xmlfile );
// results of test is in current working directory.
// String xmlfile = "ejb-stateless-converterApp.ear.xml";
@@ -159,15 +159,15 @@
// The next method requires /sun/appserver8/lib/dtds/static-verification_1_4.dtd
// static-verification_1_4.dtd needs to be moved to that location for method to succeed.
//
- // [exec] java.lang.Exception: java.io.FileNotFoundException:
+ // [exec] java.lang.Exception: java.io.FileNotFoundException:
// /sun/appserver8/lib/dtds/static-verification_1_4.dtd
// (No such file or directory)
Document doc = db.parse(xmlfile);
Element root = doc.getDocumentElement();
System.out.println( "The failed count is: " + findValue( root, "/static-verification/failure-count/failure-number") );
- if ( findValue( root, "/static-verification/failure-count/failure-number").equals("0") )
- passed = true;
+ if ( findValue( root, "/static-verification/failure-count/failure-number").equals("0") )
+ passed = true;
} catch (org.xml.sax.SAXException se) {
throw new Exception(se);
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/descriptor/application.xml
index dc859fe..a076d61 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/descriptor/application.xml
@@ -23,7 +23,7 @@
<small-icon></small-icon>
<large-icon></large-icon>
</icon>
- <display-name>ConverterApp</display-name>
+ <display-name>ConverterApp</display-name>
<module>
<java>ejb-stateless-converter-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/ejb/ConverterBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/ejb/ConverterBean.java
index c44dddf..cd66f3c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/ejb/ConverterBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/avk/ejb/stateless/converter/ejb/ConverterBean.java
@@ -35,7 +35,7 @@
* @see ConverterHome
*/
public class ConverterBean implements SessionBean, TimedObject {
-
+
SessionContext sessionContext_;
BigDecimal yenRate = new BigDecimal("121.6000");
@@ -53,7 +53,7 @@
// number of tests is getting large. This set of operations will
// ensure that the timer persistent store is configured properly,
// in addition to exercising some of the common timer functions.
- testTimerService();
+ testTimerService();
BigDecimal result = dollars.multiply(yenRate);
return result.setScale(2,BigDecimal.ROUND_UP);
@@ -88,7 +88,7 @@
* Loads the state of the bean from secondary storage. Required by EJB spec.
*/
public void ejbActivate() {}
-
+
/**
* Keeps the state of the bean to secondary storage. Required by EJB spec.
*/
@@ -139,7 +139,7 @@
e.printStackTrace();
throw new EJBException(e);
}
-
+
try {
sessionContext_.getUserTransaction().begin();
Collection timers = timerService.getTimers();
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/build.xml
index dd5dda2..218a70e 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/build.xml
@@ -46,62 +46,62 @@
<fileset dir="." includes="**/RepRunConf.txt"/>
</delete>
</target>
-
+
<target name="run-test">
<antcall target="run-sqe-target">
<param name="sqe-target-name" value="run-test"/>
</antcall>
</target>
-
+
<target name="clean">
<antcall target="run-sqe-target">
<param name="sqe-target-name" value="clean"/>
</antcall>
</target>
-
+
<target name="build">
<antcall target="run-sqe-target">
<param name="sqe-target-name" value="build"/>
</antcall>
</target>
-
+
<target name="deploy">
<antcall target="run-sqe-target">
<param name="sqe-target-name" value="deploy"/>
</antcall>
</target>
-
+
<target name="undeploy">
<antcall target="run-sqe-target">
<param name="sqe-target-name" value="undeploy"/>
</antcall>
</target>
-
+
<target name="run">
<antcall target="run-sqe-target">
<param name="sqe-target-name" value="run"/>
</antcall>
</target>
-
+
<target name="setup">
<antcall target="run-sqe-target">
<param name="sqe-target-name" value="setup"/>
</antcall>
</target>
-
+
<target name="unsetup">
<antcall target="run-sqe-target">
<param name="sqe-target-name" value="unsetup"/>
</antcall>
</target>
-
+
<target name="run-sqe-target">
<antcall target="run-eesqe-target"/>
<antcall target="run-pesqe-target"/>
</target>
-
+
<target name="run-eesqe-target" if="ee">
- <ant dir="corba" target="all"/>
+ <ant dir="corba" target="all"/>
<ant dir="connector" target="all"/>
<ant dir="ejb" target="all"/>
<ant dir="web" target="all"/>
@@ -110,9 +110,9 @@
<ant dir="webservices" target="all"/>
<ant dir="security" target="all"/>
<ant dir="admin-gui" target="all"/>
- <ant dir="admin" target="all"/>
+ <ant dir="admin" target="all"/>
</target>
-
+
<target name="run-pesqe-target" unless="ee">
<antcall target="corba"/>
<antcall target="connector"/>
@@ -228,7 +228,7 @@
ant all (Executes all sqetests)
===== Targets by technoloy and execution granularity ======
- Note: Run the command of the following type:
+ Note: Run the command of the following type:
% ant corba -Dsqe-target-name=clean
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/build.xml
index 5ea07d1..738f4b1 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/build.xml
@@ -39,7 +39,7 @@
</target>
<target name="usage">
- <antcall target="usage-common"/>
+ <antcall target="usage-common"/>
</target>
<target name="clean" depends="init-common">
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/build.properties
index e7a62e6..218ae00 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/build.properties
@@ -15,12 +15,12 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="connector"/>
<property name="app.type" value="application"/>
<property name="cciblackbox.path" value="../lib/cciblackbox-tx.jar"/>
-<property name="appname" value="${module}-embedded-cci"/>
+<property name="appname" value="${module}-embedded-cci"/> \u0020
<property name="application.xml" value="descriptor/application.xml"/>
<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
<property name="db.type" value="pointbase"/>
@@ -29,5 +29,5 @@
<property name="sun-cmp-dbschema" value="descriptor/sec_bankadmin_schema.dbschema"/>
<property name="application-client.xml" value="descriptor/application-client.xml"/>
<property name="sun-application-client.xml" value="descriptor/sun-application-client.xml"/>
-<property name="rarname" value="cciblackbox-tx"/>
+<property name="rarname" value="cciblackbox-tx"/> \u0020
<property name="jdbc.drivers" value="com.pointbase.jdbc.jdbcUniversalDriver"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/build.xml
index e66cd71..d7c0710 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/build.xml
@@ -31,7 +31,7 @@
&commonBuild;
&testProperties;
&run;
-
+
<target name="all" depends="build,setup,deploy,run,undeploy,unsetup"/>
<target name="run-test" depends="build,deploy,run,undeploy"/>
@@ -80,7 +80,7 @@
</target>
<!--
- Custom target for compilation with local libraries for connector
+ Custom target for compilation with local libraries for connector
-->
<target name="compile-cci" depends="init-common">
<mkdir dir="${build.classes.dir}"/>
@@ -96,7 +96,7 @@
</target>
<target name="build">
- <antcall target="build-embedded-ear"/>
+ <antcall target="build-embedded-ear"/>
</target>
<target name="package-embedded-ejb">
@@ -124,9 +124,9 @@
<mkdir dir="${assemble.dir}"/>
<copy file="descriptor/application.xml" tofile="${assemble.dir}/application.xml"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
- <antcall target="package-embedded-ejb"/>
- <antcall target="package-embedded-client"/>
- <antcall target="package-rar"/>
+ <antcall target="package-embedded-ejb"/>
+ <antcall target="package-embedded-client"/>
+ <antcall target="package-rar"/>
<ear earfile="${assemble.dir}/${appname}App.ear"
appxml="${assemble.dir}/application.xml">
<fileset dir="${assemble.dir}">
@@ -139,7 +139,7 @@
</target>
<target name="deploy" depends="init-common">
- <antcall target="deploy-common"/>
+ <antcall target="deploy-common"/>
<antcall target="create-pool">
<param name="tx.mode" value="tx"/>
</antcall>
@@ -152,15 +152,15 @@
<target name="undeploy">
<antcall target="delete-resource"/>
<antcall target="delete-pool"/>
- <antcall target="undeploy-common"/>
+ <antcall target="undeploy-common"/>
<antcall target="reconfig-common"/>
</target>
- <target name="run" depends="init-common">
- <antcall target="runclient-common">
- <param name="appclient.application.args" value="Embedded"/>
- </antcall>
+ <target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="Embedded"/>
+ </antcall>
</target>
<target name="usage">
@@ -201,9 +201,9 @@
</target>
<target name="create-rar">
- <copy file="descriptor/ra.xml" tofile="${assemble.dir}/rar/META-INF/ra.xml"/>
- <copy file="${env.APS_HOME}/sqetests/connector/lib/cciblackbox-tx.jar" tofile="${assemble.dir}/rar/cciblackbox-tx.jar"/>
- <replace file="${assemble.dir}/rar/META-INF/ra.xml" token="DBURL" value="${db.url}"/>
+ <copy file="descriptor/ra.xml" tofile="${assemble.dir}/rar/META-INF/ra.xml"/>
+ <copy file="${env.APS_HOME}/sqetests/connector/lib/cciblackbox-tx.jar" tofile="${assemble.dir}/rar/cciblackbox-tx.jar"/>
+ <replace file="${assemble.dir}/rar/META-INF/ra.xml" token="DBURL" value="${db.url}"/>
</target>
<target name="package-rar" depends="init-common">
@@ -251,5 +251,5 @@
<touch file="${build.classes.dir}/setupDBTables.out"/>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/client/CoffeeClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/client/CoffeeClient.java
index d35a7b8..cf964c7 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/client/CoffeeClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/client/CoffeeClient.java
@@ -30,17 +30,17 @@
String testId = "J2EE Connectors : Embedded Adapter Tests";
try {
- if (args.length == 1) {
- testId = args[0];
- }
+ if (args.length == 1) {
+ testId = args[0];
+ }
System.err.println(testId + " : CoffeeClient started in main...");
- stat.addDescription("J2EE Connectors 1.5: Embedded CCI Adapter tests");
+ stat.addDescription("J2EE Connectors 1.5: Embedded CCI Adapter tests");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleCoffee");
- CoffeeRemoteHome home =
- (CoffeeRemoteHome)PortableRemoteObject.narrow(objref,
+ CoffeeRemoteHome home =
+ (CoffeeRemoteHome)PortableRemoteObject.narrow(objref,
CoffeeRemoteHome.class);
CoffeeRemote coffee = home.create();
@@ -55,23 +55,23 @@
int newCount = coffee.getCoffeeCount();
System.err.println("Coffee count = " + newCount);
- if (count==(newCount-3)) {
- stat.addStatus("Connector:cci Connector " + testId + " rar Test status:",stat.PASS);
- }else{
- stat.addStatus("Connector:cci Connector " + testId + " rar Test status:",stat.FAIL);
- }
+ if (count==(newCount-3)) {
+ stat.addStatus("Connector:cci Connector " + testId + " rar Test status:",stat.PASS);
+ }else{
+ stat.addStatus("Connector:cci Connector " + testId + " rar Test status:",stat.FAIL);
+ }
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
- stat.addStatus("Connector:CCI Connector " + testId + " rar Test status:",stat.FAIL);
+ stat.addStatus("Connector:CCI Connector " + testId + " rar Test status:",stat.FAIL);
ex.printStackTrace();
}finally{
- //print test summary
- stat.printSummary(testId);
+ //print test summary
+ stat.printSummary(testId);
}
- }
+ }
-}
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/ejb/CoffeeBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/ejb/CoffeeBean.java
index b4ccb7c..9654d7c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/ejb/CoffeeBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci-embedded/ejb/CoffeeBean.java
@@ -60,7 +60,7 @@
IndexedRecord iRec = rf.createIndexedRecord("InputRecord");
Record oRec = ix.execute(iSpec, iRec);
Iterator iterator = ((IndexedRecord)oRec).iterator();
- while(iterator.hasNext()) {
+ while(iterator.hasNext()) {
Object obj = iterator.next();
if(obj instanceof Integer) {
count = ((Integer)obj).intValue();
@@ -99,11 +99,11 @@
private Connection getCCIConnection() {
Connection con = null;
- System.out.println("<========== IN get cci Connection ===========>");
+ System.out.println("<========== IN get cci Connection ===========>");
try {
ConnectionSpec spec = new CciConnectionSpec("DBUSER", "DBPASSWORD");
- System.out.println("<========== Created ISpec ===========>");
- System.out.println("CF value : " + cf);
+ System.out.println("<========== Created ISpec ===========>");
+ System.out.println("CF value : " + cf);
con = cf.getConnection(spec);
} catch (ResourceException ex) {
ex.printStackTrace();
@@ -123,4 +123,4 @@
public void ejbActivate() {}
public void ejbPassivate() {}
-}
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/build.properties
index fa86556..0d75142 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/build.properties
@@ -15,12 +15,12 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="connector"/>
<property name="app.type" value="application"/>
<property name="cciblackbox.path" value="../lib/cciblackbox-tx.jar"/>
-<property name="appname" value="connector-cci"/>
+<property name="appname" value="connector-cci"/> \u0020
<property name="application.xml" value="descriptor/application.xml"/>
<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
<property name="db.type" value="pointbase"/>
@@ -29,5 +29,5 @@
<property name="sun-cmp-dbschema" value="descriptor/sec_bankadmin_schema.dbschema"/>
<property name="application-client.xml" value="descriptor/application-client.xml"/>
<property name="sun-application-client.xml" value="descriptor/sun-application-client.xml"/>
-<property name="rarname" value="cciblackbox-tx"/>
+<property name="rarname" value="cciblackbox-tx"/> \u0020
<property name="jdbc.drivers" value="com.pointbase.jdbc.jdbcUniversalDriver"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/build.xml
index 9fdb850..433ef43 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/build.xml
@@ -119,10 +119,10 @@
<antcall target="undeploy-common"/>
</target>
-<target name="run" depends="init-common">
- <antcall target="runclient-common">
- <param name="appclient.application.args" value="standalone"/>
- </antcall>
+<target name="run" depends="init-common">
+ <antcall target="runclient-common">
+ <param name="appclient.application.args" value="standalone"/>
+ </antcall>
</target>
<!-- setup -->
@@ -139,7 +139,7 @@
<target name="create-pool">
<antcall target="create-connector-connpool-common">
<param name="ra.name" value="cciblackbox-${tx.mode}"/>
- <param name="connection.defname"
+ <param name="connection.defname"
value="jakarta.resource.cci.ConnectionFactory"/>
<param name="connector.conpool.name" value="CCI-CONNPOOL"/>
</antcall>
@@ -181,7 +181,7 @@
<!-- create the appclient jar file with custom classes-->
<target name="appclient-jar" depends="init-common">
- <property name="appclientjar.classes"
+ <property name="appclientjar.classes"
value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Client*.class"/>
<antcall target="package-appclientjar-common">
<param name="appclientjar.files"
@@ -211,11 +211,11 @@
</target>
<target name="create-rar">
- <copy file="descriptor/ra.xml"
+ <copy file="descriptor/ra.xml"
tofile="${assemble.dir}/rar/META-INF/ra.xml"/>
- <copy file="${env.APS_HOME}/sqetests/connector/lib/cciblackbox-tx.jar"
+ <copy file="${env.APS_HOME}/sqetests/connector/lib/cciblackbox-tx.jar"
tofile="${assemble.dir}/rar/cciblackbox-tx.jar"/>
- <replace file="${assemble.dir}/rar/META-INF/ra.xml"
+ <replace file="${assemble.dir}/rar/META-INF/ra.xml"
token="DBURL" value="${db.url}"/>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/client/CoffeeClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/client/CoffeeClient.java
index d8c26a3..faa0c0e 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/client/CoffeeClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/client/CoffeeClient.java
@@ -30,17 +30,17 @@
String testId = "J2EE Connectors 1.5 : Standalone adapter tests";
try {
- if (args.length == 1) {
- testId = args[0];
- }
+ if (args.length == 1) {
+ testId = args[0];
+ }
System.err.println(testId + " : CoffeeClient started in main...");
- stat.addDescription("J2EE Connectors 1.5 : Standalone CCI adapter Tests");
+ stat.addDescription("J2EE Connectors 1.5 : Standalone CCI adapter Tests");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleCoffee");
- CoffeeRemoteHome home =
- (CoffeeRemoteHome)PortableRemoteObject.narrow(objref,
+ CoffeeRemoteHome home =
+ (CoffeeRemoteHome)PortableRemoteObject.narrow(objref,
CoffeeRemoteHome.class);
CoffeeRemote coffee = home.create();
@@ -55,22 +55,22 @@
int newCount = coffee.getCoffeeCount();
System.err.println("Coffee count = " + newCount);
- if (count==(newCount-3)) {
- stat.addStatus("Connector:cci Connector " + testId + " rar Test status:",stat.PASS);
- }else{
- stat.addStatus("Connector:cci Connector " + testId + " rar Test status:",stat.FAIL);
- }
+ if (count==(newCount-3)) {
+ stat.addStatus("Connector:cci Connector " + testId + " rar Test status:",stat.PASS);
+ }else{
+ stat.addStatus("Connector:cci Connector " + testId + " rar Test status:",stat.FAIL);
+ }
- //print test summary
- stat.printSummary(testId);
+ //print test summary
+ stat.printSummary(testId);
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
- stat.addStatus("Connector:CCI Connector " + testId + " rar Test status:",stat.FAIL);
+ stat.addStatus("Connector:CCI Connector " + testId + " rar Test status:",stat.FAIL);
ex.printStackTrace();
}
- }
+ }
-}
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/ejb/CoffeeBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/ejb/CoffeeBean.java
index 2883589..ff1a85f 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/ejb/CoffeeBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/connector/cci/ejb/CoffeeBean.java
@@ -60,7 +60,7 @@
IndexedRecord iRec = rf.createIndexedRecord("InputRecord");
Record oRec = ix.execute(iSpec, iRec);
Iterator iterator = ((IndexedRecord)oRec).iterator();
- while(iterator.hasNext()) {
+ while(iterator.hasNext()) {
Object obj = iterator.next();
if(obj instanceof Integer) {
count = ((Integer)obj).intValue();
@@ -99,11 +99,11 @@
private Connection getCCIConnection() {
Connection con = null;
- System.out.println("<========== IN get cci Connection ===========>");
+ System.out.println("<========== IN get cci Connection ===========>");
try {
ConnectionSpec spec = new CciConnectionSpec("DBUSER", "DBPASSWORD");
- System.out.println("<========== Created ISpec ===========>");
- System.out.println("CF value : " + cf);
+ System.out.println("<========== Created ISpec ===========>");
+ System.out.println("CF value : " + cf);
con = cf.getConnection(spec);
} catch (ResourceException ex) {
ex.printStackTrace();
@@ -123,4 +123,4 @@
public void ejbActivate() {}
public void ejbPassivate() {}
-}
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/corba/src/Server.java b/appserver/tests/v2-tests/appserv-tests/sqetests/corba/src/Server.java
index 5bae3ab..c6a0832 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/corba/src/Server.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/corba/src/Server.java
@@ -37,7 +37,7 @@
public class Server {
private static SimpleReporterAdapter status =
- new SimpleReporterAdapter("appserv-tests");
+ new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
final String suiteId = "CORBA";
@@ -80,7 +80,7 @@
NameComponent[] names = { new NameComponent("RemoteTest", "") };
namingContext.rebind(names, ref);
- System.out.println("rebind nameservice");
+ System.out.println("rebind nameservice");
ORB clientORB = ORB.init(args, System.getProperties());
System.out.println(args[0]);
@@ -98,7 +98,7 @@
"Include /usr/lib/mps in the LD_LIBRARY_PATH "+
"for solaris");
e.printStackTrace();
- }
+ }
status.printSummary("corbaID");
System.out.println("Test done. exiting");
System.exit(0);
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/build.xml
index 60d4749..ccfdad6 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/build.xml
@@ -89,16 +89,16 @@
</target>
<target name="usage">
- <echo> Usage:
- ant robean (Executes the enroller tests)
- ant all (Executes all the ejb bmp tests)
- ant clean (cleans all the ejb bmp tests)
- ant build (builds all the ejb bmp tests)
- ant setup (sets up all resources for bmp tests)
- ant deploy (deploys all the ejb bmp apps)
- ant run (Executes all the ejb bmp tests)
- ant undeploy (undeploys all the bmp apps)
- ant unsetup (unsets all resources for bmp tests)
- </echo>
+ <echo> Usage:
+ ant robean (Executes the enroller tests)
+ ant all (Executes all the ejb bmp tests)
+ ant clean (cleans all the ejb bmp tests)
+ ant build (builds all the ejb bmp tests)
+ ant setup (sets up all resources for bmp tests)
+ ant deploy (deploys all the ejb bmp apps)
+ ant run (Executes all the ejb bmp tests)
+ ant undeploy (undeploys all the bmp apps)
+ ant unsetup (unsets all resources for bmp tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/build-ng.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/build-ng.xml
index f1b56eb..b4a8202 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/build-ng.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/build-ng.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> -->
@@ -52,7 +52,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"/>
@@ -64,13 +64,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-sql-common">
<param name="sql.file" value="sql/create_pointbase.sql"/>
@@ -78,14 +78,14 @@
<antcall target="deploy-jdbc-common">
<param name="jdbc.conpool.name" value="bmpEnrollerPool"/>
<param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB"/>
- </antcall>
- <antcall target="reconfig-common"/>
+ </antcall>
+ <antcall target="reconfig-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">
<exec executable="${APPCLIENT}" failonerror="false">
@@ -103,12 +103,12 @@
<param name="sql.file" value="sql/create_pointbase.sql"/>
</antcall>
</target>
-
+
<target name="undeploy" depends="init-common">
<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-sql-common">
@@ -118,7 +118,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"/>
@@ -135,7 +135,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/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/build.properties
index 97bd94c..78c9f81 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/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/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/build.xml
index e14edf8..aa9d20d 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/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> -->
@@ -52,7 +52,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"/>
@@ -64,13 +64,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-sql-common">
<param name="sql.file" value="sql/create_pointbase.sql"/>
@@ -78,14 +78,14 @@
<antcall target="deploy-jdbc-common">
<param name="jdbc.conpool.name" value="bmpEnrollerPool"/>
<param name="jdbc.resource.name" value="jdbc/bmp-enrollerDB"/>
- </antcall>
- <antcall target="reconfig-common"/>
+ </antcall>
+ <antcall target="reconfig-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"/>
@@ -99,12 +99,12 @@
<param name="sql.file" value="sql/create_pointbase.sql"/>
</antcall>
</target>
-
+
<target name="undeploy" depends="init-common">
<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-sql-common">
@@ -114,7 +114,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"/>
@@ -131,7 +131,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/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/client/EnrollerClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/client/EnrollerClient.java
index 9266484..505d64c 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/client/EnrollerClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/client/EnrollerClient.java
@@ -24,7 +24,7 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
/**
- * A simple java client will:
+ * A simple java client will:
* <ul>
* <li>Locates the home interface of the enterprise bean
* <li>Gets a reference to the remote interface
@@ -36,11 +36,11 @@
private SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
- public static void main(String[] args) {
- EnrollerClient client = new EnrollerClient();
+ public static void main(String[] args) {
+ EnrollerClient client = new EnrollerClient();
// run the tests
- client.runTestClient();
+ client.runTestClient();
}
public void runTestClient() {
@@ -59,22 +59,22 @@
try {
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleStudent");
- StudentHome sHome =
- (StudentHome) PortableRemoteObject.narrow(objref,
+ StudentHome sHome =
+ (StudentHome) PortableRemoteObject.narrow(objref,
StudentHome.class);
Student denise = sHome.create("823", "Denise Smith");
objref = initial.lookup("java:comp/env/ejb/SimpleCourse");
- CourseHome cHome =
- (CourseHome) PortableRemoteObject.narrow(objref,
+ CourseHome cHome =
+ (CourseHome) PortableRemoteObject.narrow(objref,
CourseHome.class);
Course power = cHome.create("220", "Power J2EE Programming");
objref = initial.lookup("java:comp/env/ejb/SimpleEnroller");
- EnrollerHome eHome =
- (EnrollerHome) PortableRemoteObject.narrow(objref,
+ EnrollerHome eHome =
+ (EnrollerHome) PortableRemoteObject.narrow(objref,
EnrollerHome.class);
Enroller enroller = eHome.create();
@@ -93,7 +93,7 @@
System.out.println(courseId + " " + course.getName());
}
System.out.println();
-
+
Course intro = cHome.findByPrimaryKey("777");
System.out.println(intro.getName() + ":");
courses = intro.getStudentIds();
@@ -103,12 +103,12 @@
Student student = sHome.findByPrimaryKey(studentId);
System.out.println(studentId + " " + student.getName());
}
-
+
stat.addStatus("enroller bmp", stat.PASS);
} catch (Exception ex) {
stat.addStatus("enroller bmp", stat.FAIL);
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}
- }
-}
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Course.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Course.java
index d2a4674..05b9fc0 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Course.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Course.java
@@ -22,24 +22,24 @@
public interface Course extends EJBObject {
-
+
/**
* Returns an arraylist of StudentIds taking the course.
- * @exception RemoteException
+ * @exception RemoteException
*/
public ArrayList getStudentIds() throws RemoteException;
/**
* Returns the name of the course.
- * @exception RemoteException
- *
+ * @exception RemoteException
+ *
*/
public String getName() throws RemoteException;
/**
* Sets the name of the course.
- * @exception RemoteException
- *
+ * @exception RemoteException
+ *
*/
public void setName(String name) throws RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/CourseBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/CourseBean.java
index aa8eec0..822eaf4 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/CourseBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/CourseBean.java
@@ -105,7 +105,7 @@
(DataSource) ic.lookup("java:comp/env/jdbc/bmp-enrollerDB");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/Enroller");
- enrollerHome =
+ enrollerHome =
(EnrollerHome) PortableRemoteObject.narrow(objref,
EnrollerHome.class);
} catch (Exception ex) {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/CourseHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/CourseHome.java
index a969a3b..de8e4fb 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/CourseHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/CourseHome.java
@@ -30,12 +30,12 @@
*/
public Course create(String courseId, String name)
throws RemoteException, CreateException;
-
+
/**
* Gets a reference to the remote interface to the CourseBean object by Primary Key.
* @exception throws FinderException and RemoteException.
*
*/
- public Course findByPrimaryKey(String courseId)
+ public Course findByPrimaryKey(String courseId)
throws FinderException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Enroller.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Enroller.java
index 1ed88fd..7cdeee8 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Enroller.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Enroller.java
@@ -21,7 +21,7 @@
import java.rmi.RemoteException;
public interface Enroller extends EJBObject {
-
+
/**
* Enrolls a Student in a course
* @param studentId primary key of the student object
@@ -40,7 +40,7 @@
public void unEnroll(String studentId, String courseId)
throws RemoteException;
/**
- * Deletes a Student
+ * Deletes a Student
* @param studentId primary key of the student object
* @exception RemoteException
*/
@@ -49,7 +49,7 @@
throws RemoteException;
/**
- * Deletes a Course
+ * Deletes a Course
* @param courseId primary key of the course object
* @exception RemoteException
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/EnrollerBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/EnrollerBean.java
index ce9877f..a0b847a 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/EnrollerBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/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.*;
@@ -24,7 +24,7 @@
import javax.naming.*;
public class EnrollerBean implements SessionBean {
-
+
private Connection con;
private String dbName = "java:comp/env/jdbc/bmp-enrollerDB";
private SessionContext context;
@@ -59,7 +59,7 @@
}
/**
- * Deletes a Student
+ * Deletes a Student
* @param studentId primary key of the student object
* @exception RemoteException
*/
@@ -72,7 +72,7 @@
}
/**
- * Deletes a Course
+ * Deletes a Course
* @param courseId primary key of the course object
* @exception RemoteException
*/
@@ -162,7 +162,7 @@
String insertStatement =
"insert into enrollment values ( ? , ? )";
- PreparedStatement prepStmt =
+ PreparedStatement prepStmt =
con.prepareStatement(insertStatement);
prepStmt.setString(1, studentId);
@@ -172,7 +172,7 @@
prepStmt.close();
}
- private void deleteEntry(String studentId, String courseId)
+ private void deleteEntry(String studentId, String courseId)
throws SQLException {
String deleteStatement =
@@ -215,13 +215,13 @@
prepStmt.close();
}
- private ArrayList selectStudent(String courseId)
+ private ArrayList selectStudent(String courseId)
throws SQLException {
String selectStatement =
"select studentid " +
"from enrollment where courseid = ? ";
- PreparedStatement prepStmt =
+ PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, courseId);
@@ -237,13 +237,13 @@
return a;
}
- private ArrayList selectCourse(String studentId)
+ private ArrayList selectCourse(String studentId)
throws SQLException {
String selectStatement =
"select courseid " +
"from enrollment where studentid = ? ";
- PreparedStatement prepStmt =
+ PreparedStatement prepStmt =
con.prepareStatement(selectStatement);
prepStmt.setString(1, studentId);
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Student.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Student.java
index 6a8bd29..ce3cec4 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Student.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/Student.java
@@ -22,9 +22,9 @@
public interface Student extends EJBObject {
-
+
/**
- * Returns the CourseIds that a student is enrolled in.
+ * Returns the CourseIds that a student is enrolled in.
* @param studentId primary key of the student object
* @param courseId primary key of the course object
* @exception RemoteException
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/StudentBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/StudentBean.java
index b45e517..0858b0a 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/StudentBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/StudentBean.java
@@ -98,7 +98,7 @@
courseIds = new ArrayList();
try {
InitialContext ic = new InitialContext();
- dataSource =
+ dataSource =
(DataSource) ic.lookup("java:comp/env/jdbc/bmp-enrollerDB");
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/Enroller");
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/StudentHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/StudentHome.java
index 2ae3de5..fca5446 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/StudentHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/ejb/StudentHome.java
@@ -36,7 +36,7 @@
* @exception throws FinderException and RemoteException.
*
*/
-
- public Student findByPrimaryKey(String studentId)
+
+ public Student findByPrimaryKey(String studentId)
throws FinderException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/sql/create_pointbase.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/sql/create_pointbase.sql
index 205d60f..963a923 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/sql/create_pointbase.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/sql/create_pointbase.sql
@@ -1,37 +1,37 @@
-create table student
-(studentid varchar(3) constraint pk_student primary key,
-name varchar(36));
-
-insert into student
-values ('123', 'Sal Jones');
-insert into student
-values ('221', 'Alice Smith');
-insert into student
-values ('388', 'Elizabeth Willis');
-insert into student
-values ('456', 'Joe Smith');
-
-
-create table course
-(courseid varchar(3) constraint pk_course primary key,
-name varchar(36));
-
-insert into course
-values ('999', 'Advanced Java Programming');
-insert into course
-values ('111', 'J2EE for Smart People');
-insert into course
-values ('333', 'XML Made Easy');
-insert into course
-values ('777', 'An Introduction to Java Programming');
-
-create table enrollment
-(studentid varchar(3),
-courseid varchar(3),
-constraint fk_studentid
-foreign key (studentid)
-references student(studentid),
-constraint fk_courseid
-foreign key (courseid)
-references course(courseid));
-
+create table student
+(studentid varchar(3) constraint pk_student primary key,
+name varchar(36));
+
+insert into student
+values ('123', 'Sal Jones');
+insert into student
+values ('221', 'Alice Smith');
+insert into student
+values ('388', 'Elizabeth Willis');
+insert into student
+values ('456', 'Joe Smith');
+
+
+create table course
+(courseid varchar(3) constraint pk_course primary key,
+name varchar(36));
+
+insert into course
+values ('999', 'Advanced Java Programming');
+insert into course
+values ('111', 'J2EE for Smart People');
+insert into course
+values ('333', 'XML Made Easy');
+insert into course
+values ('777', 'An Introduction to Java Programming');
+
+create table enrollment
+(studentid varchar(3),
+courseid varchar(3),
+constraint fk_studentid
+foreign key (studentid)
+references student(studentid),
+constraint fk_courseid
+foreign key (courseid)
+references course(courseid));
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/sql/drop_pointbase.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/sql/drop_pointbase.sql
index 2d0ed15..06e5705 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/sql/drop_pointbase.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/enroller/sql/drop_pointbase.sql
@@ -1,3 +1,3 @@
-drop table enrollment;
-drop table student;
-drop table course;
+drop table enrollment;
+drop table student;
+drop table course;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/build-ng.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/build-ng.xml
index 3dd2234..3d5d0ec 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/build-ng.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/build-ng.xml
@@ -31,7 +31,7 @@
&testproperties;
&run;
-
+
<target name="all" depends="build,setup,deploy,run,undeploy,unsetup"/>
<target name="run-test" depends="build,deploy,run,undeploy"/>
@@ -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="**/Address*.class,**/Customer*.class,**/PKString*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/Address*.class,**/Customer*.class,**/PKString*.class,**/*Client*.class" />
</antcall>
- </target>
-
+ </target>
+
<target name="setup" depends="init-common,compile">
<echo message="sql/create_${db.type}.sql"/>
<antcall target="execute-sql-common">
@@ -66,19 +66,19 @@
<antcall target="deploy-jdbc-common">
<param name="jdbc.conpool.name" value="bmp-robean-pool"/>
<param name="jdbc.resource.name" value="jdbc/bmp-robean"/>
- </antcall>
+ </antcall>
</target>
<target name="deploy" depends="init-common">
<echo message="Deploying via asadmin..."/>
<antcall target="deploy-common"/>
- </target>
-
+ </target>
+
<target name="sql" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create_${db.type}.sql"/>
</antcall>
-
+
</target>
<target name="run" depends="init-common">
@@ -87,10 +87,10 @@
<env key="APPCPATH" path="${env.APS_HOME}/lib/testng.jar"/>
</exec>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="unsetup" depends="init-common">
<antcall target="undeploy-jdbc-common">
@@ -100,7 +100,7 @@
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/drop_${db.type}.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
@@ -117,7 +117,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/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/build.properties
index fc1413c..d06e055 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/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}-robean"/>
+<property name="appname" value="${module}-robean"/> \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/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/build.xml
index 1fcad8b..b074878 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/build.xml
@@ -31,7 +31,7 @@
&testproperties;
&run;
-
+
<target name="all" depends="build,setup,deploy,run,undeploy,unsetup"/>
<target name="run-test" depends="build,deploy,run,undeploy"/>
@@ -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="**/Address*.class,**/Customer*.class,**/PKString*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/Address*.class,**/Customer*.class,**/PKString*.class,**/*Client*.class" />
</antcall>
- </target>
-
+ </target>
+
<target name="setup" depends="init-common,compile">
<echo message="sql/create_${db.type}.sql"/>
<antcall target="execute-sql-common">
@@ -66,28 +66,28 @@
<antcall target="deploy-jdbc-common">
<param name="jdbc.conpool.name" value="bmp-robean-pool"/>
<param name="jdbc.resource.name" value="jdbc/bmp-robean"/>
- </antcall>
+ </antcall>
</target>
<target name="deploy" depends="init-common">
<echo message="Deploying via asadmin..."/>
<antcall target="deploy-common"/>
- </target>
-
+ </target>
+
<target name="sql" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create_${db.type}.sql"/>
</antcall>
-
+
</target>
<target name="run" depends="init-common">
<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="undeploy-jdbc-common">
@@ -97,7 +97,7 @@
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/drop_${db.type}.sql"/>
</antcall>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
@@ -114,7 +114,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/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/client/ROBClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/client/ROBClient.java
index fbb93b1..4ef4386 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/client/ROBClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/client/ROBClient.java
@@ -20,13 +20,13 @@
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.util.*;
-import samples.ejb.bmp.robean.ejb.*;
+import samples.ejb.bmp.robean.ejb.*;
import com.sun.ejb.ReadOnlyBeanNotifier;
import com.sun.ejb.containers.ReadOnlyBeanHelper;
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
/**
- * A simple java client will:
+ * A simple java client will:
* <ul>
* <li>Locates the home interface of the enterprise bean
* <li>Gets a reference to the remote interface
@@ -51,10 +51,10 @@
private SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
-
+
public static void main(String[] args) {
ROBClient client = new ROBClient();
-
+
// run the tests
client.runTestClient();
}
@@ -77,58 +77,58 @@
initContext = new javax.naming.InitialContext();
} catch (Exception e) {
System.out.println("Exception occured when creating InitialContext: " + e.toString());
-
+
}
-
+
try {
JNDIName = "java:comp/env/ejb/address";
objref = initContext.lookup(JNDIName);
addressHome = (AddressHome)PortableRemoteObject.narrow(objref, AddressHome.class);
} catch (Exception e) {
System.out.println("Addressbean home not found - Is the bean registered with JNDI? : " + e.toString());
-
+
}
-
+
try {
JNDIName = "java:comp/env/ejb/customer";
objref = initContext.lookup(JNDIName);
customerHome = (CustomerHome)PortableRemoteObject.narrow(objref, CustomerHome.class);
} catch (Exception e) {
System.out.println("Customerbean home not found - Is the bean registered with JNDI? : " + e.toString());
-
+
}
-
+
try {
JNDIName = "java:comp/env/ejb/customerTransactional";
objref = initContext.lookup(JNDIName);
customerTransactionalHome = (CustomerTransactionalHome)PortableRemoteObject.narrow(objref, CustomerTransactionalHome.class);
} catch (Exception e) {
System.out.println("CustomerTransactional bean home not found - Is the bean registered with JNDI? : " + e.toString());
-
+
}
-
+
try {
JNDIName = "java:comp/env/ejb/customerRefresh";
objref = initContext.lookup(JNDIName);
customerRefreshHome = (CustomerRefreshHome)PortableRemoteObject.narrow(objref, CustomerRefreshHome.class);
} catch (Exception e) {
System.out.println("CustomerRefresh bean home not found - Is the bean registered with JNDI? : " + e.toString());
-
+
}
-
+
try {
JNDIName = "java:comp/env/ejb/customerProgRefresh";
objref = initContext.lookup(JNDIName);
customerProgRefreshHome = (CustomerProgRefreshHome)PortableRemoteObject.narrow(objref, CustomerProgRefreshHome.class);
} catch (Exception e) {
- System.out.println("CustomerProgRefresh bean home not found - Is the bean registered with JNDI? : " + e.toString());
+ System.out.println("CustomerProgRefresh bean home not found - Is the bean registered with JNDI? : " + e.toString());
}
}
-
+
public void init() {
doLookup();
}
-
+
public void runTest(){
String SSN="123456789";
//insert into customer1 values ('123456789', 'Smith', 'Rob', '1111', 'First Street', 'San Jose', 'CA', '12345', 123);
@@ -138,40 +138,40 @@
double progRefreshBalance = 0;
double progRefreshBalance_beforeNotifier = 0;
double autoRefreshBalance = 0;
-
+
double amount=250;
-
+
//first get balance
-
-
-
+
+
+
try{
Customer customer=customerHome.findByPrimaryKey(new PKString(SSN));
- CustomerRefresh customerRefresh=customerRefreshHome.findByPrimaryKey(SSN);
+ CustomerRefresh customerRefresh=customerRefreshHome.findByPrimaryKey(SSN);
CustomerProgRefresh customerProgRefresh=customerProgRefreshHome.findByPrimaryKey(new PKString1(SSN));
-
+
//update
customer.doCredit(amount);
customer.doDebit(amount);
-
+
//trans balance
-
+
//get transaction balance
- currentBalance = customer.getBalance();
- System.out.println("Original balance is :"+currentBalance);
-
+ currentBalance = customer.getBalance();
+ System.out.println("Original balance is :"+currentBalance);
+
try{
//get programmatic balance
progRefreshBalance_beforeNotifier = customerProgRefresh.getBalance();
- System.out.println("Balance before Programmatic refresh :" +progRefreshBalance_beforeNotifier);
-
+ System.out.println("Balance before Programmatic refresh :" +progRefreshBalance_beforeNotifier);
+
if ( currentBalance == progRefreshBalance_beforeNotifier ) {
stat.addStatus("Programmatic_Refresh_ReadOnly_Bean", stat.PASS);
}
else {
stat.addStatus("Programmatic_Refresh_ReadOnly_Bean", stat.FAIL);
}
-
+
ReadOnlyBeanNotifier notifier =
ReadOnlyBeanHelper.getReadOnlyBeanNotifier("java:comp/env/ejb/customerProgRefresh");
notifier.refresh(new PKString1(SSN));
@@ -179,39 +179,39 @@
stat.addStatus("Programmatic_Refresh_ReadOnly_Bean", stat.FAIL);
System.out.println("Exception while looking up ReadOnlyBeanNotifier class");
return;
- }
-
+ }
+
customer.doCredit(amount);
-
+
progRefreshBalance = customerProgRefresh.getBalance();
- System.out.println("Balance after Programmatic refresh is :" +progRefreshBalance);
-
+ System.out.println("Balance after Programmatic refresh is :" +progRefreshBalance);
+
if ( progRefreshBalance == currentBalance ) {
-
+
stat.addStatus("Programmatic_Refresh_ReadOnly_Bean ", stat.FAIL);
}
else {
stat.addStatus("Programmatic_Refresh_ReadOnly_Bean", stat.PASS);
- }
-
+ }
+
System.out.println("Sleeping for 80 seconds");
Thread.sleep(80000);
refreshBalance = customerRefresh.getBalance();
- System.out.println("Balance after time refresh is :" +refreshBalance);
-
+ System.out.println("Balance after time refresh is :" +refreshBalance);
+
if ( refreshBalance == currentBalance ) {
stat.addStatus("Refresh_ReadOnly_Bean ", stat.FAIL);
}
else {
stat.addStatus("Refresh_ReadOnly_Bean", stat.PASS);
}
-
+
}catch(Exception e){
stat.addStatus("Programmatic_Refresh_ReadOnly_Bean ", stat.FAIL);
stat.addStatus("Refresh_ReadOnly_Bean ", stat.FAIL);
e.printStackTrace();
}
-
- }
-}
+ }
+
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/application-client.xml
index f734f66..12da740 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/application-client.xml
@@ -53,5 +53,5 @@
<home>samples.ejb.bmp.robean.ejb.CustomerProgRefreshHome</home>
<remote>samples.ejb.bmp.robean.ejb.CustomerProgRefresh</remote>
<ejb-link>CustomerProgRefreshEJB</ejb-link>
- </ejb-ref>
+ </ejb-ref>
</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/application.xml
index 09502df..511390c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/application.xml
@@ -25,5 +25,5 @@
</module>
<module>
<java>ejb-bmp-robean-client.jar</java>
- </module>
+ </module>
</application>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/sun-application-client.xml
index 23d4de1..ccc59af 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/sun-application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/sun-application-client.xml
@@ -39,6 +39,6 @@
<ejb-ref>
<ejb-ref-name>ejb/customerProgRefresh</ejb-ref-name>
<jndi-name>ejb/customerProgRefresh</jndi-name>
- </ejb-ref>
+ </ejb-ref>
</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/sun-ejb-jar.xml
index 9adde72..00d3c65 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/descriptor/sun-ejb-jar.xml
@@ -29,23 +29,23 @@
<res-ref-name>jdbc/bmp-robean</res-ref-name>
<jndi-name>jdbc/bmp-robean</jndi-name>
</resource-ref>
- <is-read-only-bean>true</is-read-only-bean>
- <refresh-period-in-seconds>0</refresh-period-in-seconds>
- <commit-option>B</commit-option>
+ <is-read-only-bean>true</is-read-only-bean>
+ <refresh-period-in-seconds>0</refresh-period-in-seconds>
+ <commit-option>B</commit-option>
<bean-pool>
<steady-pool-size>10</steady-pool-size>
<resize-quantity>5</resize-quantity>
<max-pool-size>100</max-pool-size>
<pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
</bean-pool>
- <bean-cache>
- <max-cache-size>100</max-cache-size>
- <resize-quantity>60</resize-quantity>
+ <bean-cache>
+ <max-cache-size>100</max-cache-size>
+ <resize-quantity>60</resize-quantity>
<is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
- <victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
+ <victim-selection-policy>LRU</victim-selection-policy>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>CustomerEJB</ejb-name>
@@ -54,22 +54,22 @@
<res-ref-name>jdbc/bmp-robean</res-ref-name>
<jndi-name>jdbc/bmp-robean</jndi-name>
</resource-ref>
- <is-read-only-bean>false</is-read-only-bean>
- <commit-option>B</commit-option>
+ <is-read-only-bean>false</is-read-only-bean>
+ <commit-option>B</commit-option>
<bean-pool>
<steady-pool-size>10</steady-pool-size>
<resize-quantity>5</resize-quantity>
<max-pool-size>100</max-pool-size>
<pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
</bean-pool>
- <bean-cache>
- <max-cache-size>100</max-cache-size>
- <resize-quantity>60</resize-quantity>
+ <bean-cache>
+ <max-cache-size>100</max-cache-size>
+ <resize-quantity>60</resize-quantity>
<is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
+ <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>CustomerTransactionalEJB</ejb-name>
@@ -78,23 +78,23 @@
<res-ref-name>jdbc/bmp-robean</res-ref-name>
<jndi-name>jdbc/bmp-robean</jndi-name>
</resource-ref>
- <is-read-only-bean>true</is-read-only-bean>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <commit-option>B</commit-option>
+ <is-read-only-bean>true</is-read-only-bean>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <commit-option>B</commit-option>
<bean-pool>
<steady-pool-size>10</steady-pool-size>
<resize-quantity>5</resize-quantity>
<max-pool-size>100</max-pool-size>
<pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
</bean-pool>
- <bean-cache>
- <max-cache-size>100</max-cache-size>
- <resize-quantity>60</resize-quantity>
+ <bean-cache>
+ <max-cache-size>100</max-cache-size>
+ <resize-quantity>60</resize-quantity>
<is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
+ <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>CustomerRefreshEJB</ejb-name>
@@ -103,22 +103,22 @@
<res-ref-name>jdbc/bmp-robean</res-ref-name>
<jndi-name>jdbc/bmp-robean</jndi-name>
</resource-ref>
- <is-read-only-bean>true</is-read-only-bean>
- <refresh-period-in-seconds>60</refresh-period-in-seconds>
- <commit-option>B</commit-option>
+ <is-read-only-bean>true</is-read-only-bean>
+ <refresh-period-in-seconds>60</refresh-period-in-seconds>
+ <commit-option>B</commit-option>
<bean-pool>
<steady-pool-size>10</steady-pool-size>
<resize-quantity>5</resize-quantity>
<max-pool-size>100</max-pool-size>
<pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
</bean-pool>
- <bean-cache>
- <max-cache-size>100</max-cache-size>
- <resize-quantity>60</resize-quantity>
+ <bean-cache>
+ <max-cache-size>100</max-cache-size>
+ <resize-quantity>60</resize-quantity>
<is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
- <victim-selection-policy>LRU</victim-selection-policy>
+ <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
+ <victim-selection-policy>LRU</victim-selection-policy>
</bean-cache>
</ejb>
<ejb>
@@ -128,23 +128,23 @@
<res-ref-name>jdbc/bmp-robean</res-ref-name>
<jndi-name>jdbc/bmp-robean</jndi-name>
</resource-ref>
- <is-read-only-bean>true</is-read-only-bean>
- <refresh-period-in-seconds>600</refresh-period-in-seconds>
- <commit-option>B</commit-option>
+ <is-read-only-bean>true</is-read-only-bean>
+ <refresh-period-in-seconds>600</refresh-period-in-seconds>
+ <commit-option>B</commit-option>
<bean-pool>
<steady-pool-size>10</steady-pool-size>
<resize-quantity>5</resize-quantity>
<max-pool-size>100</max-pool-size>
<pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
</bean-pool>
- <bean-cache>
- <max-cache-size>100</max-cache-size>
- <resize-quantity>60</resize-quantity>
+ <bean-cache>
+ <max-cache-size>100</max-cache-size>
+ <resize-quantity>60</resize-quantity>
<is-cache-overflow-allowed>true</is-cache-overflow-allowed>
- <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
- <victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
+ <victim-selection-policy>LRU</victim-selection-policy>
+ </bean-cache>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/AddressEJB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/AddressEJB.java
index 21e87d1..328dfaa 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/AddressEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/AddressEJB.java
@@ -85,9 +85,9 @@
return null;
}
- public void ejbPostCreate() {
- }
-
+ public void ejbPostCreate() {
+ }
+
public void ejbRemove() {
}
@@ -118,7 +118,7 @@
conn.close();
} catch (SQLException e) {
System.out.println("SQLException occurred in ejbLoad() method");
- }
+ }
}
public void ejbActivate() {}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/AddressHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/AddressHome.java
index a7108a6..fc0c625 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/AddressHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/AddressHome.java
@@ -20,6 +20,6 @@
import jakarta.ejb.FinderException;
public interface AddressHome extends jakarta.ejb.EJBHome {
- public Address findByPrimaryKey(String SSN) throws FinderException, RemoteException;
+ public Address findByPrimaryKey(String SSN) throws FinderException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerEJB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerEJB.java
index 21fddce..7066435 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerEJB.java
@@ -77,10 +77,10 @@
public PKString ejbCreate() {
return null;
}
-
- public void ejbPostCreate() {
- }
-
+
+ public void ejbPostCreate() {
+ }
+
public void ejbRemove() {
}
@@ -120,7 +120,7 @@
conn.close();
} catch (SQLException e) {
System.out.println("SQLException occurred in ejbLoad() method");
- }
+ }
}
public void ejbActivate() {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerHome.java
index 6b2e329..9451157 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerHome.java
@@ -20,6 +20,6 @@
import jakarta.ejb.FinderException;
public interface CustomerHome extends jakarta.ejb.EJBHome {
- public Customer findByPrimaryKey(PKString SSN) throws FinderException, RemoteException;
+ public Customer findByPrimaryKey(PKString SSN) throws FinderException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerProgRefreshEJB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerProgRefreshEJB.java
index c3ff5d4..eaa381b 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerProgRefreshEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerProgRefreshEJB.java
@@ -48,8 +48,8 @@
public PKString1 ejbFindByPrimaryKey(PKString1 SSN) throws FinderException {
Connection conn = null;
- Statement statement = null;
- ResultSet results = null;
+ Statement statement = null;
+ ResultSet results = null;
try {
conn = dataSource.getConnection();
@@ -66,28 +66,28 @@
System.out.println("SQLException occured in ejbFindbyPrimaryKey method.");
return new PKString1("");
} finally {
- if (results != null)
- try {
- results.close();
- } catch (Exception ex) { }
- if (statement != null)
- try {
- statement.close();
- } catch (Exception ex) { }
- if (conn != null)
- try {
- conn.close();
- } catch (Exception ex) { }
- }
+ if (results != null)
+ try {
+ results.close();
+ } catch (Exception ex) { }
+ if (statement != null)
+ try {
+ statement.close();
+ } catch (Exception ex) { }
+ if (conn != null)
+ try {
+ conn.close();
+ } catch (Exception ex) { }
+ }
}
public PKString1 ejbCreate() {
return null;
}
-
- public void ejbPostCreate() {
- }
-
+
+ public void ejbPostCreate() {
+ }
+
public void ejbRemove() {
}
@@ -111,7 +111,7 @@
conn.close();
} catch (SQLException e) {
System.out.println("SQLException occurred in ejbLoad() method");
- }
+ }
}
public void ejbActivate() {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerProgRefreshHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerProgRefreshHome.java
index a6d4fc4..fe1a335 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerProgRefreshHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerProgRefreshHome.java
@@ -20,6 +20,6 @@
import jakarta.ejb.FinderException;
public interface CustomerProgRefreshHome extends jakarta.ejb.EJBHome {
- public CustomerProgRefresh findByPrimaryKey(PKString1 SSN) throws FinderException, RemoteException;
+ public CustomerProgRefresh findByPrimaryKey(PKString1 SSN) throws FinderException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerRefreshEJB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerRefreshEJB.java
index 17bfd00..53e48fc 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerRefreshEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerRefreshEJB.java
@@ -69,9 +69,9 @@
public String ejbCreate() {
return null;
}
-
- public void ejbPostCreate() {
- }
+
+ public void ejbPostCreate() {
+ }
public void ejbRemove() {
}
@@ -96,7 +96,7 @@
conn.close();
} catch (SQLException e) {
System.out.println("SQLException occurred in ejbLoad() method");
- }
+ }
}
public void ejbActivate() {
@@ -104,6 +104,6 @@
public void ejbPassivate() {
}
}
-
-
-
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerRefreshHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerRefreshHome.java
index 505df3a..b3e4ad0 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerRefreshHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerRefreshHome.java
@@ -20,6 +20,6 @@
import jakarta.ejb.FinderException;
public interface CustomerRefreshHome extends jakarta.ejb.EJBHome {
- public CustomerRefresh findByPrimaryKey(String SSN) throws FinderException, RemoteException;
+ public CustomerRefresh findByPrimaryKey(String SSN) throws FinderException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerTransactionalEJB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerTransactionalEJB.java
index dbfa22d..a645533 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerTransactionalEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerTransactionalEJB.java
@@ -69,9 +69,9 @@
public String ejbCreate() {
return null;
}
-
- public void ejbPostCreate() {
- }
+
+ public void ejbPostCreate() {
+ }
public void ejbRemove() {
}
@@ -95,7 +95,7 @@
conn.close();
} catch (SQLException e) {
System.out.println("SQLException occurred in ejbLoad() method");
- }
+ }
}
public void ejbActivate() {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerTransactionalHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerTransactionalHome.java
index 50e94c2..2b0da35 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerTransactionalHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/ejb/CustomerTransactionalHome.java
@@ -20,6 +20,6 @@
import jakarta.ejb.FinderException;
public interface CustomerTransactionalHome extends jakarta.ejb.EJBHome {
- public CustomerTransactional findByPrimaryKey(String SSN) throws FinderException, RemoteException;
+ public CustomerTransactional findByPrimaryKey(String SSN) throws FinderException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/create_derby.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/create_derby.sql
index 61bcb87..7e7a28c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/create_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/create_derby.sql
@@ -1,14 +1,14 @@
drop table customer1;
create table customer1 (
- SSN varchar(9),
- lastNAme varchar(20),
- firstname varchar(20),
- address1 varchar(20),
- address2 varchar(20),
- city varchar(10),
- state varchar(10),
- zipcode varchar(5),
+ SSN varchar(9),
+ lastNAme varchar(20),
+ firstname varchar(20),
+ address1 varchar(20),
+ address2 varchar(20),
+ city varchar(10),
+ state varchar(10),
+ zipcode varchar(5),
balance decimal(10,2) );
insert into customer1 values ('123456789', 'Smith', 'Rob', '1111', 'First Street', 'San Jose', 'CA', '12345', 123);
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/create_pointbase.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/create_pointbase.sql
index e0f8a03..a57a28a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/create_pointbase.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/create_pointbase.sql
@@ -1,14 +1,14 @@
drop table customer1;
create table customer1 (
- SSN varchar2(9),
- lastNAme varchar2(20),
- firstname varchar2(20),
- address1 varchar2 (20),
- address2 varchar2(20),
- city varchar2(10),
- state varchar2(10),
- zipcode varchar2(5),
+ SSN varchar2(9),
+ lastNAme varchar2(20),
+ firstname varchar2(20),
+ address1 varchar2 (20),
+ address2 varchar2(20),
+ city varchar2(10),
+ state varchar2(10),
+ zipcode varchar2(5),
balance decimal(10,2) );
insert into customer1 values ('123456789', 'Smith', 'Rob', '1111', 'First Street', 'San Jose', 'CA', '12345', 123);
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/createpointbase.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/createpointbase.sql
index e0f8a03..a57a28a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/createpointbase.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/sql/createpointbase.sql
@@ -1,14 +1,14 @@
drop table customer1;
create table customer1 (
- SSN varchar2(9),
- lastNAme varchar2(20),
- firstname varchar2(20),
- address1 varchar2 (20),
- address2 varchar2(20),
- city varchar2(10),
- state varchar2(10),
- zipcode varchar2(5),
+ SSN varchar2(9),
+ lastNAme varchar2(20),
+ firstname varchar2(20),
+ address1 varchar2 (20),
+ address2 varchar2(20),
+ city varchar2(10),
+ state varchar2(10),
+ zipcode varchar2(5),
balance decimal(10,2) );
insert into customer1 values ('123456789', 'Smith', 'Rob', '1111', 'First Street', 'San Jose', 'CA', '12345', 123);
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/testng-client/ROBClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/testng-client/ROBClient.java
index 690adc9..9b23622 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/testng-client/ROBClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/bmp/robean/testng-client/ROBClient.java
@@ -20,7 +20,7 @@
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import java.util.*;
-import samples.ejb.bmp.robean.ejb.*;
+import samples.ejb.bmp.robean.ejb.*;
import com.sun.ejb.ReadOnlyBeanNotifier;
import com.sun.ejb.containers.ReadOnlyBeanHelper;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/build.xml
index 3e698af..f032f92 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/build.xml
@@ -27,49 +27,49 @@
<param name="ejb-target" value="all"/>
</antcall>
</target>
-
+
<target name="run-test">
<antcall target="runejbtargets">
<param name="ejb-target" value="run-test"/>
</antcall>
</target>
-
+
<target name="clean">
<antcall target="runejbtargets">
<param name="ejb-target" value="clean"/>
</antcall>
</target>
-
+
<target name="build">
<antcall target="runejbtargets">
<param name="ejb-target" value="build"/>
</antcall>
</target>
-
+
<target name="deploy">
<antcall target="runejbtargets">
<param name="ejb-target" value="deploy"/>
</antcall>
</target>
-
+
<target name="undeploy">
<antcall target="runejbtargets">
<param name="ejb-target" value="undeploy"/>
</antcall>
</target>
-
+
<target name="run">
<antcall target="runejbtargets">
<param name="ejb-target" value="run"/>
</antcall>
</target>
-
+
<target name="setup">
<antcall target="runejbtargets">
<param name="ejb-target" value="setup"/>
</antcall>
</target>
-
+
<target name="unsetup">
<antcall target="runejbtargets">
<param name="ejb-target" value="unsetup"/>
@@ -127,7 +127,7 @@
</target>
<target name="usage">
- <echo> Usage:
+ <echo> Usage:
======== Targets by execution granularity =========
ant clean (Cleans all ejb tests)
@@ -148,11 +148,11 @@
ant all (Executes all the ejb tests)
===== Targets by technoloy and execution granularity ======
- Note: Run the command of the following type:
+ Note: Run the command of the following type:
% ant stateless -Dejb-target=clean
to run the 'clean' target for 'stateless' tests
- </echo>
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/build.xml
index e3af3ff..9e3df95 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/build.xml
@@ -89,17 +89,17 @@
</target>
<target name="usage">
- <echo> Usage:
- ant orderapp (Executes the orderapp tests)
- ant all (Executes all the ejb cmp tests)
- ant clean (cleans all the ejb cmp tests)
- ant build (builds all the ejb cmp tests)
- ant setup (sets up all resources for cmp tests)
- ant deploy (deploys all the ejb cmp apps)
- ant run (Executes all the ejb cmp tests)
- ant undeploy (undeploys all the cmp apps)
- ant unsetup (unsets all resources for cmp tests)
- </echo>
+ <echo> Usage:
+ ant orderapp (Executes the orderapp tests)
+ ant all (Executes all the ejb cmp tests)
+ ant clean (cleans all the ejb cmp tests)
+ ant build (builds all the ejb cmp tests)
+ ant setup (sets up all resources for cmp tests)
+ ant deploy (deploys all the ejb cmp apps)
+ ant run (Executes all the ejb cmp tests)
+ ant undeploy (undeploys all the cmp apps)
+ ant unsetup (unsets all resources for cmp tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/build.properties
index e659799..2df19af 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/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-cmp"/>
-<property name="appname" value="${module}-cmporder"/>
+<property name="appname" value="${module}-cmporder"/> \u0020
<property name="application.xml" value="descriptor/application.xml"/>
<property name="sun-application.xml" value="descriptor/sun-application.xml"/>
<property name="ejb-jar-entity.xml" value="descriptor/ejb-jar-entity.xml"/>
@@ -26,11 +26,11 @@
<property name="sun-ejb-jar-entity.xml" value="descriptor/sun-ejb-jar-entity.xml"/>
<property name="sun-ejb-jar-session.xml" value="descriptor/sun-ejb-jar-session.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="descriptor/cmporder.dbschema"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/build.xml
index 345b062..5ed27be 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/build.xml
@@ -35,8 +35,8 @@
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
- <target name="compile" depends="clean">
+
+ <target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
</antcall>
@@ -54,18 +54,18 @@
<antcall target="package-entity-jar"/>
<antcall target="appclient-jar-common"/>
<antcall target="package-ear"/>
- </target>
+ </target>
<target name="package-session-jar">
<antcall target="package-ejbjar-common">
<param name="ejb-jar.xml" value="${ejb-jar-session.xml}"/>
<param name="sun-ejb-jar.xml" value="${sun-ejb-jar-session.xml}"/>
<param name="ejbjar.files" value="${build.classes.dir}"/>
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/*.class"/>
<param name="ejb.jar" value="${assemble.dir}/${appname}-session-ejb.jar"/>
</antcall>
- </target>
+ </target>
<target name="package-entity-jar">
<antcall target="package-ejbjar-common">
@@ -73,22 +73,22 @@
<param name="sun-ejb-jar.xml" value="${sun-ejb-jar-entity.xml}"/>
<param name="ejbjar.files" value="${build.classes.dir}"/>
<param name="dbschema" value="${dbschema}"/>
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/*.class"/>
<param name="ejb.jar" value="${assemble.dir}/${appname}-entity-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">
@@ -104,14 +104,14 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<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">
@@ -120,15 +120,15 @@
<antcall target="delete-persistence-resource-common"/>
<antcall target="undeploy-jdbc-common"/>
<antcall target="reconfig-common"/>
- </target>
-
+ </target>
+
<target name="sql-create" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create_${db.type}.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_${db.type}.sql"/>
</antcall>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/LocalVendorPartHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/LocalVendorPartHome.java
index b3640da..ee6a243 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/LocalVendorPartHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/LocalVendorPartHome.java
@@ -20,7 +20,7 @@
public interface LocalVendorPartHome extends EJBLocalHome {
-
+
public LocalVendorPart findByPrimaryKey(Object aKey)
throws FinderException;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/request/Request.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/request/Request.java
index 0ba131c..0ec99d2 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/request/Request.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/request/Request.java
@@ -39,13 +39,13 @@
public double getBillOfMaterialPrice(BomRequest bomRequest) throws RemoteException;
public Double getAvgPrice() throws RemoteException;
-
+
public Double getTotalPricePerVendor(VendorRequest vendorRequest) throws RemoteException;
-
+
public double getOrderPrice(Integer orderId) throws RemoteException;
-
+
public void adjustOrderDiscount(int adjustment) throws RemoteException;
-
+
public Collection locateVendorsByPartialName(String name) throws RemoteException;
public String reportVendorsByOrder(Integer orderId) throws RemoteException;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/request/RequestBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/request/RequestBean.java
index aebd6e6..c4095a7 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/request/RequestBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/ejb/request/RequestBean.java
@@ -29,50 +29,50 @@
public class RequestBean implements SessionBean {
private SessionContext context;
-
+
private LocalLineItemHome lineItemHome = null;
-
+
private LocalOrderHome orderHome = null;
-
+
private LocalPartHome partHome = null;
-
+
private LocalVendorHome vendorHome = null;
-
+
private LocalVendorPartHome vendorPartHome = null;
-
-
+
+
/**
* @see SessionBean#setSessionContext(SessionContext)
*/
public void setSessionContext(SessionContext aContext) {
context=aContext;
}
-
-
+
+
/**
* @see SessionBean#ejbActivate()
*/
public void ejbActivate() {
-
+
}
-
-
+
+
/**
* @see SessionBean#ejbPassivate()
*/
public void ejbPassivate() {
-
+
}
-
-
+
+
/**
* @see SessionBean#ejbRemove()
*/
public void ejbRemove() {
-
+
}
-
-
+
+
/**
* See section 7.10.3 of the EJB 2.0 specification
*/
@@ -87,56 +87,56 @@
throw new EJBException(e.getMessage());
}
}
-
+
public void createPart(PartRequest partRequest) {
try {
- LocalPart part = partHome.create(partRequest.partNumber,
+ LocalPart part = partHome.create(partRequest.partNumber,
partRequest.revision, partRequest.description,
- partRequest.revisionDate, partRequest.specification,
+ partRequest.revisionDate, partRequest.specification,
partRequest.drawing);
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
}
-
+
public void addPartToBillOfMaterial(BomRequest bomRequest) {
try {
PartKey bomkey = new PartKey();
bomkey.partNumber = bomRequest.bomPartNumber;
bomkey.revision = bomRequest.bomRevision;
-
+
LocalPart bom = partHome.findByPrimaryKey(bomkey);
-
+
PartKey pkey = new PartKey();
pkey.partNumber = bomRequest.partNumber;
pkey.revision = bomRequest.revision;
-
+
LocalPart part = partHome.findByPrimaryKey(pkey);
part.setBomPart(bom);
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
}
-
+
public void createVendor(VendorRequest vendorRequest) {
try {
- LocalVendor vendor = vendorHome.create(vendorRequest.vendorId,
- vendorRequest.name, vendorRequest.address,
+ LocalVendor vendor = vendorHome.create(vendorRequest.vendorId,
+ vendorRequest.name, vendorRequest.address,
vendorRequest.contact, vendorRequest.phone);
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
}
-
+
public void createVendorPart(VendorPartRequest vendorPartRequest) {
try {
PartKey pkey = new PartKey();
pkey.partNumber = vendorPartRequest.partNumber;
pkey.revision = vendorPartRequest.revision;
-
+
LocalPart part = partHome.findByPrimaryKey(pkey);
LocalVendorPart vendorPart = vendorPartHome.create(
- vendorPartRequest.description, vendorPartRequest.price,
+ vendorPartRequest.description, vendorPartRequest.price,
part);
VendorKey vkey = new VendorKey();
@@ -152,24 +152,24 @@
public void createOrder(OrderRequest orderRequest) {
try {
- LocalOrder order = orderHome.create(orderRequest.orderId,
- orderRequest.status, orderRequest.discount,
+ LocalOrder order = orderHome.create(orderRequest.orderId,
+ orderRequest.status, orderRequest.discount,
orderRequest.shipmentInfo);
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
}
- public void addLineItem(LineItemRequest lineItemRequest) {
+ public void addLineItem(LineItemRequest lineItemRequest) {
try {
LocalOrder order = orderHome.findByPrimaryKey(lineItemRequest.orderId);
-
+
PartKey pkey = new PartKey();
pkey.partNumber = lineItemRequest.partNumber;
pkey.revision = lineItemRequest.revision;
-
+
LocalPart part = partHome.findByPrimaryKey(pkey);
-
+
LocalLineItem lineItem = lineItemHome.create(order, lineItemRequest.quantity,
part.getVendorPart());
} catch (Exception e) {
@@ -183,7 +183,7 @@
PartKey bomkey = new PartKey();
bomkey.partNumber = bomRequest.bomPartNumber;
bomkey.revision = bomRequest.bomRevision;
-
+
LocalPart bom = partHome.findByPrimaryKey(bomkey);
Collection parts = bom.getParts();
for (Iterator iterator = parts.iterator(); iterator.hasNext();) {
@@ -191,7 +191,7 @@
LocalVendorPart vendorPart = part.getVendorPart();
price += vendorPart.getPrice();
}
-
+
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
@@ -204,7 +204,7 @@
try {
LocalOrder order = orderHome.findByPrimaryKey(orderId);
price = order.calculateAmmount();
-
+
} catch (Exception e) {
throw new EJBException(e.getMessage());
}
@@ -233,7 +233,7 @@
LocalVendor vendor = (LocalVendor)iterator.next();
names.add(vendor.getName());
}
-
+
} catch (FinderException e) {
}
@@ -269,7 +269,7 @@
.append(vendor.getName()).append(' ')
.append(vendor.getContact()).append('\n');
}
-
+
} catch (FinderException e) {
throw new EJBException(e.getMessage());
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/sql/create_derby.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/sql/create_derby.sql
index af770db..2a35eb9 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/sql/create_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/sql/create_derby.sql
@@ -6,62 +6,62 @@
drop table PART;
create table PART (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- DESCRIPTION VARCHAR(255),
- REVISION_DATE TIMESTAMP NOT NULL,
- BOM_PART_NUMBER VARCHAR(15),
- BOM_REVISION NUMERIC(2),
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ DESCRIPTION VARCHAR(255),
+ REVISION_DATE TIMESTAMP NOT NULL,
+ BOM_PART_NUMBER VARCHAR(15),
+ BOM_REVISION NUMERIC(2),
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
alter table PART
- add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
+ add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
REFERENCES PART (PART_NUMBER, REVISION);
create table PART_DETAIL (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- SPECIFICATION CLOB(10K),
- DRAWING BLOB(10K),
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ SPECIFICATION CLOB(10K),
+ DRAWING BLOB(10K),
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
create table VENDOR (
- VENDOR_ID INTEGER NOT NULL PRIMARY KEY,
- NAME VARCHAR(30) NOT NULL,
- ADDRESS VARCHAR(255) NOT NULL,
- CONTACT VARCHAR(255) NOT NULL,
- PHONE VARCHAR(30) NOT NULL
+ VENDOR_ID INTEGER NOT NULL PRIMARY KEY,
+ NAME VARCHAR(30) NOT NULL,
+ ADDRESS VARCHAR(255) NOT NULL,
+ CONTACT VARCHAR(255) NOT NULL,
+ PHONE VARCHAR(30) NOT NULL
);
create table VENDOR_PART (
- VENDOR_PART_NUMBER BIGINT NOT NULL PRIMARY KEY,
- DESCRIPTION VARCHAR(255),
- PRICE DOUBLE PRECISION NOT NULL,
- VENDOR_ID INTEGER NOT NULL,
- PART_NUMBER VARCHAR(15) NOT NULL,
- PART_REVISION NUMERIC(2) NOT NULL,
- CONSTRAINT FK_2 FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
- CONSTRAINT FK_3 FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
- UNIQUE (PART_NUMBER, PART_REVISION)
+ VENDOR_PART_NUMBER BIGINT NOT NULL PRIMARY KEY,
+ DESCRIPTION VARCHAR(255),
+ PRICE DOUBLE PRECISION NOT NULL,
+ VENDOR_ID INTEGER NOT NULL,
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ PART_REVISION NUMERIC(2) NOT NULL,
+ CONSTRAINT FK_2 FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
+ CONSTRAINT FK_3 FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
+ UNIQUE (PART_NUMBER, PART_REVISION)
);
create table ORDERS (
- ORDER_ID INTEGER NOT NULL PRIMARY KEY,
- STATUS CHAR(1) NOT NULL,
- LAST_UPDATE TIMESTAMP NOT NULL,
- DISCOUNT NUMERIC(2) NOT NULL,
- SHIPMENT_INFO VARCHAR(255)
+ ORDER_ID INTEGER NOT NULL PRIMARY KEY,
+ STATUS CHAR(1) NOT NULL,
+ LAST_UPDATE TIMESTAMP NOT NULL,
+ DISCOUNT NUMERIC(2) NOT NULL,
+ SHIPMENT_INFO VARCHAR(255)
);
create table LINEITEM (
- ORDER_ID INTEGER NOT NULL,
- ITEM_ID NUMERIC(3) NOT NULL,
- QUANTITY NUMERIC(3) NOT NULL,
- VENDOR_PART_NUMBER BIGINT NOT NULL,
- CONSTRAINT FK_4 FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
- CONSTRAINT FK_5 FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
- PRIMARY KEY (ORDER_ID, ITEM_ID)
+ ORDER_ID INTEGER NOT NULL,
+ ITEM_ID NUMERIC(3) NOT NULL,
+ QUANTITY NUMERIC(3) NOT NULL,
+ VENDOR_PART_NUMBER BIGINT NOT NULL,
+ CONSTRAINT FK_4 FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
+ CONSTRAINT FK_5 FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
+ PRIMARY KEY (ORDER_ID, ITEM_ID)
);
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/sql/create_pointbase.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/sql/create_pointbase.sql
index cf75e8d..9d28d15 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/sql/create_pointbase.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/orderapp/sql/create_pointbase.sql
@@ -8,20 +8,20 @@
commit;
/* Self-ref to identify Bill of Material (BOM)
- * Compound PK
+ * Compound PK
*/
create table PART (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- DESCRIPTION VARCHAR(255) NULL,
- REVISION_DATE TIMESTAMP NOT NULL,
- BOM_PART_NUMBER VARCHAR(15) NULL,
- BOM_REVISION NUMERIC(2) NULL,
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ DESCRIPTION VARCHAR(255) NULL,
+ REVISION_DATE TIMESTAMP NOT NULL,
+ BOM_PART_NUMBER VARCHAR(15) NULL,
+ BOM_REVISION NUMERIC(2) NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
alter table PART
- add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
+ add CONSTRAINT FK_1 FOREIGN KEY (BOM_PART_NUMBER, BOM_REVISION)
REFERENCES PART (PART_NUMBER, REVISION);
commit;
@@ -31,65 +31,65 @@
* CLOB column type
*/
create table PART_DETAIL (
- PART_NUMBER VARCHAR(15) NOT NULL,
- REVISION NUMERIC(2) NOT NULL,
- SPECIFICATION CLOB(10K) NULL,
- DRAWING BLOB(10K) NULL,
- PRIMARY KEY (PART_NUMBER, REVISION)
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ REVISION NUMERIC(2) NOT NULL,
+ SPECIFICATION CLOB(10K) NULL,
+ DRAWING BLOB(10K) NULL,
+ PRIMARY KEY (PART_NUMBER, REVISION)
);
commit;
/* PK can be mapped to a primitive PK field type */
create table VENDOR (
- VENDOR_ID INTEGER PRIMARY KEY,
- NAME VARCHAR(30) NOT NULL,
- ADDRESS VARCHAR(255) NOT NULL,
- CONTACT VARCHAR(255) NOT NULL,
- PHONE VARCHAR(30) NOT NULL
+ VENDOR_ID INTEGER PRIMARY KEY,
+ NAME VARCHAR(30) NOT NULL,
+ ADDRESS VARCHAR(255) NOT NULL,
+ CONTACT VARCHAR(255) NOT NULL,
+ PHONE VARCHAR(30) NOT NULL
);
commit;
-/* Can be used for unknown PK
+/* Can be used for unknown PK
* 1-1 to PART
* Compound FK
*/
create table VENDOR_PART (
- VENDOR_PART_NUMBER BIGINT PRIMARY KEY,
- DESCRIPTION VARCHAR(255) NULL,
- PRICE DOUBLE PRECISION NOT NULL,
- VENDOR_ID INTEGER NOT NULL,
- PART_NUMBER VARCHAR(15) NOT NULL,
- PART_REVISION NUMERIC(2) NOT NULL,
- CONSTRAINT FK_2 FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
- CONSTRAINT FK_3 FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
- UNIQUE (PART_NUMBER, PART_REVISION)
+ VENDOR_PART_NUMBER BIGINT PRIMARY KEY,
+ DESCRIPTION VARCHAR(255) NULL,
+ PRICE DOUBLE PRECISION NOT NULL,
+ VENDOR_ID INTEGER NOT NULL,
+ PART_NUMBER VARCHAR(15) NOT NULL,
+ PART_REVISION NUMERIC(2) NOT NULL,
+ CONSTRAINT FK_2 FOREIGN KEY (VENDOR_ID) REFERENCES VENDOR (VENDOR_ID),
+ CONSTRAINT FK_3 FOREIGN KEY (PART_NUMBER, PART_REVISION) REFERENCES PART (PART_NUMBER, REVISION),
+ UNIQUE (PART_NUMBER, PART_REVISION)
);
commit;
create table ORDERS (
- ORDER_ID INTEGER PRIMARY KEY,
- STATUS CHAR(1) NOT NULL,
- LAST_UPDATE TIMESTAMP NOT NULL,
- DISCOUNT NUMERIC(2) NOT NULL,
- SHIPMENT_INFO VARCHAR(255) NULL
+ ORDER_ID INTEGER PRIMARY KEY,
+ STATUS CHAR(1) NOT NULL,
+ LAST_UPDATE TIMESTAMP NOT NULL,
+ DISCOUNT NUMERIC(2) NOT NULL,
+ SHIPMENT_INFO VARCHAR(255) NULL
);
commit;
-/* Overlapping PK-FK
+/* Overlapping PK-FK
* Uni-directional to VENDOR_PART
*/
create table LINEITEM (
- ORDER_ID INTEGER NOT NULL,
- ITEM_ID NUMERIC(3) NOT NULL,
- QUANTITY NUMERIC(3) NOT NULL,
- VENDOR_PART_NUMBER BIGINT NOT NULL,
- CONSTRAINT FK_4 FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
- CONSTRAINT FK_5 FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
- PRIMARY KEY (ORDER_ID, ITEM_ID)
+ ORDER_ID INTEGER NOT NULL,
+ ITEM_ID NUMERIC(3) NOT NULL,
+ QUANTITY NUMERIC(3) NOT NULL,
+ VENDOR_PART_NUMBER BIGINT NOT NULL,
+ CONSTRAINT FK_4 FOREIGN KEY (ORDER_ID) REFERENCES ORDERS (ORDER_ID),
+ CONSTRAINT FK_5 FOREIGN KEY (VENDOR_PART_NUMBER) REFERENCES VENDOR_PART (VENDOR_PART_NUMBER),
+ PRIMARY KEY (ORDER_ID, ITEM_ID)
);
commit;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/build-ng.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/build-ng.xml
index 8e81281..053c1d5 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/build-ng.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/build-ng.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="util"/>
@@ -54,41 +54,41 @@
<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="setup" depends="init-common">
@@ -103,17 +103,17 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<exec executable="${APPCLIENT}" failonerror="false">
<arg line="-client ${assemble.dir}/${appname}AppClient.jar" />
<env key="APPCPATH" path="${env.APS_HOME}/lib/testng.jar"/>
</exec>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="unsetup" depends="init-common">
<antcall target="execute-sql-common">
@@ -122,15 +122,15 @@
<antcall target="delete-persistence-resource-common"/>
<antcall target="undeploy-jdbc-common"/>
<antcall target="reconfig-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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/build.properties
index 5979dad..5bd375d 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/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-cmp"/>
-<property name="appname" value="${module}-roster"/>
+<property name="appname" value="${module}-roster"/> \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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/build.xml
index a19937a..80f5874 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/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="util"/>
@@ -54,41 +54,41 @@
<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="setup" depends="init-common">
@@ -104,14 +104,14 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<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">
@@ -120,15 +120,15 @@
<antcall target="delete-persistence-resource-common"/>
<antcall target="undeploy-jdbc-common"/>
<antcall target="reconfig-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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/client/RosterClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/client/RosterClient.java
index e63aea8..544c724 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/client/RosterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/client/RosterClient.java
@@ -27,7 +27,7 @@
public class RosterClient {
-
+
private static SimpleReporterAdapter status =
new SimpleReporterAdapter("appserv-tests");
@@ -37,8 +37,8 @@
Context initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/SimpleRoster");
- RosterHome home =
- (RosterHome)PortableRemoteObject.narrow(objref,
+ RosterHome home =
+ (RosterHome)PortableRemoteObject.narrow(objref,
RosterHome.class);
Roster myRoster = home.create();
@@ -112,7 +112,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");
@@ -159,7 +159,7 @@
myRoster.createTeamInLeague(new TeamDetails(
"T2", "Gophers", "Manteca"), "L1");
-
+
myRoster.createTeamInLeague(new TeamDetails(
"T3", "Deer", "Bodie"), "L2");
@@ -277,7 +277,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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LeagueBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LeagueBean.java
index c0d7798..497386e 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LeagueBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LocalLeagueHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LocalLeagueHome.java
index c8ecf4d..98b759b 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LocalLeagueHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LocalPlayerHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LocalPlayerHome.java
index 47a18d6..da429e5 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LocalPlayerHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LocalTeamHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LocalTeamHome.java
index 300f1da..a5072a2 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/LocalTeamHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/PlayerBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/PlayerBean.java
index 23c33a4..169506f 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/PlayerBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/Roster.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/Roster.java
index 02b5517..9ee32c8 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/Roster.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/Roster.java
@@ -22,55 +22,55 @@
import com.sun.s1peqe.ejb.cmp.roster.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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/RosterBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/RosterBean.java
index 8879496..45c8a1b 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/RosterBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/TeamBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/TeamBean.java
index 5b12920..48e9b1d 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/ejb/TeamBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/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/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/sql/create_pointbase.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/sql/create_pointbase.sql
index 8414770..bf0a84e 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/sql/create_pointbase.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/cmp/roster/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/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/build-ng.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/build-ng.xml
index b3ebb85..4656b03 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/build-ng.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/build-ng.xml
@@ -44,7 +44,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,14 +56,14 @@
<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 name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-pe"/>
<antcall target="deploy-ee"/>
@@ -72,7 +72,7 @@
<target name="deploy-pe" depends="init-common" unless="ee">
<antcall target="deploy-common"/>
-<!-- <echo message="Restarting domain on PE/EE DAS after deployment"/>
+<!-- <echo message="Restarting domain on PE/EE DAS after deployment"/>
<antcall target="restart-server-instance-common"/> -->
</target>
@@ -88,10 +88,10 @@
</target>
<target name="run-test" depends="build,deploy,run,undeploy"/>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/build.properties
index f247902..70819cb 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/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="ejb-ejb30-hello-session"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="Client"/>
+<property name="test.client"\u0020
+ value="Client"/>
<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/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/build.xml
index 831df3d..e54efeb 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/build.xml
@@ -44,7 +44,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,14 +56,14 @@
<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 name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-pe"/>
<antcall target="deploy-ee"/>
@@ -71,7 +71,7 @@
<target name="deploy-pe" depends="init-common" unless="ee">
<antcall target="deploy-common"/>
- <echo message="Restarting domain on PE/EE DAS after deployment"/>
+ <echo message="Restarting domain on PE/EE DAS after deployment"/>
<antcall target="restart-server-instance-common"/>
</target>
@@ -84,10 +84,10 @@
</target>
<target name="run-test" depends="build,deploy,run,undeploy"/>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/client/Client.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/client/Client.java
index dba3770..6e8b73f 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/hello/session/client/Client.java
@@ -24,7 +24,7 @@
public class Client {
- private static SimpleReporterAdapter stat =
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main (String[] args) {
@@ -33,11 +33,11 @@
Client client = new Client(args);
client.doTest();
stat.printSummary("ejb-ejb30-hello-sessionID");
- }
-
+ }
+
public Client (String[] args) {
}
-
+
private static @EJB Sful sful;
private static @EJB Sless sless;
@@ -59,8 +59,8 @@
e.printStackTrace();
stat.addStatus("local main" , stat.FAIL);
}
-
- return;
+
+ return;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/build-ng.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/build-ng.xml
index f1d564b..ef4b228 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/build-ng.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/build-ng.xml
@@ -42,7 +42,7 @@
<antcall target="create-jdbc-resource-common"/>
<antcall target="create-jdbc-connpool-common">
- <param name="jdbc.conpool.name" value="ejb30-pool-1"/>
+ <param name="jdbc.conpool.name" value="ejb30-pool-1"/>
</antcall>
<antcall target="create-jdbc-resource-common">
@@ -69,7 +69,7 @@
<property name="ejb.jar" value="${assemble.dir}/${appname}-persistence.par"/>
<antcall target="compile-common">
<param name="src" value="ejb"/>
- </antcall>
+ </antcall>
<mkdir dir="${assemble.dir}"/>
<delete file="${ejb.jar}" failonerror="false"/>
@@ -77,7 +77,7 @@
<mkdir dir="${build.classes.dir}/META-INF"/>
<!-- optional files -->
- <copy file="${persistence.xml}"
+ <copy file="${persistence.xml}"
tofile="${build.classes.dir}/META-INF/persistence.xml"
failonerror="false"/>
@@ -91,17 +91,17 @@
</jar>
<delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
- </target>
+ </target>
- <target name="build" depends="init-common,clean">
+ <target name="build" depends="init-common,clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
- </antcall>
+ </antcall>
<antcall target="compile-common">
<param name="src" value="testng-client"/>
</antcall>
-
+
<!--<antcall target="build-entity"/>-->
<antcall target="build-ear-common"/>
</target>
@@ -128,7 +128,7 @@
</antcall>
<antcall target="delete-jdbc-connpool-common">
<param name="jdbc.conpool.name" value="ejb30-pool-1"/>
- </antcall>
- </target>
-
+ </antcall>
+ </target>
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/build.properties
index 9647927..1e6d9e1 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/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="persistence-onetomany"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="application.xml" value="descriptor/application.xml"/>
<property name="persistence.xml" value="descriptor/persistence.xml"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/build.xml
index 6479949..294d735 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/build.xml
@@ -42,7 +42,7 @@
<antcall target="create-jdbc-resource-common"/>
<antcall target="create-jdbc-connpool-common">
- <param name="jdbc.conpool.name" value="ejb30-pool-1"/>
+ <param name="jdbc.conpool.name" value="ejb30-pool-1"/>
</antcall>
<antcall target="create-jdbc-resource-common">
@@ -69,7 +69,7 @@
<property name="ejb.jar" value="${assemble.dir}/${appname}-persistence.par"/>
<antcall target="compile-common">
<param name="src" value="ejb"/>
- </antcall>
+ </antcall>
<mkdir dir="${assemble.dir}"/>
<delete file="${ejb.jar}" failonerror="false"/>
@@ -77,7 +77,7 @@
<mkdir dir="${build.classes.dir}/META-INF"/>
<!-- optional files -->
- <copy file="${persistence.xml}"
+ <copy file="${persistence.xml}"
tofile="${build.classes.dir}/META-INF/persistence.xml"
failonerror="false"/>
@@ -91,25 +91,25 @@
</jar>
<delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
- </target>
+ </target>
- <target name="build" depends="init-common,clean">
+ <target name="build" depends="init-common,clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
- </antcall>
+ </antcall>
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
-
+
<!--<antcall target="build-entity"/>-->
<antcall target="build-ear-common"/>
</target>
-
+
<target name="run" depends="init-common">
- <antcall target="runclient-common">
+ <antcall target="runclient-common">
<param name="appclient.application.args" value="${testsuite.id} "/>
- </antcall>
+ </antcall>
</target>
@@ -118,23 +118,23 @@
<param name="sql.file" value="sql/create_${db.type}.sql"/>
</antcall>
</target>
-
+
<target name="drop" depends="init-common">
- <antcall target="execute-sql-common">
- <param name="sql.file" value="sql/drop_${db.type}.sql"/>
- </antcall>
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/drop_${db.type}.sql"/>
+ </antcall>
</target>
<target name="unsetup" depends="init-common">
<antcall target="drop"/>
- <antcall target="undeploy-jdbc-common"/>
+ <antcall target="undeploy-jdbc-common"/>
<antcall target="delete-jdbc-connpool-common">
<param name="jdbc.conpool.name" value="ejb30-pool-1"/>
- </antcall>
+ </antcall>
<antcall target="delete-jdbc-resource-common">
<param name="jdbc.conpool.name" value="ejb30-pool-1"/>
<param name="jdbc.resource.name" value="jdbc/sqetestDB"/>
</antcall>
- </target>
-
+ </target>
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/buildJava2DB.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/buildJava2DB.properties
index ae405e0..8306362 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/buildJava2DB.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/buildJava2DB.properties
@@ -15,7 +15,7 @@
#
<property name="module" value="persistence-onetomany"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="application.xml" value="descriptor/application.xml"/>
<property name="persistence.xml" value="descriptor/persistence_j2db.xml"/>
<property name="app.type" value="application"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/buildJava2DB.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/buildJava2DB.xml
index d5326e5..a46fec8 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/buildJava2DB.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/buildJava2DB.xml
@@ -58,7 +58,7 @@
<property name="ejb.jar" value="${assemble.dir}/${appname}-persistence.par"/>
<antcall target="compile-common">
<param name="src" value="ejb"/>
- </antcall>
+ </antcall>
<mkdir dir="${assemble.dir}"/>
<delete file="${ejb.jar}" failonerror="false"/>
@@ -66,7 +66,7 @@
<mkdir dir="${build.classes.dir}/META-INF"/>
<!-- optional files -->
- <copy file="${persistence.xml}"
+ <copy file="${persistence.xml}"
tofile="${build.classes.dir}/META-INF/persistence.xml"
failonerror="false"/>
@@ -80,23 +80,23 @@
</jar>
<delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
- </target>
+ </target>
- <target name="build" depends="init-common,clean">
+ <target name="build" depends="init-common,clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
- </antcall>
+ </antcall>
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
-
+
<!--<antcall target="build-entity"/>-->
<antcall target="build-ear-common"/>
</target>
<target name="run" depends="init-common">
- <antcall target="runclient-common">
+ <antcall target="runclient-common">
<param name="appclient.application.args" value="${testsuite.id} "/>
</antcall>
</target>
@@ -104,7 +104,7 @@
<target name="unsetup" depends="init-common">
<antcall target="delete-jdbc-resource-common"/>
<antcall target="delete-jdbc-connpool-common"/>
- </target>
+ </target>
<target name="create-resource-ref" depends="init-common">
@@ -116,5 +116,5 @@
</exec>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/client/Client.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/client/Client.java
index d8c3332..85a6b64 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/client/Client.java
@@ -25,7 +25,7 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
public class Client {
-
+
private static @EJB StatelessInterface sless;
List rows;
Iterator i;
@@ -34,11 +34,11 @@
new SimpleReporterAdapter("appserv-tests");
public static String testSuiteID;
-
+
public static void main(String[] args) {
-
+
if(args.length==1) {
- testSuiteID=args[0];
+ testSuiteID=args[0];
}
System.out.println("The TestSuite ID : " + testSuiteID);
System.out.println("The args length is : " + args.length);
@@ -47,9 +47,9 @@
client.doTest();
stat.printSummary("ejb3_slsb_persistenceID");
}
-
+
public Client(String[] args) {}
-
+
public void doTest() {
try{
@@ -69,11 +69,11 @@
System.out.println("Client: getting customer orders");
Collection c = sless.getCustomerOrders(1);
if(c==null){
- stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getCustomerOrders:relationshipTest",
+ stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getCustomerOrders:relationshipTest",
stat.FAIL);
System.out.println("Client: got NULL Orders");
} else {
- stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getCustomerOrders:relationshipTest",
+ stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getCustomerOrders:relationshipTest",
stat.PASS);
System.out.println("Client: got Orders of class:"+c.getClass().getName());
i=c.iterator();
@@ -91,7 +91,7 @@
rows=sless.getCustomers("Alice", "Santa Clara");
if(rows == null){
stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getCustomers", stat.FAIL);
- } else {
+ } else {
stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getCustomers", stat.PASS);
System.out.println("Client: Got Rows. Listing...");
i=rows.iterator();
@@ -109,7 +109,7 @@
rows=sless.getAllCustomers();
if(rows == null){
stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getAllCustomers", stat.FAIL);
- } else {
+ } else {
stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getAllCustomers", stat.PASS);
System.out.println("Client: Got allCustomer rows. Listing...");
i=rows.iterator();
@@ -127,7 +127,7 @@
rows=sless.getAllItemsByName();
if(rows == null){
stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getAllItemsByName", stat.FAIL);
- } else {
+ } else {
stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getAllItemsByName", stat.PASS);
System.out.println("Client: Got allItemsByName rows. Listing...");
i=rows.iterator();
@@ -144,10 +144,10 @@
//--getAllOrdersByItem test
rows=sless.getAllItemsByName();
if(rows == null){
- stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getAllOrdersByItem",
+ stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getAllOrdersByItem",
stat.FAIL);
- } else {
- stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getAllOrdersByItem",
+ } else {
+ stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence getAllOrdersByItem",
stat.PASS);
System.out.println("Client: Got AllOrdersByItem rows. Listing...");
i=rows.iterator();
@@ -181,5 +181,5 @@
stat.addStatus(testSuiteID+""+"ejb3_slsb_persistence ALLTESTS", stat.FAIL);
}
return;
- }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/descriptor/persistence.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/descriptor/persistence.xml
index 7ccdc0d..a17c369 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/descriptor/persistence.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/descriptor/persistence.xml
@@ -18,9 +18,9 @@
-->
<persistence
- xmlns="http://java.sun.com/xml/ns/persistence"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence.xsd"
- version="1.0">
+ xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence.xsd"
+ version="1.0">
<persistence-unit name="em">
<description>Persistence Unit for one to many QL Tests</description>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/descriptor/persistence_j2db.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/descriptor/persistence_j2db.xml
index 474b929..4088bcf 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/descriptor/persistence_j2db.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/descriptor/persistence_j2db.xml
@@ -18,16 +18,16 @@
-->
<persistence
- xmlns="http://java.sun.com/xml/ns/persistence"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence.xsd"
- version="1.0">
+ xmlns="http://java.sun.com/xml/ns/persistence"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence persistence.xsd"
+ version="1.0">
<persistence-unit name="em">
<description>Persistence Unit for one to many QL Tests</description>
<jta-data-source>jdbc/s1qeDB</jta-data-source>
<properties>
- <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
- <property name="toplink.create-ddl-jdbc-file-name" value="create_ddl.jdbc"/>
- <property name="toplink.drop-ddl-jdbc-file-name" value="drop_ddl.jdbc"/>
+ <property name="toplink.ddl-generation" value="drop-and-create-tables"/>
+ <property name="toplink.create-ddl-jdbc-file-name" value="create_ddl.jdbc"/>
+ <property name="toplink.drop-ddl-jdbc-file-name" value="drop_ddl.jdbc"/>
</properties>
</persistence-unit>
</persistence>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/CustomerEntity.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/CustomerEntity.java
index c175b13..4cb15f7 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/CustomerEntity.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/CustomerEntity.java
@@ -24,28 +24,28 @@
@NamedQueries({
@NamedQuery( name="findAllCustomersWithLike",
- query="SELECT OBJECT(thecust) FROM CustomerEntity thecust where thecust.name LIKE :name and thecust.city LIKE :city"),
+ query="SELECT OBJECT(thecust) FROM CustomerEntity thecust where thecust.name LIKE :name and thecust.city LIKE :city"),
@NamedQuery( name="findAllCustomers",
- query="SELECT OBJECT(thecust) FROM CustomerEntity thecust")
+ query="SELECT OBJECT(thecust) FROM CustomerEntity thecust")
})
public class CustomerEntity implements java.io.Serializable{
- private Integer customerId;
- private int version;
- private String city;
- private String name;
- private Collection<OrderEntity> orders;
+ private Integer customerId;
+ private int version;
+ private String city;
+ private String name;
+ private Collection<OrderEntity> orders;
public CustomerEntity(){}
- public CustomerEntity(int id,String name,String city) {
+ public CustomerEntity(int id,String name,String city) {
this.setCustomerId(new Integer(id));
this.setName(name);
this.setCity(city);
- }
+ }
- @Id
- @Column(name="CUST_ID")
+ @Id
+ @Column(name="CUST_ID")
public Integer getCustomerId() {
return customerId;
}
@@ -54,18 +54,18 @@
this.customerId = id;
}
- @Version
- @Column(name="CUST_VERSION")
- public int getVersion() {
+ @Version
+ @Column(name="CUST_VERSION")
+ public int getVersion() {
return version;
}
- protected void setVersion(int version) {
- this.version = version;
- }
+ protected void setVersion(int version) {
+ this.version = version;
+ }
- @Column(name="CITY")
- public String getCity() {
+ @Column(name="CITY")
+ public String getCity() {
return city;
}
@@ -74,7 +74,7 @@
}
- @Column(name="NAME")
+ @Column(name="NAME")
public String getName() {
return name;
}
@@ -83,8 +83,8 @@
this.name = aName;
}
- @OneToMany(cascade=CascadeType.ALL,mappedBy="customer")
-// @JoinColumn(name="CUST_ID", referencedColumnName="CUST_ID")
+ @OneToMany(cascade=CascadeType.ALL,mappedBy="customer")
+// @JoinColumn(name="CUST_ID", referencedColumnName="CUST_ID")
public Collection<OrderEntity> getOrders() {
System.out.println("CustomerEntity:getOrders");
return orders;
@@ -98,7 +98,7 @@
public void addOrder(OrderEntity anOrder) {
System.out.println("CustomerEntity: adding order");
getOrders().add(anOrder);
- anOrder.setCustomer(this);
+ anOrder.setCustomer(this);
}
public void removeOrder(OrderEntity anOrder) {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/ItemEntity.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/ItemEntity.java
index 081185c..0f041a0 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/ItemEntity.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/ItemEntity.java
@@ -21,7 +21,7 @@
@Entity
@Table(name = "CMP3_ITEM")
@NamedQuery(name = "findAllItemsByName", query =
- "SELECT OBJECT(item) FROM ItemEntity item WHERE item.name = ?1")
+ "SELECT OBJECT(item) FROM ItemEntity item WHERE item.name = ?1")
public class ItemEntity implements java.io.Serializable {
private Integer itemId;
@@ -46,7 +46,7 @@
this.itemId = id;
}
- @Version@Column(name = "ITEM_VERSION")
+ @Version@Column(name = "ITEM_VERSION")
protected int getVersion() {
return version;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/OrderEntity.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/OrderEntity.java
index 7275e12..3ff3898 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/OrderEntity.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/OrderEntity.java
@@ -21,82 +21,82 @@
@Entity(name="OrderBean")
@Table(name="CMP3_ORDER")
@NamedQuery(
- name="findAllOrdersByItem",
- query="SELECT OBJECT(theorder) FROM OrderBean theorder WHERE theorder.item.itemId = :id"
+ name="findAllOrdersByItem",
+ query="SELECT OBJECT(theorder) FROM OrderBean theorder WHERE theorder.item.itemId = :id"
)
public class OrderEntity implements java.io.Serializable {
- private Integer orderId;
- private int version;
- private ItemEntity item;
- private int quantity;
- private String shippingAddress;
- private CustomerEntity customer;
+ private Integer orderId;
+ private int version;
+ private ItemEntity item;
+ private int quantity;
+ private String shippingAddress;
+ private CustomerEntity customer;
public OrderEntity(){}
-
- public OrderEntity(int id,int qty) {
+
+ public OrderEntity(int id,int qty) {
this.setOrderId(new Integer(id));
this.setQuantity(qty);
- }
-
- @Id
- @Column(name="ORDER_ID")
- public Integer getOrderId() {
- return orderId;
- }
-
- public void setOrderId(Integer id) {
- this.orderId = id;
}
- @Version
- @Column(name="ORDER_VERSION")
- protected int getVersion() {
- return version;
- }
-
- protected void setVersion(int version) {
- this.version = version;
+ @Id
+ @Column(name="ORDER_ID")
+ public Integer getOrderId() {
+ return orderId;
}
- @OneToOne(cascade=CascadeType.ALL)
- @JoinColumn(name="ITEM_ID", referencedColumnName="ITEM_ID")
- public ItemEntity getItem() {
- return item;
+ public void setOrderId(Integer id) {
+ this.orderId = id;
}
-
- public void setItem(ItemEntity item) {
- this.item = item;
+
+ @Version
+ @Column(name="ORDER_VERSION")
+ protected int getVersion() {
+ return version;
+ }
+
+ protected void setVersion(int version) {
+ this.version = version;
+ }
+
+ @OneToOne(cascade=CascadeType.ALL)
+ @JoinColumn(name="ITEM_ID", referencedColumnName="ITEM_ID")
+ public ItemEntity getItem() {
+ return item;
+ }
+
+ public void setItem(ItemEntity item) {
+ this.item = item;
}
@Column(name="QTY")
- public int getQuantity() {
- return quantity;
+ public int getQuantity() {
+ return quantity;
}
-
- public void setQuantity(int quantity) {
- this.quantity = quantity;
- }
- @Column(name="SHIPADD")
- public String getShippingAddress() {
- return shippingAddress;
+ public void setQuantity(int quantity) {
+ this.quantity = quantity;
}
-
- public void setShippingAddress(String shippingAddress) {
- this.shippingAddress = shippingAddress;
- }
- @ManyToOne()
- @JoinColumn(name="CUST_ID")
- public CustomerEntity getCustomer() {
- return customer;
+ @Column(name="SHIPADD")
+ public String getShippingAddress() {
+ return shippingAddress;
}
-
- public void setCustomer(CustomerEntity customer) {
- this.customer = customer;
+
+ public void setShippingAddress(String shippingAddress) {
+ this.shippingAddress = shippingAddress;
+ }
+
+ @ManyToOne()
+ @JoinColumn(name="CUST_ID")
+ public CustomerEntity getCustomer() {
+ return customer;
+ }
+
+ public void setCustomer(CustomerEntity customer) {
+ this.customer = customer;
}
public String toString(){
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/StatelessBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/StatelessBean.java
index 54468fd..5e2998d 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/StatelessBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/ejb30/persistence/onetomany/ejb/StatelessBean.java
@@ -25,7 +25,7 @@
import java.util.*;
@Stateless
-@Remote({StatelessInterface.class})
+@Remote({StatelessInterface.class})
public class StatelessBean implements StatelessInterface {
@Resource SessionContext sc;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/build.xml
index 86e1c13..451722f 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/build.xml
@@ -82,16 +82,16 @@
</target>
<target name="usage">
- <echo> Usage:
- ant simple (Executes the simple tests)
- ant all (Executes all the ejb mdb tests)
- ant clean (cleans all the ejb mdb tests)
- ant build (builds all the ejb mdb tests)
- ant setup (sets up all resources for mdb tests)
- ant deploy (deploys all the ejb mdb apps)
- ant run (Executes all the ejb mdb tests)
- ant undeploy (undeploys all the mdb apps)
- ant unsetup (unsets all resources for mdb tests)
- </echo>
+ <echo> Usage:
+ ant simple (Executes the simple tests)
+ ant all (Executes all the ejb mdb tests)
+ ant clean (cleans all the ejb mdb tests)
+ ant build (builds all the ejb mdb tests)
+ ant setup (sets up all resources for mdb tests)
+ ant deploy (deploys all the ejb mdb apps)
+ ant run (Executes all the ejb mdb tests)
+ ant undeploy (undeploys all the mdb apps)
+ ant unsetup (unsets all resources for mdb tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/build-ng.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/build-ng.xml
index 7bb4382..53e98ab 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/build-ng.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/build-ng.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,13 +47,13 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/*Bean*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/*Client*.class" />
</antcall>
- </target>
-
+ </target>
+
<target name="setup" depends="init-common">
<antcall target="deploy-jms-common">
<param name="dest.name" value="SampleQueue"/>
@@ -76,17 +76,17 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<exec executable="${APPCLIENT}" failonerror="false">
<arg line="-client ${assemble.dir}/${appname}AppClient.jar" />
<env key="APPCPATH" path="${env.APS_HOME}/lib/testng.jar"/>
</exec>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="unsetup" depends="init-common">
<antcall target="undeploy-jms-common">
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/build.properties
index 4b0b897..d66eb2a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/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="ejb-mdb"/>
-<property name="appname" value="${module}-simple"/>
+<property name="appname" value="${module}-simple"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.s1peqe.ejb.mdb.simple.client.SimpleMessageClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.ejb.mdb.simple.client.SimpleMessageClient"/>
<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/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/build.xml
index 59a2c5f..fd0bdb1 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/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,13 +47,13 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/*Bean*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/*Client*.class" />
</antcall>
- </target>
-
+ </target>
+
<target name="setup" depends="init-common">
<antcall target="deploy-jms-common">
<param name="dest.name" value="SampleQueue"/>
@@ -76,14 +76,14 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<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="undeploy-jms-common">
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/client/SimpleMessageClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/client/SimpleMessageClient.java
index 7482436..40307b0 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/client/SimpleMessageClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/client/SimpleMessageClient.java
@@ -21,7 +21,7 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
public class SimpleMessageClient {
-
+
Context jndiContext = null;
QueueConnectionFactory queueConnectionFactory = null;
TopicConnectionFactory topicConnectionFactory = null;
@@ -40,48 +40,48 @@
public static final String TOPIC = "jms/SampleTopic";
final int NUM_MSGS = 3;
private static boolean allDone=false;
-
- private static SimpleReporterAdapter stat =
+
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
-
+
public static void main(String[] args) {
-
+
stat.addDescription("This is to test simple "+
"message driven bean sample.");
SimpleMessageClient client=new SimpleMessageClient();
client.setup();
client.sendMessageToMDB();
client.recvMessage();
- client.printReport();
-
+ client.printReport();
+
}
-
- public Object jndiLookup(String name)
+
+ public Object jndiLookup(String name)
throws NamingException {
Object obj = null;
if (jndiContext == null) {
try {
- jndiContext = new InitialContext();
+ jndiContext = new InitialContext();
} catch (NamingException e) {
System.err.println("Could not create JNDI API " +
- "context: " + e.toString());
+ "context: " + e.toString());
throw e;
}
}
try {
obj = jndiContext.lookup(name);
- } catch (NamingException e) {
- System.err.println("JNDI API lookup failed: " +
+ } catch (NamingException e) {
+ System.err.println("JNDI API lookup failed: " +
e.toString());
throw e;
}
return obj;
}
-
+
public void setup(){
try{
- queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
- queue = (Queue)jndiLookup(QUEUE);
+ queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
+ queue = (Queue)jndiLookup(QUEUE);
topicConnectionFactory=(TopicConnectionFactory)jndiLookup(TOPICCONFAC);
topic=(Topic)jndiLookup(TOPIC);
stat.addStatus("simple mdb jndiLookup", stat.PASS);
@@ -91,21 +91,21 @@
System.out.println("Problem in looking up connection factories");
e.printStackTrace();
}
-
- }
-
-
-
+ }
+
+
+
+
public SimpleMessageClient(){}
-
-
+
+
public void sendMessageToMDB(){
try {
- queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
-
- queue = (Queue)jndiLookup(QUEUE);
-
+ queueConnectionFactory=(QueueConnectionFactory)jndiLookup(QUEUECONFAC);
+
+ queue = (Queue)jndiLookup(QUEUE);
+
queueConnection =
queueConnectionFactory.createQueueConnection();
@@ -117,42 +117,42 @@
message.setJMSDeliveryMode(DeliveryMode.PERSISTENT);
//System.out.println("Created durable queue subscriber,persistent delivery mode");
- for (int i = 0; i < NUM_MSGS; i++) {
+ for (int i = 0; i < NUM_MSGS; i++) {
message.setText(MSG_TEXT + (i + 1));
if(i==(NUM_MSGS-1))
message.setStringProperty("MESSAGE_NUM","LAST");
System.out.println("Sending message: " + message.getText());
- queueSender.send(message);
+ queueSender.send(message);
Thread.sleep(1000);
}
- System.out.println("Sent 3 messages,now sleeping");
+ System.out.println("Sent 3 messages,now sleeping");
} catch (Throwable e) {
System.out.println("Exception occurred: " + e.toString());
stat.addStatus("simple mdb main", stat.FAIL);
} finally {
System.out.println("In finally block of send message");
- if (queueConnection !=null){
- try{
- queueConnection.close();
- }catch(JMSException ex){
- ex.printStackTrace();
- }
- }
-
- stat.addStatus("simple mdb sendmessage", stat.PASS);
+ if (queueConnection !=null){
+ try{
+ queueConnection.close();
+ }catch(JMSException ex){
+ ex.printStackTrace();
+ }
+ }
+
+ stat.addStatus("simple mdb sendmessage", stat.PASS);
} // finally
- }
-
+ }
+
public static void printReport(){
if(allDone)
- stat.printSummary("simpleMdbID");
+ stat.printSummary("simpleMdbID");
else
System.out.println("MessageStream from server not finished");
- }
-
-
-
-
+ }
+
+
+
+
public void recvMessage(){
TopicConnection connect=null;
/*
@@ -166,15 +166,15 @@
* Close connection.
*/
System.out.println("********************************");
- System.out.println("inside recvMessage of mdb appclient");
+ System.out.println("inside recvMessage of mdb appclient");
try {
connect = topicConnectionFactory.createTopicConnection();
TopicSession session = connect.createTopicSession(false,0);
- subscriber=session.createSubscriber(topic);
+ subscriber=session.createSubscriber(topic);
System.out.println("Started subscriber");
connect.start();
int msgcount=1;
- while (true) {
+ while (true) {
Message m = subscriber.receive(10000);
System.out.println("Bingo!. got a ack msg back from server");
msgcount++;
@@ -187,7 +187,7 @@
String props=message.getStringProperty("MESSAGE_NUM");
} else {
break;
-
+
}
}
if(msgcount>=3){
@@ -200,7 +200,7 @@
System.out.println("Messages from MDB finished**");
System.out.println("******************");
} catch (JMSException e) {
- System.out.println("Exception occurred: " +
+ System.out.println("Exception occurred: " +
e.toString());
stat.addStatus("simple mdb recvmessage", stat.FAIL);
} catch(Throwable e){
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/ejb/SimpleMessageBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/ejb/SimpleMessageBean.java
index 49924a4..0c8033d 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/ejb/SimpleMessageBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/ejb/SimpleMessageBean.java
@@ -34,23 +34,23 @@
public static final String TOPICCONFAC = "jms/TCFactory";
public SimpleMessageBean() {
beancount++;
- System.out.println("MESSAGE BEAN:["+beancount+"].SimpleMessageBean()");
+ System.out.println("MESSAGE BEAN:["+beancount+"].SimpleMessageBean()");
}
public void setMessageDrivenContext(MessageDrivenContext mdc) {
System.out.println("In "
+ "MESSAGE BEAN:["+beancount+"].setMessageDrivenContext()");
- this.mdc = mdc;
+ this.mdc = mdc;
try {
jndiContext=new javax.naming.InitialContext();
}catch(Throwable e) {
-
+
System.out.println(e.toString());
}
}
public void ejbCreate() {
- System.out.println("MESSAGE BEAN: SimpleMessageBean.ejbCreate()");
+ System.out.println("MESSAGE BEAN: SimpleMessageBean.ejbCreate()");
}
public void onMessage(Message inMessage) {
@@ -72,32 +72,32 @@
te.printStackTrace();
}
} // onMessage
-
+
public void sendMessage(Message message) {
- System.out.println("MESSAGE BEAN: sendMessage back to appclient");
+ System.out.println("MESSAGE BEAN: sendMessage back to appclient");
try{
-
+
TopicConnectionFactory topicfactory=(TopicConnectionFactory)jndiContext.lookup(TOPICCONFAC);
- Topic topic=(Topic)jndiContext.lookup("java:comp/env/jms/SampleTopic");
-
- TopicConnection
-
+ Topic topic=(Topic)jndiContext.lookup("java:comp/env/jms/SampleTopic");
+
+ TopicConnection
+
connect = topicfactory.createTopicConnection();
-
+
TopicSession session = connect.createTopicSession(false,0);
-
+
TopicPublisher publisher=session.createPublisher(topic);
Thread.sleep(3000);
- publisher.publish(message);
+ publisher.publish(message);
System.out.println("<<Sent Message back to appclient >>");
-
+
}catch(Throwable e) {
System.out.println("!!!!MESSAGE BEAN: sendMessage Exception");
e.printStackTrace();
}
- }
-
-
+ }
+
+
public void ejbRemove() {
System.out.println("In SimpleMessageBean.remove()");
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/testng-client/SimpleMessageClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/testng-client/SimpleMessageClient.java
index 3e4bfa5..1a14efa 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/testng-client/SimpleMessageClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/mdb/simple/testng-client/SimpleMessageClient.java
@@ -79,7 +79,7 @@
Thread.sleep(100);
}
} finally {
- if (queueSession !=null)
+ if (queueSession !=null)
try {
queueSession.close();
} catch(JMSException ex) { }
@@ -99,7 +99,7 @@
TextMessage message = null;
- System.out.println("inside recvMessage of mdb appclient");
+ System.out.println("inside recvMessage of mdb appclient");
try {
connect = tcf.createTopicConnection();
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/build.xml
index b041483..902daa8 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/build.xml
@@ -93,17 +93,17 @@
</target>
<target name="usage">
- <echo>
- Usage:
- ant persistence (Executes the persistence tests)
- ant all (Executes all the ejb session stateful tests)
- ant clean (cleans all the ejb session stateful tests)
- ant build (builds all the ejb session stateful tests)
- ant setup (sets up resources for all the ejb session stateful tests)
- ant deploy (deploys all the ejb session stateful apps)
- ant run (Executes all the ejb session stateful tests)
- ant undeploy (undeploys all the ejb session stateful apps)
- ant unsetup (unsets all resources the ejb session stateful tests)
- </echo>
+ <echo>
+ Usage:
+ ant persistence (Executes the persistence tests)
+ ant all (Executes all the ejb session stateful tests)
+ ant clean (cleans all the ejb session stateful tests)
+ ant build (builds all the ejb session stateful tests)
+ ant setup (sets up resources for all the ejb session stateful tests)
+ ant deploy (deploys all the ejb session stateful apps)
+ ant run (Executes all the ejb session stateful tests)
+ ant undeploy (undeploys all the ejb session stateful apps)
+ ant unsetup (unsets all resources the ejb session stateful tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/build.properties
index a86bb34..1d2af14 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/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"/>
-<property name="appname" value="${module}-sfsblifecyle"/>
+<property name="appname" value="${module}-sfsblifecyle"/> \u0020
<property name="application.xml" value="descriptor/application.xml"/>
<property name="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.xml"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/build.xml
index 38cb89f..fc8123b 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/build.xml
@@ -37,23 +37,23 @@
<delete dir="${assemble.dir}"/>
</target>
-<target name="compile" depends="clean">
+<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="util"/>
</antcall>
<antcall target="compile-common">
<param name="src" value="ejb/stateful"/>
</antcall>
-
-
+
+
<antcall target="compile-common">
<param name="src" value="client"/>
</antcall>
-</target>
+</target>
-<target name="build" depends="compile">
-<antcall target="build-ear-common"/>
-</target>
+<target name="build" depends="compile">
+<antcall target="build-ear-common"/>
+</target>
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
@@ -62,11 +62,11 @@
<target name="setup" depends="init-common">
-
+
</target>
<target name="run" depends="init-common">
- <antcall target="runclient-common">
+ <antcall target="runclient-common">
<param name="appclient.application.args" value="${testsuite.id} 1 all "/>
</antcall>
</target>
@@ -80,19 +80,19 @@
<antcall target="usage-common"/>
</target>
-<target name="unsetup" depends="init-common">
+<target name="unsetup" depends="init-common">
-</target>
-
+</target>
+
<target name="standalone-client" depends="init-common">
<delete dir="${build.classes.dir}/ejb/stateful/passivate/standalone" failonerror="false"/>
<echo message="assemble.dir is ${assemble.dir}"/>
<antcall target="compile-common">
<param name="src" value="standalone"/>
</antcall>
- <java classname="ejb.stateful.passivate.standalone.StandaloneClient" fork="yes">
- <arg line="${admin.host} ${orb.port} beforerestart"/>
- <classpath>
+ <java classname="ejb.stateful.passivate.standalone.StandaloneClient" fork="yes">
+ <arg line="${admin.host} ${orb.port} beforerestart"/>
+ <classpath>
<pathelement location="${assemble.dir}/ejb-sfsblifecycleAppClient.jar"/>
<fileset dir="${env.S1AS_HOME}/lib">
<include name="**/*.jar"/>
@@ -100,21 +100,21 @@
<fileset dir="${assemble.dir}">
<include name="**/*.jar"/>
</fileset>
- <pathelement location="${env.SPS_HOME}/pe/lib/reporter.jar"/>
- <pathelement location="${build.classes.dir}"/>
+ <pathelement location="${env.SPS_HOME}/pe/lib/reporter.jar"/>
+ <pathelement location="${build.classes.dir}"/>
</classpath>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
<jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
</java>
-
+
</target>
-
+
<target name="STOP" depends="init-common">
<antcall target="stop-domain"/>
</target>
-
+
<target name="START" depends="init-common">
<antcall target="start-domain"/>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/client/SessionTestClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/client/SessionTestClient.java
index bfff181..8c74996 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/client/SessionTestClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/client/SessionTestClient.java
@@ -39,25 +39,25 @@
public class SessionTestClient {
private String testSuiteID="";
private SimpleReporterAdapter stat;
-
+
public Context initial;
public Object objref;
SessionRemoteHome home=null;
- SessionRemote remote=null;
-
+ SessionRemote remote=null;
+
boolean beanLocated=false;
String m_action="all";
int m_clients=1;
-
+
/** Creates a new instance of SessionTestClient */
public SessionTestClient(String ts_id,String numClients,String action) {
stat =new SimpleReporterAdapter("appserv-tests");
- stat.addDescription("This testsuites tests lifecycle of sfsb");
- testSuiteID=ts_id;
+ stat.addDescription("This testsuites tests lifecycle of sfsb");
+ testSuiteID=ts_id;
m_clients=new Integer(numClients).intValue();
m_action=action;
}
-
+
/**
* @param args the command line arguments
*/
@@ -71,9 +71,9 @@
Client.runStatefulTest();
}
else
- System.err.println("Test didn't run");
+ System.err.println("Test didn't run");
}
-
+
public boolean runSetup() {
System.out.println("Test Execution Starts---------->");
try{
@@ -89,26 +89,26 @@
beanLocated=false;
}
return beanLocated;
-
+
}
-
- public void runStatefulTest(){
+
+ public void runStatefulTest(){
SessionRemote[] remote=new SessionRemote[10];
/*
- *Due to performance reasons, beans are not immediately
+ *Due to performance reasons, beans are not immediately
passivated after they are identified as candidates for passivation.
- The container performs passivations in batches
+ The container performs passivations in batches
(that is after it accumulates some number of beans - which is set to 8 internally)
- *This is the reason why you do not see a passivation.
- If you had created more than 8 sessions then you would see the expected behaviour.
+ *This is the reason why you do not see a passivation.
+ If you had created more than 8 sessions then you would see the expected behaviour.
*hence number 10 is chosen.
*
**/
try {
for(int i=0;i<10;i++){
remote[i]=home.create("<"+i+">");
- }
-
+ }
+
System.out.println("Started transaction on Stateful Bean 5,\n shouldn't get passivated");
System.out.println(remote[5].txMethod());
System.out.println("Now going to sleep for 40 secs to passivate beans");
@@ -118,7 +118,7 @@
}catch(jakarta.ejb.CreateException e){
System.out.println("Error while creating beans");
e.printStackTrace();
- stat.addStatus(testSuiteID+" "+"10 SFSB Creation",stat.FAIL);
+ stat.addStatus(testSuiteID+" "+"10 SFSB Creation",stat.FAIL);
}catch(java.lang.InterruptedException e){
System.out.println("Error while sleeping");
e.printStackTrace();
@@ -127,16 +127,16 @@
e.printStackTrace();
stat.addStatus(testSuiteID+" "+"10 SFSB Creation",stat.FAIL);
}
- try{
+ try{
for(int i=0;i<10;i++){
System.out.println("......"+remote[i].getMessage());
remote[i].afterActivationBusinessMethod();
}
-
+
}catch(java.rmi.NoSuchObjectException e){
System.out.println("java.rmi.NoSuchObjectException");
System.out.println("Bean 9 removed");
-
+
e.getMessage();
}catch(java.rmi.RemoteException e){
System.out.println("unforseen circumstances");
@@ -144,10 +144,10 @@
}catch(Throwable e){
e.printStackTrace();
}
-
+
try{
HashMap finalResult=new HashMap();
- finalResult=remote[9].getEJBRecorder();
+ finalResult=remote[9].getEJBRecorder();
System.out.println("Result Map====="+finalResult.toString());
//i <9 instead of 10 as 9th bean is removed
for(int i=0;i<10;i++){
@@ -161,17 +161,17 @@
if(i==5){
if(activateresult.equalsIgnoreCase("false")){
System.out.println("Bean 5 expectedly fails activation");
-
+
}
}
}
-
+
// Test run is over,remove all SFSB after this(productization of test,returns server to clean state
//close all resources in SFSB remove methods
for(int i=0;i<10;i++){
try{
remote[i].remove();
-
+
}catch(jakarta.ejb.RemoveException e){
System.out.println("Error while removing :"+i+"SFSB");
if(i==5)
@@ -191,6 +191,6 @@
stat.addStatus(testSuiteID+" "+"SFSB_removal",stat.FAIL);
}
stat.printSummary();
- }
-
+ }
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/application-client.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/application-client.xml
index 9bd73de..0a91a41 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/application-client.xml
@@ -25,5 +25,5 @@
<ejb-ref-type>Session</ejb-ref-type>
<home>sqetests.ejb.stateful.passivate.ejb.stateful.SessionRemoteHome</home>
<remote>sqetests.ejb.stateful.passivate.ejb.stateful.SessionRemote</remote>
- </ejb-ref>
+ </ejb-ref>
</application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/ejb-jar.xml
index ce49a56..2d5de27 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/ejb-jar.xml
@@ -20,7 +20,7 @@
<ejb-jar>
<enterprise-beans>
- <session>
+ <session>
<display-name>SessionTest</display-name>
<ejb-name>SessionTest</ejb-name>
<home>sqetests.ejb.stateful.passivate.ejb.stateful.SessionRemoteHome</home>
@@ -28,7 +28,7 @@
<local-home>sqetests.ejb.stateful.passivate.ejb.stateful.SessionLocalHome</local-home>
<local>sqetests.ejb.stateful.passivate.ejb.stateful.SessionLocal</local>
<ejb-class>sqetests.ejb.stateful.passivate.ejb.stateful.SessionBean</ejb-class>
- <session-type>Stateful</session-type>
+ <session-type>Stateful</session-type>
<transaction-type>Bean</transaction-type>
<resource-ref>
<description> This is a textual description of the resource.</description>
@@ -36,8 +36,8 @@
<res-type>java.net.URL</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Sharable</res-sharing-scope>
- </resource-ref>
-
- </session>
+ </resource-ref>
+
+ </session>
</enterprise-beans>
</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/sun-application-client.xml
index a9ea43e..3336483 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/sun-application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/sun-application-client.xml
@@ -22,5 +22,5 @@
<ejb-ref>
<ejb-ref-name>ejb/SFSBSession</ejb-ref-name>
<jndi-name>MySessionTest</jndi-name>
- </ejb-ref>
+ </ejb-ref>
</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/sun-ejb-jar.xml
index ed5ea91..ad8c42b 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/descriptor/sun-ejb-jar.xml
@@ -22,37 +22,37 @@
<enterprise-beans>
<ejb>
<ejb-name>SessionTest</ejb-name>
- <jndi-name>MySessionTest</jndi-name>
+ <jndi-name>MySessionTest</jndi-name>
<resource-ref>
<res-ref-name>url/myURL</res-ref-name>
<jndi-name>http://jse.east.sun.com</jndi-name>
-</resource-ref>
- <pass-by-reference>false</pass-by-reference>
+</resource-ref>
+ <pass-by-reference>false</pass-by-reference>
<bean-cache>
<!--
- In case a stateful bean represents a user,
- a healthy max-cache-size of beans could be the expected number of concurrent
+ In case a stateful bean represents a user,
+ a healthy max-cache-size of beans could be the expected number of concurrent
users on the application server process
-->
<max-cache-size>1</max-cache-size>
<resize-quantity>0</resize-quantity>
- <!-- at periodic intervals of cache-idle-timeout-in-seconds,
- all the beans in the cache that have not been accessed for more than
+ <!-- at periodic intervals of cache-idle-timeout-in-seconds,
+ all the beans in the cache that have not been accessed for more than
cache-idle-timeout-in-seconds time, are passivated -->
- <cache-idle-timeout-in-seconds>3</cache-idle-timeout-in-seconds>
- <!-- the bean is removed after ithas not been accessed
+ <cache-idle-timeout-in-seconds>3</cache-idle-timeout-in-seconds>
+ <!-- the bean is removed after ithas not been accessed
for removal-timeout-in-seconds.A value of 0 specifies that the container
does not remove inactive beans automatically. The default value is 5400.
- If removal-timeout-in-seconds is less than or equal to cache-idle-timeout-in-seconds,
- beans are removed immediately without being passivated.
- -->
+ If removal-timeout-in-seconds is less than or equal to cache-idle-timeout-in-seconds,
+ beans are removed immediately without being passivated.
+ -->
<removal-timeout-in-seconds>1000000</removal-timeout-in-seconds>
<!--
Possible values are First In, First Out (FIFO), Least Recently Used (LRU), Not Recently Used (NRU). The default value is NRU, which is actually pseudo-LRU.
The victims are generally passivated into a backup store (typically a file system or database).
- This store is cleaned during startup, and also by a periodic background
- process that removes idle entries as specified by removal-timeout-in-seconds.
- The backup store is monitored by a background thread (or sweeper thread)
+ This store is cleaned during startup, and also by a periodic background
+ process that removes idle entries as specified by removal-timeout-in-seconds.
+ The backup store is monitored by a background thread (or sweeper thread)
to remove unwanted entries.
-->
<victim-selection-policy>LRU</victim-selection-policy>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionBean.java
index b9ccf46..e419a79 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionBean.java
@@ -71,10 +71,10 @@
* @see jakarta.ejb.SessionBean#ejbActivate()
*/
public void ejbActivate() {
- //key is method name and value is true/false
+ //key is method name and value is true/false
beanResult.put(new String("activate"),new Boolean(true));
- System.out.println("---------SFSB Bean "+message+" activated-------");
-
+ System.out.println("---------SFSB Bean "+message+" activated-------");
+
}
@@ -83,7 +83,7 @@
*/
public void ejbPassivate() {
- //key is method name and value is true/false
+ //key is method name and value is true/false
beanResult.put(new String("passivate"),new Boolean(true));
System.out.println("--------SFSB Bean " +message+" passivated--------");
@@ -104,22 +104,22 @@
* See section 7.10.3 of the EJB 2.0 specification
*/
public void ejbCreate() {
-
+
message = "Hello World From Stateful EJB";
}
public void ejbCreate(String initialMessage) throws jakarta.ejb.CreateException {
- try{
+ try{
beanResult.put(new String("passivate"),new Boolean(false));
beanResult.put(new String("activate"),new Boolean(false));
- message = initialMessage;
+ message = initialMessage;
setInstanceFields();
System.out.println("<STATEFUL>CREATE==========="+message+"==================");
- }catch(Exception e){
- throw new CreateException(e.getMessage());
- }
-
+ }catch(Exception e){
+ throw new CreateException(e.getMessage());
+ }
+
}
/**
@@ -138,7 +138,7 @@
}catch(Throwable e){
e.printStackTrace();
- throw new Exception(e.getMessage());
+ throw new Exception(e.getMessage());
}
}
@@ -147,7 +147,7 @@
throw new RuntimeException("<STATEFUL> ####Expected### Exception!!! Runtime exception");
}*/
public void badMethod(){
- System.out.println("modified method");
+ System.out.println("modified method");
}
public String getMessage() {
@@ -179,7 +179,7 @@
boolean retResult=true;
try{
int txStatus=userTx.getStatus();
- System.out.println("Tx Status"+txStatus);
+ System.out.println("Tx Status"+txStatus);
if (txStatus == jakarta.transaction.Status.STATUS_ACTIVE) {
System.out.println("committing tx that was left active");
userTx.commit();
@@ -189,30 +189,30 @@
}catch(Throwable e){
System.out.println("SFSB <"+message+">..Activation FAILED");
- e.printStackTrace();
+ e.printStackTrace();
retResult=false;
- }
+ }
return retResult;
}
-
+
/**
- *EJBRecorder is a Singleton class so we can't return it from SFSB.Appclient gets a
- * NPE.Instead, HashMap result is extracted and returned to calling client.This is
+ *EJBRecorder is a Singleton class so we can't return it from SFSB.Appclient gets a
+ * NPE.Instead, HashMap result is extracted and returned to calling client.This is
*SFSB independent (Any instance of SFSB returns same HashMap)
-
+
**/
public HashMap getEJBRecorder(){
if(ejbRecorder!=null){
//Now extract all bean results.
HashMap ejbRecorderResult=new HashMap();
- ejbRecorderResult=ejbRecorder.getAllBeanResults();
+ ejbRecorderResult=ejbRecorder.getAllBeanResults();
return ejbRecorderResult;
}
- else
+ else
return null;
}
-
-
+
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionLocal.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionLocal.java
index 999168b..9c6ecb4 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionLocal.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionLocal.java
@@ -25,6 +25,6 @@
*/
public interface SessionLocal extends jakarta.ejb.EJBLocalObject {
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionLocalHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionLocalHome.java
index 9ee4126..c10654c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionLocalHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionLocalHome.java
@@ -25,9 +25,9 @@
*/
public interface SessionLocalHome extends jakarta.ejb.EJBLocalHome {
-
+
public SessionLocal create() throws jakarta.ejb.CreateException;
-
+
public SessionLocal create(java.lang.String initialMessage) throws jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionRemote.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionRemote.java
index 48d9577..441bfb6 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionRemote.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionRemote.java
@@ -27,18 +27,18 @@
* @author dsingh
*/
-public interface SessionRemote extends jakarta.ejb.EJBObject {
-
- public void badMethod() throws RemoteException;
-
+public interface SessionRemote extends jakarta.ejb.EJBObject {
+
+ public void badMethod() throws RemoteException;
+
public String getMessage() throws RemoteException;
-
+
public String txMethod() throws RemoteException;
-
+
public boolean afterActivationBusinessMethod() throws RemoteException;
-
- public HashMap getEJBRecorder() throws RemoteException;
-
-
+
+ public HashMap getEJBRecorder() throws RemoteException;
+
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionRemoteHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionRemoteHome.java
index b1adecf..0bc7eb1 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionRemoteHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/ejb/stateful/SessionRemoteHome.java
@@ -25,10 +25,10 @@
*/
public interface SessionRemoteHome extends jakarta.ejb.EJBHome {
-
+
public SessionRemote create()
throws jakarta.ejb.CreateException, java.rmi.RemoteException;
-
+
public SessionRemote create(java.lang.String initialMessage) throws java.rmi.RemoteException, jakarta.ejb.CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/util/EJBRecorderHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/util/EJBRecorderHome.java
index 2749371..e8ba2af 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/util/EJBRecorderHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/passivate/util/EJBRecorderHome.java
@@ -42,7 +42,7 @@
/** Private constructor to make class Singleton*/
private EJBRecorderHome() {
System.out.println("EjbRecorderHome constructor");
-
+
}
/** Creates a new instance of EJBRecorderHome */
@@ -77,9 +77,9 @@
public void setBeanMap(String EJBName,HashMap map) {
m_bean=EJBName;
beanStatus.put(EJBName, map);
-
+
}
-
+
public HashMap getAllBeanResults(){
System.out.println("EJBRECORDER :Returning bean results..");
String keys=beanStatus.keySet().toString();
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/build.properties
index c83136a..1d240f2 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/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="ejb-stateful"/>
-<property name="assemble"
- value="${build.classes.dir}/archive"/>
+<property name="assemble"\u0020
+ 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="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="appname" value="${module}-persistence"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
-<property name="appclient.jar"
- value="${assemble.dir}/${appname}-client.jar"/>
+<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="appname" value="${module}-persistence"/> \u0020
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
+<property name="appclient.jar"\u0020
+ value="${assemble.dir}/${appname}-client.jar"/> \u0020
<property name="droptables.value" value="true"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/build.xml
index 514d943..0a6e211 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/build.xml
@@ -35,7 +35,7 @@
<target name="run-test" depends="clean,compile,build,deploy,run,undeploy"/>
<target name="clean" depends="init-common">
- <antcall target="clean-common" />
+ <antcall target="clean-common" />
</target>
<target name="compile" depends="clean">
@@ -47,28 +47,28 @@
</antcall>
<antcall target="compile-common">
<param name="src" value="client"/>
- </antcall>
+ </antcall>
</target>
<target name="build-ejb-jar" depends="init-common" >
<antcall target="ejb-jar-common" >
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Bean*.class,**/*.dbschema,**/*EJB*.class,**/TradeResult.class,**/ProcessingErrorException.class" />
</antcall>
</target>
<target name="build-appclient-ear" depends="init-common">
<antcall target="appclient-jar-common" >
- <param name="appclientjar.classes"
- value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Client*.class,**/TradeResult.class,**/ProcessingErrorException.class" />
+ <param name="appclientjar.classes"
+ value="**/*Local*.class,**/*Remote*.class,**/*Home*.class,**/*Client*.class,**/TradeResult.class,**/ProcessingErrorException.class" />
</antcall>
<antcall target="ear-common" />
</target>
-<!--
- Note: The order in which the build targets are called must be so
+<!--
+ Note: The order in which the build targets are called must be so
that the ear is created before the ejb jar.....
- else the ear will package the ejb jar with it
+ else the ear will package the ejb jar with it
-->
<target name="setup"/>
@@ -76,8 +76,8 @@
<target name="build" depends="init-common">
<antcall target="build-appclient-ear" />
- <antcall target="build-ejb-jar"/>
- </target>
+ <antcall target="build-ejb-jar"/>
+ </target>
<target name="deploy-ejb-jar" depends="init-common">
<antcall target="deploy-common">
@@ -91,22 +91,22 @@
</target>
<target name="copy-clientjar-restart-server" depends="init-common">
- <copy file="${assemble.dir}/${appname}AppClient.jar"
+ <copy file="${assemble.dir}/${appname}AppClient.jar"
todir="${admin.domain.dir}/domain1/server/lib" />
<antcall target="restart-server-instance-common" />
</target>
<target name="deploy" depends="init-common">
- <antcall target="deploy-ejb-jar" />
- <antcall target="deploy-appclient-ear" />
+ <antcall target="deploy-ejb-jar" />
+ <antcall target="deploy-appclient-ear" />
<!--
<antcall target="copy-clientjar-restart-server"/>
-->
</target>
<target name="run-acc" depends="init-common" >
- <antcall target="runclient-common"/>
+ <antcall target="runclient-common"/>
</target>
<target name="run-standalone" depends="init-common">
@@ -127,10 +127,10 @@
</target>
<target name="undeploy" depends="init-common">
- <antcall target="undeploy-common">
- <param name="deployedapp.name" value="${appname}-ejb"/>
- </antcall>
- </target>
+ <antcall target="undeploy-common">
+ <param name="deployedapp.name" value="${appname}-ejb"/>
+ </antcall>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/client/Client.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/client/Client.java
index 61c2b2e..d0c2938 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/client/Client.java
@@ -49,16 +49,16 @@
private String url;
private TraderHome home;
- private String testId = null;
+ private String testId = null;
public Client(String url)
throws NamingException {
-
+
this.url = url;
-
+
// home = lookupHome();
}
-
+
public Client () throws javax.naming.NamingException{
// home = lookupHome();
}
@@ -73,27 +73,27 @@
*/
public static void main(String[] args) {
log("\nBeginning statefulSession.Client...\n");
- try{
- Client client = new Client();
- client.run();
- }catch(NamingException ne){
- }
+ try{
+ Client client = new Client();
+ client.run();
+ }catch(NamingException ne){
+ }
}
- public void run(){
+ public void run(){
- testId = "stateful-persistence::Sample Standalone-ejb-jar";
- stat.addDescription("This is to test the persistence sample deploed as an standalone ejb-jar.");
+ testId = "stateful-persistence::Sample Standalone-ejb-jar";
+ stat.addDescription("This is to test the persistence sample deploed as an standalone ejb-jar.");
try {
- home = lookupHome();
+ home = lookupHome();
} catch (NamingException ne) {
- stat.addStatus(testId, stat.FAIL);
+ stat.addStatus(testId, stat.FAIL);
}
try {
example();
- stat.addStatus(testId, stat.PASS);
+ stat.addStatus(testId, stat.PASS);
} catch (Exception e) {
log("There was an exception while creating and using the Trader.");
log("This indicates that there was a problem communicating with the server: "+e);
@@ -111,7 +111,7 @@
public void example()
throws CreateException, RemoteException,RemoveException,ProcessingErrorException
{
- String customerName = "Matt";
+ String customerName = "Matt";
// Create a Trader
log("Creating trader\n");
@@ -157,7 +157,7 @@
Context ctx = null;
-
+
try {
// Initialize the Context with JNDI specific properties
ctx = new InitialContext();
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/application.xml
index cbd1cd3..59c369f 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/application.xml
@@ -19,7 +19,7 @@
-->
<application>
- <display-name>ConverterApp</display-name>
+ <display-name>ConverterApp</display-name>
<module>
<java>ejb-stateful-persistence-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/ejb-jar.xml
index 6a764f5..c8fae68 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/ejb-jar.xml
@@ -32,13 +32,13 @@
<transaction-type>Container</transaction-type>
<env-entry>
<env-entry-name>BEAS</env-entry-name>
- <env-entry-type>java.lang.Double </env-entry-type>
- <env-entry-value>100.0</env-entry-value>
+ <env-entry-type>java.lang.Double </env-entry-type>
+ <env-entry-value>100.0</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>MSFT</env-entry-name>
- <env-entry-type>java.lang.Double </env-entry-type>
- <env-entry-value>150.0</env-entry-value>
+ <env-entry-type>java.lang.Double </env-entry-type>
+ <env-entry-value>150.0</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
@@ -46,9 +46,9 @@
<container-transaction>
<method>
<ejb-name>statefulSession</ejb-name>
- <method-name>*</method-name>
+ <method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
- </assembly-descriptor>
+ </assembly-descriptor>
</ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/sun-ejb-jar.xml
index 9f2f610..cb25794 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/descriptor/sun-ejb-jar.xml
@@ -23,7 +23,7 @@
<unique-id>1</unique-id>
<ejb>
<ejb-name>statefulSession</ejb-name>
- <jndi-name>MyTraderBean</jndi-name>
+ <jndi-name>MyTraderBean</jndi-name>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderBean.java
index 9d46dc3..980c24d 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderBean.java
@@ -81,7 +81,7 @@
* This method corresponds to the create method in the home interface
* "TraderHome.java".
* The parameter sets of the two methods are identical. When the client calls
- * <code>TraderHome.create()</code>, the container allocates an instance of
+ * <code>TraderHome.create()</code>, the container allocates an instance of
* the EJBean and calls <code>ejbCreate()</code>.
*
* @exception jakarta.ejb.CreateException
@@ -158,13 +158,13 @@
* @exception examples.ejb20.basic.statefulSession.ProcessingErrorException
* if there is an error while checking the price
*/
- public double getStockPrice(String stockSymbol)
- throws ProcessingErrorException
+ public double getStockPrice(String stockSymbol)
+ throws ProcessingErrorException
{
try {
return ((Double) environment.lookup(stockSymbol)).doubleValue();
} catch (NamingException ne) {
- throw new ProcessingErrorException ("Stock symbol " + stockSymbol +
+ throw new ProcessingErrorException ("Stock symbol " + stockSymbol +
" does not exist");
} catch (NumberFormatException nfe) {
throw new ProcessingErrorException("Invalid price for stock "+stockSymbol);
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderHome.java
index 491bc7c..a7fafa3 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderHome.java
@@ -22,6 +22,6 @@
public interface TraderHome extends EJBHome {
-
+
TraderRemote create() throws CreateException, RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderRemote.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderRemote.java
index b07a116..29d967c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderRemote.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateful/persistence/ejb/TraderRemote.java
@@ -29,7 +29,7 @@
public TradeResult sell(String customerName, String stockSymbol, int shares)
throws ProcessingErrorException, RemoteException;
- public double getBalance()
+ public double getBalance()
throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/build.xml
index ae72ce1..1bc90a1 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/build.xml
@@ -82,16 +82,16 @@
</target>
<target name="usage">
- <echo> Usage:
- ant converter (Executes the converter tests)
- ant all (Executes all the ejb session stateless tests)
- ant clean (cleans all the ejb session stateless tests)
- ant build (builds all the ejb session stateless tests)
- ant setup (sets up all resources for stateless tests)
- ant deploy (deploys all the ejb session stateless apps)
- ant run (Executes all the ejb session stateless tests)
- ant undeploy (undeploys all the session stateless apps)
- ant unsetup (unsets all resources for stateless tests)
- </echo>
+ <echo> Usage:
+ ant converter (Executes the converter tests)
+ ant all (Executes all the ejb session stateless tests)
+ ant clean (cleans all the ejb session stateless tests)
+ ant build (builds all the ejb session stateless tests)
+ ant setup (sets up all resources for stateless tests)
+ ant deploy (deploys all the ejb session stateless apps)
+ ant run (Executes all the ejb session stateless tests)
+ ant undeploy (undeploys all the session stateless apps)
+ ant unsetup (unsets all resources for stateless tests)
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/build.properties
index eaa4b7c..f20c699 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/build.properties
@@ -15,28 +15,28 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="ejb-stateless"/>
-<property name="appname" value="${module}-converter"/>
+<property name="appname" value="${module}-converter"/> \u0020
-<property name="assemble"
- value="${build.classes.dir}/archive"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
-<property name="appclient.jar"
- value="${assemble.dir}/${appname}-client.jar"/>
+<property name="assemble"\u0020
+ value="${build.classes.dir}/archive"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
+<property name="appclient.jar"\u0020
+ value="${assemble.dir}/${appname}-client.jar"/> \u0020
-<property name="test.client"
- value="com.sun.s1peqe.ejb.stateless.converter.client.ConverterClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.ejb.stateless.converter.client.ConverterClient"/>
<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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.xml"/>
<property name="app.type" value="application"/>
@@ -45,8 +45,8 @@
<!-- ============================================================ -->
<!--
<property name="jndi.name" value="converter"/>
-<property name="provider.url" value="iiop://localhost:${orb.port}"/>
-<property name="ctxfactory" value="com.sun.enterprise.naming.SerialInitContextFactory"/>
-<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/>
+<property name="provider.url" value="iiop://localhost:${orb.port}"/>\u0020
+<property name="ctxfactory" value="com.sun.enterprise.naming.SerialInitContextFactory"/>\u0020
+<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/>\u0020
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/build.xml
index 003ae5a..0fed75a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/build.xml
@@ -57,7 +57,7 @@
<param name="jdbc.conpool.name" value="sqe-timer-pool"/>
</antcall>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -69,12 +69,12 @@
<target name="build" depends="compile">
<antcall target="build-ear-common"/>
- </target>
-
+ </target>
+
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
<antcall target="run-standalone-client"/>
@@ -86,27 +86,27 @@
<target name="run-standalone-client" depends="init-common">
<property name="jndi.name" value="converter"/>
<property name="provider.url" value="iiop://${admin.host}:${orb.port}"/>
- <property name="ctxfactory"
+ <property name="ctxfactory"
value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<!--
- <property name="ctxfactory"
- value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
+ <property name="ctxfactory"
+ value="org.glassfish.jndi.cosnaming.CNCtxFactory"/>
-->
- <echo message="provider.url used is ${provider.url}"/>
+ <echo message="provider.url used is ${provider.url}"/>
<java classname="${test.client}"
classpath="${s1astest.classpath}:${assemble.dir}/${appname}AppClient.jar"
failonerror="true" fork="true">
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
- <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialHost=${admin.host}"/>
+ <jvmarg value="-Dorg.omg.CORBA.ORBInitialPort=${orb.port}"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
</java>
</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/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/client/ConverterClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/client/ConverterClient.java
index 2e41fba..8b5d64d 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/client/ConverterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/client/ConverterClient.java
@@ -27,7 +27,7 @@
/**
* A simple java client. This uses the services provided by the <code>ConverterBean</code> and
- * converts 100 US dollars to Yen and 100 Yen to Euro.
+ * converts 100 US dollars to Yen and 100 Yen to Euro.
* <p>In this regard, it does the following in order
* <ul>
* <li>Locates the home interface of the enterprise bean
@@ -37,21 +37,21 @@
* <br>
* <b>Locating the home interface:</b>
* <blockquote><pre>
- * Context initial = new InitialContext();
- * Context myEnv = (Context)initial.lookup("java:comp/env");
- * Object objref = myEnv.lookup("ejb/SimpleConverter");
+ * Context initial = new InitialContext();
+ * Context myEnv = (Context)initial.lookup("java:comp/env");
+ * Object objref = myEnv.lookup("ejb/SimpleConverter");
* ConverterHome home = (ConverterHome)PortableRemoteObject.narrow(objref, ConverterHome.class);
* </pre></blockquote>
* <br>
* <b>Creating the remote interface:</b>
* <blockquote><pre>
- * Converter currencyConverter = home.create();
+ * Converter currencyConverter = home.create();
* </pre></blockquote>
* <br>
* <b>Invoking business methods:</b>
* <blockquote><pre>
* BigDecimal param = new BigDecimal ("100.00");
- * amount = currencyConverter.dollarToYen(param);
+ * amount = currencyConverter.dollarToYen(param);
* amount = currencyConverter.yenToEuro(param);
* </pre></blockquote>
* <br>
@@ -66,7 +66,7 @@
public class ConverterClient {
- private SimpleReporterAdapter stat =
+ private SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
ConverterClient() {
@@ -80,35 +80,35 @@
*
*/
public static void main(String[] args) {
- ConverterClient client = new ConverterClient();
- client.run(args);
+ ConverterClient client = new ConverterClient();
+ client.run(args);
}
private void run(String[] args) {
String url = null;
- String testId = null;
+ String testId = null;
String jndiName = null;
Context context = null;
String ctxFactory = null;
- java.lang.Object obj = null;
+ java.lang.Object obj = null;
try {
stat.addDescription("This is to test the converter sample.");
if (args.length == 3) {
url = args[0];
ctxFactory = args[1];
- jndiName = args[2];
+ jndiName = args[2];
}
if ( (url == null) || (ctxFactory == null) ) {
- testId = "Converter::Sample AppClient";
+ testId = "Converter::Sample AppClient";
// Initialize the Context with default properties
context = new InitialContext();
System.out.println("Default Context Initialized...");
// Create Home object
obj = context.lookup("java:comp/env/ejb/SimpleConverter");
} else {
- testId = "Converter::Sample Standalone-Client";
+ testId = "Converter::Sample Standalone-Client";
Properties env = new Properties();
env.put("java.naming.provider.url", url);
env.put("java.naming.factory.initial", ctxFactory);
@@ -138,7 +138,7 @@
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
} finally {
- stat.printSummary(testId);
+ stat.printSummary(testId);
}
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/descriptor/application.xml
index dc859fe..a076d61 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/descriptor/application.xml
@@ -23,7 +23,7 @@
<small-icon></small-icon>
<large-icon></large-icon>
</icon>
- <display-name>ConverterApp</display-name>
+ <display-name>ConverterApp</display-name>
<module>
<java>ejb-stateless-converter-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/ejb/ConverterBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/ejb/ConverterBean.java
index c0cdf30..a8df342 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/ejb/ConverterBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/ejb/stateless/converter/ejb/ConverterBean.java
@@ -35,7 +35,7 @@
* @see ConverterHome
*/
public class ConverterBean implements SessionBean, TimedObject {
-
+
SessionContext sessionContext_;
BigDecimal yenRate = new BigDecimal("121.6000");
@@ -53,7 +53,7 @@
// number of tests is getting large. This set of operations will
// ensure that the timer persistent store is configured properly,
// in addition to exercising some of the common timer functions.
- testTimerService();
+ testTimerService();
BigDecimal result = dollars.multiply(yenRate);
return result.setScale(2,BigDecimal.ROUND_UP);
@@ -88,7 +88,7 @@
* Loads the state of the bean from secondary storage. Required by EJB spec.
*/
public void ejbActivate() {}
-
+
/**
* Keeps the state of the bean to secondary storage. Required by EJB spec.
*/
@@ -139,7 +139,7 @@
e.printStackTrace();
throw new EJBException(e);
}
-
+
try {
sessionContext_.getUserTransaction().begin();
Collection timers = timerService.getTimers();
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/build.properties
index 9842fbc..ecc1352 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/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="jndi"/>
-<property name="appname" value="${module}-url"/>
+<property name="appname" value="${module}-url"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
<property name="test.client" value="com.sun.s1peqe.jndi.url.client.HTMLReaderClient"/>
<property name="application.xml" value="descriptor/application.xml"/>
@@ -27,6 +27,6 @@
<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="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/>
-<property name="app.type" value="application"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
+<property name="appclient.jar" value="${assemble.dir}/${appname}-client.jar"/> \u0020
+<property name="app.type" value="application"/> \u0020
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/build.xml
index 54c741d..d78216e 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/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,24 +46,24 @@
<target name="build" depends="compile">
<antcall target="build-ear-common">
- <param name="ejbjar.classes"
+ <param name="ejbjar.classes"
value="**/*HTML*.class,**/*Exception*.class" />
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/*Exception*.class,**/*Home*.class,**/*Reader.class,**/*Client*.class" />
</antcall>
- </target>
-
+ </target>
+
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</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/v2-tests/appserv-tests/sqetests/jndi/url/client/HTMLReaderClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/client/HTMLReaderClient.java
index e90a03c..add5e52 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/client/HTMLReaderClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/client/HTMLReaderClient.java
@@ -25,7 +25,7 @@
public class HTMLReaderClient {
- private static SimpleReporterAdapter stat =
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main(String[] args) {
@@ -36,8 +36,8 @@
Object objref = initial.lookup("java:comp/env/ejb/SimpleHTMLReader");
System.out.println("getting home...");
- HTMLReaderHome home =
- (HTMLReaderHome)PortableRemoteObject.narrow(objref,
+ HTMLReaderHome home =
+ (HTMLReaderHome)PortableRemoteObject.narrow(objref,
HTMLReaderHome.class);
System.out.println("creating bean...");
@@ -55,5 +55,5 @@
}
stat.printSummary("urlID");
System.exit(0);
- }
-}
+ }
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/ejb/HTMLReader.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/ejb/HTMLReader.java
index 1d720d5..1bfecf2 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/ejb/HTMLReader.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/ejb/HTMLReader.java
@@ -20,8 +20,8 @@
import java.rmi.RemoteException;
public interface HTMLReader extends EJBObject {
-
- public StringBuffer getContents()
+
+ public StringBuffer getContents()
throws RemoteException, HTTPResponseException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/ejb/HTMLReaderBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/ejb/HTMLReaderBean.java
index 17a88d1..5f0ad87 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/ejb/HTMLReaderBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jndi/url/ejb/HTMLReaderBean.java
@@ -22,7 +22,7 @@
import java.io.*;
public class HTMLReaderBean implements SessionBean {
-
+
public StringBuffer getContents() throws HTTPResponseException {
Context context;
@@ -33,10 +33,10 @@
HttpURLConnection connection;
InputStream input;
BufferedReader dataInput;
-
+
try {
context = new InitialContext();
- url = (URL)context.lookup("java:comp/env/url/MyURL");
+ url = (URL)context.lookup("java:comp/env/url/MyURL");
connection = (HttpURLConnection)url.openConnection();
responseCode = connection.getResponseCode();
} catch (Exception ex) {
@@ -44,7 +44,7 @@
}
if (responseCode != HttpURLConnection.HTTP_OK) {
- throw new HTTPResponseException("HTTP response code: " +
+ throw new HTTPResponseException("HTTP response code: " +
String.valueOf(responseCode));
}
@@ -55,7 +55,7 @@
while ((line = dataInput.readLine()) != null) {
buffer.append(line);
buffer.append('\n');
- }
+ }
} catch (Exception ex) {
throw new EJBException(ex.getMessage());
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/build.xml
index e364681..d0314c9 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/build.xml
@@ -77,7 +77,7 @@
debug="on" deprecation="off" optimize="off">
<classpath>
<path refid="base.classpath" />
- </classpath>
+ </classpath>
</javac>
</target>
@@ -85,7 +85,7 @@
<!-- Create jar file -->
<!-- ============================================================== -->
- <target name="create-jar-local" depends="clean-jars-common,compile">
+ <target name="create-jar-local" depends="clean-jars-common,compile">
<mkdir dir="${assemble.jar}"/>
<!-- copy over the application configuration resource -->
@@ -95,12 +95,12 @@
<copy todir="${assemble.jar}/META-INF"
file="${src.dir}/components/taglib/components.tld"/>
<copy todir="${assemble.jar}">
- <fileset dir="${build.classes.dir}/" includes="**/*.class"
+ <fileset dir="${build.classes.dir}/" includes="**/*.class"
excludes="${demo.pkg}/**/*.class,JSFTest.class"/>
</copy>
- <jar jarfile="${assemble.jar}/${jar}"
- basedir="${assemble.jar}"/>
+ <jar jarfile="${assemble.jar}/${jar}"
+ basedir="${assemble.jar}"/>
</target>
<!-- ============================================================== -->
@@ -112,10 +112,10 @@
</target>
<target name="clean-war-local" depends="init-common">
- <delete dir="${assemble.war}" quiet="true" />
+ <delete dir="${assemble.war}" quiet="true" />
</target>
- <target name="create-war-local"
+ <target name="create-war-local"
depends="clean-war-local,mkdir_webinf,create-jar-local"
description="create war file." >
@@ -128,7 +128,7 @@
<!-- Copy the demo classes only. Components are jarred -->
<copy todir="${assemble.war}/WEB-INF/classes/">
- <fileset dir="${build.classes.dir}/"
+ <fileset dir="${build.classes.dir}/"
includes="${demo.pkg}/**/*.class"/>
</copy>
@@ -137,35 +137,35 @@
<fileset dir="${src.dir}/components" />
</copy>
<copy todir="${assemble.war}/src/java/demo">
- <fileset dir="${src.dir}/demo" />
+ <fileset dir="${src.dir}/demo" />
</copy>
-
+
<!-- Copy descriptor -->
- <copy todir="${assemble.war}/WEB-INF">
+ <copy todir="${assemble.war}/WEB-INF">
<fileset dir="descriptor"/>
</copy>
<!-- Copy docroot -->
<copy todir="${assemble.war}">
- <fileset dir="docroot"/>
+ <fileset dir="docroot"/>
</copy>
-
+
<!-- Copy the jsfcomponents.jar file to the assemble area -->
- <copy todir="${assemble.war}/WEB-INF/lib"
- file="${assemble.jar}/${jar}"/>
+ <copy todir="${assemble.war}/WEB-INF/lib"
+ file="${assemble.jar}/${jar}"/>
<!-- Create war file -->
<jar jarfile="${assemble.dir}/${war}"
basedir="${assemble.war}" />
- </target>
+ </target>
<!-- ============================================================== -->
<!-- build -->
<!-- ============================================================== -->
<target name="build" depends="create-war-local">
- </target>
+ </target>
<!-- ============================================================== -->
<!-- setup/unsetup (dummy) -->
@@ -183,11 +183,11 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-war-common"/>
- </target>
+ </target>
<target name="undeploy" depends="init-common">
<antcall target="undeploy-war-common"/>
- </target>
+ </target>
<!-- ============================================================== -->
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/descriptor/faces-config.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/descriptor/faces-config.xml
index e94d996..c64c065 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/descriptor/faces-config.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/descriptor/faces-config.xml
@@ -34,8 +34,8 @@
<managed-bean>
<description>
- Causes the default VariableResolver implementation to instantiate the
- managed bean, NA of the class, components.model.ImageArea in application
+ Causes the default VariableResolver implementation to instantiate the
+ managed bean, NA of the class, components.model.ImageArea in application
scope if the bean does not already exist in any scope and initialize the
shape, alt, and coords properties with the values specified by the
managed-property elements.
@@ -45,7 +45,7 @@
<managed-bean-scope> application </managed-bean-scope>
<managed-property>
<description>
- Initializes the shape property of the managed bean, NA with the value,
+ Initializes the shape property of the managed bean, NA with the value,
poly.
</description>
<property-name>shape</property-name>
@@ -53,7 +53,7 @@
</managed-property>
<managed-property>
<description>
- Initializes the alt property of the managed bean, NA with the value,
+ Initializes the alt property of the managed bean, NA with the value,
NAmerica.
</description>
<property-name>alt</property-name>
@@ -61,7 +61,7 @@
</managed-property>
<managed-property>
<description>
- Initializes the coords property of the managed bean, NA with the value
+ Initializes the coords property of the managed bean, NA with the value
specified by the value element.
</description>
<property-name>coords</property-name>
@@ -73,8 +73,8 @@
<managed-bean>
<description>
- Causes the default VariableResolver implementation to instantiate the
- managed bean, SA of the class, components.model.ImageArea in application
+ Causes the default VariableResolver implementation to instantiate the
+ managed bean, SA of the class, components.model.ImageArea in application
scope if the bean does not already exist in any scope and initialize the
shape, alt, and coords properties with the values specified by the
managed-property elements.
@@ -84,7 +84,7 @@
<managed-bean-scope>application</managed-bean-scope>
<managed-property>
<description>
- Initializes the shape property of the managed bean, SA with the value
+ Initializes the shape property of the managed bean, SA with the value
poly.
</description>
<property-name>shape</property-name>
@@ -92,7 +92,7 @@
</managed-property>
<managed-property>
<description>
- Initializes the alt property of the managed bean, SA with the value
+ Initializes the alt property of the managed bean, SA with the value
SAmerica.
</description>
<property-name>alt</property-name>
@@ -100,7 +100,7 @@
</managed-property>
<managed-property>
<description>
- Initializes the coords property of the managed bean, SA with the value
+ Initializes the coords property of the managed bean, SA with the value
specified by the value element.
</description>
<property-name>coords</property-name>
@@ -112,8 +112,8 @@
<managed-bean>
<description>
- Causes the default VariableResolver implementation to instantiate the
- managed bean, finA of the class, components.model.ImageArea in application
+ Causes the default VariableResolver implementation to instantiate the
+ managed bean, finA of the class, components.model.ImageArea in application
scope if the bean does not already exist in any scope and initialize the
shape, alt, and coords properties with the values specified by the
managed-property elements.
@@ -123,7 +123,7 @@
<managed-bean-scope>application</managed-bean-scope>
<managed-property>
<description>
- Initializes the shape property of the managed bean, finA with the value
+ Initializes the shape property of the managed bean, finA with the value
poly.
</description>
<property-name>shape</property-name>
@@ -131,7 +131,7 @@
</managed-property>
<managed-property>
<description>
- Initializes the alt property of the managed bean, finA with the value
+ Initializes the alt property of the managed bean, finA with the value
Finland.
</description>
<property-name>alt</property-name>
@@ -139,7 +139,7 @@
</managed-property>
<managed-property>
<description>
- Initializes the coords property of the managed bean, finA with the value
+ Initializes the coords property of the managed bean, finA with the value
specified by the value element.
</description>
<property-name>coords</property-name>
@@ -151,8 +151,8 @@
<managed-bean>
<description>
- Causes the default VariableResolver implementation to instantiate the
- managed bean, gerA of the class, components.model.ImageArea in application
+ Causes the default VariableResolver implementation to instantiate the
+ managed bean, gerA of the class, components.model.ImageArea in application
scope if the bean does not already exist in any scope and initialize the
shape, alt, and coords properties with the values specified by the
managed-property elements.
@@ -162,7 +162,7 @@
<managed-bean-scope> application </managed-bean-scope>
<managed-property>
<description>
- Initializes the shape property of the managed bean, gerA with the value
+ Initializes the shape property of the managed bean, gerA with the value
poly.
</description>
<property-name>shape</property-name>
@@ -170,7 +170,7 @@
</managed-property>
<managed-property>
<description>
- Initializes the alt property of the managed bean, gerA with the value
+ Initializes the alt property of the managed bean, gerA with the value
Germany.
</description>
<property-name>alt</property-name>
@@ -178,7 +178,7 @@
</managed-property>
<managed-property>
<description>
- Initializes the coords property of the managed bean, gerA with the value
+ Initializes the coords property of the managed bean, gerA with the value
specified by the value element.
</description>
<property-name>coords</property-name>
@@ -190,8 +190,8 @@
<managed-bean>
<description>
- Causes the default VariableResolver implementation to instantiate the
- managed bean, fraA of the class, components.model.ImageArea in application
+ Causes the default VariableResolver implementation to instantiate the
+ managed bean, fraA of the class, components.model.ImageArea in application
scope if the bean does not already exist in any scope and initialize the
shape, alt, and coords properties with the values specified by the
managed-property elements.
@@ -201,7 +201,7 @@
<managed-bean-scope> application </managed-bean-scope>
<managed-property>
<description>
- Initializes the shape property of the managed bean, fraA with the value
+ Initializes the shape property of the managed bean, fraA with the value
poly.
</description>
<property-name>shape</property-name>
@@ -209,7 +209,7 @@
</managed-property>
<managed-property>
<description>
- Initializes the alt property of the managed bean, fraA with the value
+ Initializes the alt property of the managed bean, fraA with the value
France.
</description>
<property-name>alt</property-name>
@@ -217,7 +217,7 @@
</managed-property>
<managed-property>
<description>
- Initializes the coords property of the managed bean, fraA with the value
+ Initializes the coords property of the managed bean, fraA with the value
specified by the value element.
</description>
<property-name>coords</property-name>
@@ -226,7 +226,7 @@
</value>
</managed-property>
</managed-bean>
-
+
<managed-bean>
<managed-bean-name>RepeaterBean</managed-bean-name>
<managed-bean-class>demo.model.RepeaterBean</managed-bean-class>
@@ -238,12 +238,12 @@
<managed-bean-class>demo.model.ResultSetBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
-
+
<managed-bean>
<managed-bean-name>GraphBean</managed-bean-name>
<managed-bean-class>demo.model.GraphBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
+ </managed-bean>
<managed-bean>
<managed-bean-name>ChartBean</managed-bean-name>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/descriptor/web.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/descriptor/web.xml
index 22f0de7..728dabd 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/descriptor/web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/descriptor/web.xml
@@ -73,7 +73,7 @@
<servlet-class>jakarta.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>
-
+
<!-- Chart Servlet -->
<servlet>
<servlet-name>ChartServlet</servlet-name>
@@ -91,14 +91,14 @@
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
-
+
<servlet-mapping>
<servlet-name>ChartServlet</servlet-name>
<url-pattern>/ChartServlet</url-pattern>
</servlet-mapping>
-
+
<!-- Welcome File List -->
<welcome-file-list>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/JSFTest.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/JSFTest.java
index 9daa1d5..df8689a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/JSFTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/JSFTest.java
@@ -31,11 +31,11 @@
private int fail = 0;
private int total = 3;
private final int DEBUG = 0;
- private String[][] summary =
+ private String[][] summary =
{{"Index Page Test : ", ""},
{"Menu Page Test : ", ""},
{"Repeater Page Test: ", ""}};
-
+
public static void main( String args[] ) {
try {
@@ -45,7 +45,7 @@
ex.printStackTrace();
}
}
-
+
public JSFTest(String[] args) throws Exception {
serverhost = args[0];
serverport = args[1];
@@ -60,27 +60,27 @@
sr = new WebConversation( );
status = new SimpleReporterAdapter("appserv-tests");
status.addDescription("Testing JSF...");
-
+
}
-
+
private void runTest() {
HttpUnitOptions.setScriptingEnabled(false);
testIndexPage();
testManuPage();
testRepeaterPage();
printSummary();
-
+
}
private void testIndexPage() {
String page = "";
String testName = "JSF-indexPage";
-
+
try {
WebResponse client = sr.getResponse(URL+page);
// client = sr.getResponse(URL+page);
String s = client != null ? client.getText() : null;
-
+
if(s != null) {
if((s.indexOf("Component Content") >= 0) && (s.indexOf("execute.gif") >= 0)) {
status.addStatus(testName, status.PASS);
@@ -102,18 +102,18 @@
fail++;
ex.printStackTrace();
}
-
+
}
private void testManuPage() {
String page = "menu.faces";
String testName = "JSF-menuPage";
-
+
try {
WebResponse client = sr.getResponse(URL+page);
// client = sr.getResponse(URL+page);
String s = client != null ? client.getText() : null;
-
+
if(s != null) {
if((s.indexOf("menu2") >= 0) && (s.indexOf("Close 2") >= 0)) {
status.addStatus(testName, status.PASS);
@@ -135,17 +135,17 @@
fail++;
ex.printStackTrace();
}
-
+
}
-
+
private void testRepeaterPage() {
String page = "repeater.faces";
String testName = "JSF-repeaterPage";
-
+
try {
WebResponse client = sr.getResponse(URL+page);
String s = client != null ? client.getText() : null;
-
+
if(s != null) {
if((s.indexOf("update") >= 0) && (s.indexOf("Save Changes") >= 0)) {
status.addStatus(testName, status.PASS);
@@ -167,7 +167,7 @@
fail++;
ex.printStackTrace();
}
-
+
}
private void printSummary() {
@@ -183,5 +183,5 @@
}
status.printSummary("JSFTestID");
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ChartComponent.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ChartComponent.java
index d1d0baa..1d76eda 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ChartComponent.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ChartComponent.java
@@ -47,12 +47,12 @@
* <p>The standard component family for this component.</p>
*/
public static final String COMPONENT_FAMILY = "Chart";
-
+
/**
* <p>Name of the servlet that renders the image.</p>
*/
public static final String CHART_SERVLET_NAME = "ChartServlet";
-
+
// ------------------------------------------------------ Instance Variables
private String width = null;
private String height = null;
@@ -61,15 +61,15 @@
private String title = null;
private String xlabel = null;
private String ylabel = null;
-
- // --------------------------------------------------------------Constructors
+
+ // --------------------------------------------------------------Constructors
public ChartComponent() {
super();
setRendererType(null);
}
-
+
// -------------------------------------------------------------- Properties
/**
* <p>Return the width of the chart
@@ -94,9 +94,9 @@
*/
public void setWidth(String width) {
this.width = width;
-
+
}
-
+
/**
* <p>Return the height of the chart
*/
@@ -121,7 +121,7 @@
public void setHeight(String height) {
this.height = height;
}
-
+
/**
* <p>Return the orientation of the chart
*/
@@ -146,7 +146,7 @@
public void setOrientation(String orientation) {
this.orientation = orientation;
}
-
+
/**
* <p>Return the type of the chart
*/
@@ -252,7 +252,7 @@
return (COMPONENT_FAMILY);
}
-
+
// ----------------------------------------------------- StateHolder Methods
/**
* <p>Return the state to be saved for this component.
@@ -292,11 +292,11 @@
xlabel = (String) values[6];
ylabel = (String) values[7];
}
-
+
public void encodeEnd(FacesContext context) throws IOException {
placeChartDataInScope(context);
- // render an image that would initiate a request to a URL pointing
- // back into the webapp passing in whatever parameters are needed to
+ // render an image that would initiate a request to a URL pointing
+ // back into the webapp passing in whatever parameters are needed to
// create the dynamic image.
ResponseWriter writer = context.getResponseWriter();
writer.startElement("img", this);
@@ -304,9 +304,9 @@
writer.writeAttribute("src", src(context, this), "value");
writer.endElement("img");
}
-
+
// ----------------------------------------------------- Private Methods
-
+
protected void writeIdAttributeIfNecessary(FacesContext context,
ResponseWriter writer,
UIComponent component) {
@@ -323,38 +323,38 @@
}
}
}
-
+
private String src(FacesContext context, UIComponent component) {
String contextPath = context.getExternalContext().getRequestContextPath();
StringBuffer result = new StringBuffer(contextPath);
result.append("/");
result.append(CHART_SERVLET_NAME);
-
+
// append parameters to be passed to be servlet
- // ChartServlet will use clientId as the attribute name to get the chart
+ // ChartServlet will use clientId as the attribute name to get the chart
// data from session.
result.append("?chartId=");
result.append(getClientId(context));
result.append("&");
-
+
result.append("height=");
if ( getHeight() != null ) {
result.append(getHeight());
}
result.append("&");
-
+
result.append("width=");
if ( getWidth() != null ) {
result.append(getWidth());
}
result.append("&");
-
+
result.append("orientation=");
if ( getOrientation() != null ) {
result.append(getOrientation());
}
result.append("&");
-
+
result.append("type=");
if ( type != null ) {
result.append(type);
@@ -372,7 +372,7 @@
result.append(xlabel);
}
result.append("&");
-
+
result.append("ylabel=");
if ( ylabel != null ) {
result.append(ylabel);
@@ -380,10 +380,10 @@
return (result.toString());
}
-
+
/** Place the appropriate data for chart in session scope, so that
* it will be there when the separate request for the image is
- * processed by the chart servlet. This servlet is responsible for
+ * processed by the chart servlet. This servlet is responsible for
* writing out the chart as an image into the respone stream.
*/
protected void placeChartDataInScope(FacesContext context) {
@@ -402,7 +402,7 @@
ChartItemComponent ci = (ChartItemComponent) kid;
ChartItem item = (ChartItem) ci.getValue();
if (item == null) {
- int itemVal =
+ int itemVal =
(new Integer((String)ci.getItemValue())).intValue();
item = new ChartItem(ci.getItemLabel(),itemVal,
ci.getItemColor());
@@ -412,10 +412,10 @@
}
}
}
- // store the chart data against the clientId in session.
+ // store the chart data against the clientId in session.
Map sessionMap =
getFacesContext().getExternalContext().getSessionMap();
sessionMap.put(getClientId(context), chartItems);
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ChartItemComponent.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ChartItemComponent.java
index 5c92474..16a25cb 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ChartItemComponent.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ChartItemComponent.java
@@ -30,8 +30,8 @@
/**
* <p><strong>ChartItemComponent</strong> is a component that may be nested
- * inside a <code>ChartItem</code>, and causes the addition of a
- * <code>ChartItem</code> instance to the list of available options for the
+ * inside a <code>ChartItem</code>, and causes the addition of a
+ * <code>ChartItem</code> instance to the list of available options for the
* parent component. The contents of the
* <code>ChartItem</code> can be specified in one of the following ways:</p>
* <ul>
@@ -40,7 +40,7 @@
* <li>The associated {@link ValueBinding} points at a model data
* item of type <code>ChartItem</code>.</li>
* <li>A new <code>ChartItem</code> instance is synthesized from the values
- * of the <code>itemLabel</code>, <code>itemColor</code>,
+ * of the <code>itemLabel</code>, <code>itemColor</code>,
* <code>itemValue</code></li>
* </ul>
*/
@@ -102,15 +102,15 @@
*/
public String getItemLabel() {
- if (this.itemLabel != null) {
- return (this.itemLabel);
- }
- ValueBinding vb = getValueBinding("itemLabel");
- if (vb != null) {
- return ((String) vb.getValue(getFacesContext()));
- } else {
- return (null);
- }
+ if (this.itemLabel != null) {
+ return (this.itemLabel);
+ }
+ ValueBinding vb = getValueBinding("itemLabel");
+ if (vb != null) {
+ return ((String) vb.getValue(getFacesContext()));
+ } else {
+ return (null);
+ }
}
@@ -131,15 +131,15 @@
*/
public String getItemColor() {
- if (this.itemColor != null) {
- return (this.itemColor);
- }
- ValueBinding vb = getValueBinding("itemColor");
- if (vb != null) {
- return ((String) vb.getValue(getFacesContext()));
- } else {
- return (null);
- }
+ if (this.itemColor != null) {
+ return (this.itemColor);
+ }
+ ValueBinding vb = getValueBinding("itemColor");
+ if (vb != null) {
+ return ((String) vb.getValue(getFacesContext()));
+ } else {
+ return (null);
+ }
}
@@ -154,23 +154,23 @@
this.itemColor = color;
}
-
+
/**
* <p>Return the server value for this selection item.
*/
public Object getItemValue() {
- if (this.itemValue != null) {
- return (this.itemValue);
- }
- ValueBinding vb = getValueBinding("itemValue");
- if (vb != null) {
- return ((Integer) (vb.getValue(getFacesContext())));
- } else {
- return null;
- }
+ if (this.itemValue != null) {
+ return (this.itemValue);
}
-
+ ValueBinding vb = getValueBinding("itemValue");
+ if (vb != null) {
+ return ((Integer) (vb.getValue(getFacesContext())));
+ } else {
+ return null;
+ }
+ }
+
/**
* <p>Set the server value for this selection item.
*
@@ -187,21 +187,21 @@
*/
public Object getValue() {
- if (this.value != null) {
- return (this.value);
- }
- ValueBinding vb = getValueBinding("value");
- if (vb != null) {
- return (vb.getValue(getFacesContext()));
- } else {
- return (null);
- }
+ if (this.value != null) {
+ return (this.value);
+ }
+ ValueBinding vb = getValueBinding("value");
+ if (vb != null) {
+ return (vb.getValue(getFacesContext()));
+ } else {
+ return (null);
+ }
}
/**
* <p>Sets the <code>value</code> property of this chart item
- *
+ *
* @param value the new value
*/
public void setValue(Object value) {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/MapComponent.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/MapComponent.java
index ba47c93..1b3f381 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/MapComponent.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/MapComponent.java
@@ -53,14 +53,14 @@
- // --------------------------------------------------------------Constructors
+ // --------------------------------------------------------------Constructors
public MapComponent() {
super();
addDefaultActionListener(getFacesContext());
}
-
+
// -------------------------------------------------------------- Properties
@@ -106,7 +106,7 @@
return ("Map");
}
-
+
// ----------------------------------------------------- Event Methods
private static Class signature[] = {AreaSelectedEvent.class};
@@ -209,7 +209,7 @@
immediateSet = ((Boolean) values[5]).booleanValue();
addDefaultActionListener(context);
}
-
+
// ----------------------------------------------------- Private Methods
// Add the default action listener
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/PaneComponent.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/PaneComponent.java
index ef84268..c67e093 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/PaneComponent.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/PaneComponent.java
@@ -155,7 +155,7 @@
private UIComponent findParentForRendererType(UIComponent component, String rendererType) {
Object facetParent = null;
UIComponent currentComponent = component;
-
+
// Search for an ancestor that is the specified renderer type;
// search includes the facets.
while (null != (currentComponent = currentComponent.getParent())) {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ScrollerComponent.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ScrollerComponent.java
index 5f0d7ed..b0d3eba 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ScrollerComponent.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/components/ScrollerComponent.java
@@ -101,7 +101,7 @@
default:
currentPage = actionInt;
break;
- }
+ }
// from the currentPage, calculate the current row to scroll to.
currentRow = (currentPage - 1) * getRowsPerPage(context);
this.getAttributes().put("currentPage", new Integer(currentPage));
@@ -180,10 +180,10 @@
return ("Scroller");
}
-
+
//
// Helper methods
- //
+ //
/**
* Write the markup to render a navigation widget. Override this to
@@ -422,4 +422,4 @@
}
return uiData.getRows();
}
-}
+}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/conf/faces-config.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/conf/faces-config.xml
index dea48f1..5ec8204 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/conf/faces-config.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/conf/faces-config.xml
@@ -51,18 +51,18 @@
<property-name>shape</property-name>
<property-class>java.lang.String</property-class>
</property>
-
+
<component-extension>
<component-family>Area</component-family>
<renderer-type>DemoArea</renderer-type>
</component-extension>
-
+
</component>
<component>
<component-type>Graph</component-type>
<component-class>components.components.GraphComponent</component-class>
-
+
<component-extension>
<component-family>Graph</component-family>
<renderer-type>MenuBar</renderer-type>
@@ -79,28 +79,28 @@
<property-name>current</property-name>
<property-class>java.lang.String</property-class>
</property>
-
+
<component-extension>
<component-family>Map</component-family>
<renderer-type>DemoMap</renderer-type>
</component-extension>
-
+
</component>
<component>
<component-type>Pane</component-type>
<component-class>components.components.PaneComponent</component-class>
-
+
<component-extension>
<component-family>Pane</component-family>
<renderer-type>Tab</renderer-type>
</component-extension>
</component>
-
+
<component>
<component-type>Scroller</component-type>
<component-class>components.components.ScrollerComponent</component-class>
-
+
<component-extension>
<component-family>Scroller</component-family>
</component-extension>
@@ -109,16 +109,16 @@
<component>
<component-type>Chart</component-type>
<component-class>components.components.ChartComponent</component-class>
-
+
<component-extension>
<component-family>Chart</component-family>
</component-extension>
</component>
-
+
<component>
<component-type>ChartItem</component-type>
<component-class>components.components.ChartItemComponent</component-class>
-
+
<component-extension>
<component-family>ChartItem</component-family>
</component-extension>
@@ -134,7 +134,7 @@
<component-family>Area</component-family>
<renderer-type>DemoArea</renderer-type>
<renderer-class>components.renderkit.AreaRenderer</renderer-class>
-
+
<attribute>
<description>
Context-relative path to an image to be displayed when the
@@ -167,7 +167,7 @@
<component-family>Map</component-family>
<renderer-type>DemoMap</renderer-type>
<renderer-class>components.renderkit.MapRenderer</renderer-class>
-
+
<attribute>
<description>
CSS style class to use when rendering this component.
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/model/ChartItem.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/model/ChartItem.java
index ae7a92c..0d242cd 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/model/ChartItem.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/model/ChartItem.java
@@ -28,11 +28,11 @@
public ChartItem() {
super();
}
-
+
public ChartItem(String label, int value, String color) {
setLabel(label);
- setValue(value);
- setColor(color);
+ setValue(value);
+ setColor(color);
}
/**
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/ChartServlet.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/ChartServlet.java
index 017476b..5474100 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/ChartServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/ChartServlet.java
@@ -56,7 +56,7 @@
private ServletConfig servletConfig = null;
-
+
/**
* <p>Release all resources acquired at startup time.</p>
*/
@@ -85,12 +85,12 @@
/**
* <p>Perform initialization.</p>
*
- * @exception ServletException if, for any reason,
+ * @exception ServletException if, for any reason,
* bn error occurred during the processing of
* this <code>init()</code> method.
*/
public void init(ServletConfig servletConfig) throws ServletException {
-
+
// Save our ServletConfig instance
this.servletConfig = servletConfig;
}
@@ -109,20 +109,20 @@
throws IOException, ServletException {
- // Here's where we'd get the ChartBean from the session and determine
- // whether we're generating a pie chart or bar chart...
- //
- String type = request.getParameter("type");
- if ((type == null) ||
- (!type.equals("bar")) && (!type.equals("pie"))) {
- type = "bar";
- }
-
- if (type.equals("bar")) {
- generateBarChart(request, response);
- } else {
+ // Here's where we'd get the ChartBean from the session and determine
+ // whether we're generating a pie chart or bar chart...
+ //
+ String type = request.getParameter("type");
+ if ((type == null) ||
+ (!type.equals("bar")) && (!type.equals("pie"))) {
+ type = "bar";
+ }
+
+ if (type.equals("bar")) {
+ generateBarChart(request, response);
+ } else {
generatePieChart(request, response);
- }
+ }
}
/**
@@ -137,7 +137,7 @@
*/
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException {
- doGet(request, response);
+ doGet(request, response);
}
/**
@@ -150,249 +150,249 @@
* @exception ServletException if a servlet error occurs during processing
*/
private void generateBarChart(HttpServletRequest request,
- HttpServletResponse response)
+ HttpServletResponse response)
throws IOException, ServletException {
final int VERTICAL = 0;
- final int HORIZONTAL = 1;
+ final int HORIZONTAL = 1;
- response.setContentType("image/jpeg");
-
+ response.setContentType("image/jpeg");
+
String id = request.getParameter("chartId");
-
- // get chart parameters
- String title = request.getParameter("title");
- if (title == null) {
- title = "Chart";
- }
-
- int orientation = VERTICAL;
- String orientationStr = request.getParameter("orientation");
- if ((orientationStr == null) ||
- (!orientationStr.equals("horizontal")) && (!orientationStr.equals("vertical"))) {
- orientation = VERTICAL;
- } else if (orientationStr.equals("vertical")) {
- orientation = VERTICAL;
- } else {
- orientation = HORIZONTAL;
- }
- // label for x/y axis
- String xLabel = request.getParameter("xlabel");
- String yLabel = request.getParameter("ylabel");
+ // get chart parameters
+ String title = request.getParameter("title");
+ if (title == null) {
+ title = "Chart";
+ }
- // default image size
- int width = 400;
- int height = 300;
- String widthStr = request.getParameter("width");
- String heightStr = request.getParameter("height");
- if (widthStr != null) {
- width = Integer.parseInt(widthStr);
- }
- if (heightStr != null) {
- height = Integer.parseInt(heightStr);
- }
-
- // get an array of chart items containing our data..
+ int orientation = VERTICAL;
+ String orientationStr = request.getParameter("orientation");
+ if ((orientationStr == null) ||
+ (!orientationStr.equals("horizontal")) && (!orientationStr.equals("vertical"))) {
+ orientation = VERTICAL;
+ } else if (orientationStr.equals("vertical")) {
+ orientation = VERTICAL;
+ } else {
+ orientation = HORIZONTAL;
+ }
+
+ // label for x/y axis
+ String xLabel = request.getParameter("xlabel");
+ String yLabel = request.getParameter("ylabel");
+
+ // default image size
+ int width = 400;
+ int height = 300;
+ String widthStr = request.getParameter("width");
+ String heightStr = request.getParameter("height");
+ if (widthStr != null) {
+ width = Integer.parseInt(widthStr);
+ }
+ if (heightStr != null) {
+ height = Integer.parseInt(heightStr);
+ }
+
+ // get an array of chart items containing our data..
HttpSession session = request.getSession(true);
- ChartItem[] chartItems = (ChartItem[])session.getAttribute(id);
- if (chartItems == null) {
+ ChartItem[] chartItems = (ChartItem[])session.getAttribute(id);
+ if (chartItems == null) {
System.out.println("No data items specified...");
- throw new ServletException("No data items specified...");
- }
+ throw new ServletException("No data items specified...");
+ }
// remove the chart data from session now that chart has been rendered.
session.removeAttribute(id);
-
- // maximum data value
- int maxDataValue = 0;
- // maximum label width
- int maxLabelWidth = 0;
- // space between bars
- int barSpacing = 10;
- // width of each bar
- int barWidth = 0;
- // x,y coordinates
- int cx, cy;
- // number of chart items
- int columns = chartItems.length;
- int scale = 10;
+
+ // maximum data value
+ int maxDataValue = 0;
+ // maximum label width
+ int maxLabelWidth = 0;
+ // space between bars
+ int barSpacing = 10;
+ // width of each bar
+ int barWidth = 0;
+ // x,y coordinates
+ int cx, cy;
+ // number of chart items
+ int columns = chartItems.length;
+ int scale = 10;
// an individual chart data item
- ChartItem chartItem = null;
- String label = null;
- int value = 0;
+ ChartItem chartItem = null;
+ String label = null;
+ int value = 0;
BufferedImage bi = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = bi.createGraphics();
Font titleFont = new java.awt.Font("Courier", Font.BOLD, 12);
FontMetrics titleFontMetrics = g2d.getFontMetrics(titleFont);
-
- // loop through and figure out the the widest item label, as well as
- // the maximum value.
+
+ // loop through and figure out the the widest item label, as well as
+ // the maximum value.
for (int i=0; i < columns; i++) {
- chartItem = chartItems[i];
- label = chartItem.getLabel();
- value = chartItem.getValue();
- if (value > maxDataValue) {
- maxDataValue = value;
- }
- maxLabelWidth = Math.max(titleFontMetrics.stringWidth(label), maxLabelWidth);
- }
+ chartItem = chartItems[i];
+ label = chartItem.getLabel();
+ value = chartItem.getValue();
+ if (value > maxDataValue) {
+ maxDataValue = value;
+ }
+ maxLabelWidth = Math.max(titleFontMetrics.stringWidth(label), maxLabelWidth);
+ }
- // calculate chart dimensions
- int[] xcoords = new int[columns];
- int[] ycoords = new int[columns];
- int totalWidth = 0;
- int totalHeight = 0;
- for (int i=0; i < columns; i++) {
- switch (orientation) {
- case VERTICAL:
- default:
+ // calculate chart dimensions
+ int[] xcoords = new int[columns];
+ int[] ycoords = new int[columns];
+ int totalWidth = 0;
+ int totalHeight = 0;
+ for (int i=0; i < columns; i++) {
+ switch (orientation) {
+ case VERTICAL:
+ default:
barWidth = maxLabelWidth;
- cx = (Math.max((barWidth + barSpacing),maxLabelWidth) * i) +
- barSpacing;
- totalWidth = cx + (4 * titleFont.getSize());
- break;
- case HORIZONTAL:
- barWidth = titleFont.getSize();
- cy = ((barWidth + barSpacing) * i) + barSpacing;
- totalHeight = cy + (4 * titleFont.getSize());
- break;
- }
- }
- if (orientation == VERTICAL) {
+ cx = (Math.max((barWidth + barSpacing),maxLabelWidth) * i) +
+ barSpacing;
+ totalWidth = cx + (4 * titleFont.getSize());
+ break;
+ case HORIZONTAL:
+ barWidth = titleFont.getSize();
+ cy = ((barWidth + barSpacing) * i) + barSpacing;
+ totalHeight = cy + (4 * titleFont.getSize());
+ break;
+ }
+ }
+ if (orientation == VERTICAL) {
totalHeight = maxDataValue + (8 * titleFont.getSize());
- totalWidth = totalWidth + 50;
- } else {
- totalWidth = maxDataValue + (4 * titleFont.getSize() +
- (Integer.toString(maxDataValue).length() * titleFont.getSize())+50);
- }
+ totalWidth = totalWidth + 50;
+ } else {
+ totalWidth = maxDataValue + (4 * titleFont.getSize() +
+ (Integer.toString(maxDataValue).length() * titleFont.getSize())+50);
+ }
- // Make sure the the total height of the chart provides enough room
- // for the vertical label..
- //
- int yLabelHeight = 0;
- for (int i=0; i<yLabel.length(); i++) {
- yLabelHeight += titleFontMetrics.getAscent();
- }
- if ((yLabelHeight+(12 * titleFontMetrics.getDescent())) > totalHeight) {
- totalHeight = yLabelHeight+(8*titleFont.getSize());
- }
-
+ // Make sure the the total height of the chart provides enough room
+ // for the vertical label..
+ //
+ int yLabelHeight = 0;
+ for (int i=0; i<yLabel.length(); i++) {
+ yLabelHeight += titleFontMetrics.getAscent();
+ }
+ if ((yLabelHeight+(12 * titleFontMetrics.getDescent())) > totalHeight) {
+ totalHeight = yLabelHeight+(8*titleFont.getSize());
+ }
+
bi = new BufferedImage(totalWidth, totalHeight, BufferedImage.TYPE_INT_RGB);
g2d = bi.createGraphics();
titleFontMetrics = g2d.getFontMetrics(titleFont);
- // graph dimensions
- Dimension graphDim = new Dimension(totalWidth,totalHeight);
+ // graph dimensions
+ Dimension graphDim = new Dimension(totalWidth,totalHeight);
Rectangle graphRect = new Rectangle(graphDim);
- // border dimensions
- Dimension borderDim = new Dimension(totalWidth-2,totalHeight-2);
+ // border dimensions
+ Dimension borderDim = new Dimension(totalWidth-2,totalHeight-2);
Rectangle borderRect = new Rectangle(borderDim);
-
- // background color
- g2d.setColor(Color.white);
- g2d.fill(graphRect);
- // draw border
- g2d.setColor(Color.black);
- borderRect.setLocation(1,1);
+ // background color
+ g2d.setColor(Color.white);
+ g2d.fill(graphRect);
+
+ // draw border
+ g2d.setColor(Color.black);
+ borderRect.setLocation(1,1);
g2d.draw(borderRect);
- // draw the title centered at the bottom of the bar graph
- int i = titleFontMetrics.stringWidth(title);
- g2d.setFont(titleFont);
- g2d.setColor(Color.black);
- g2d.drawString(title, Math.max((totalWidth - i)/2, 0),
- totalHeight - titleFontMetrics.getDescent());
+ // draw the title centered at the bottom of the bar graph
+ int i = titleFontMetrics.stringWidth(title);
+ g2d.setFont(titleFont);
+ g2d.setColor(Color.black);
+ g2d.drawString(title, Math.max((totalWidth - i)/2, 0),
+ totalHeight - titleFontMetrics.getDescent());
- // draw the x axis label
- i = titleFontMetrics.stringWidth(xLabel);
- g2d.drawString(xLabel, Math.max((totalWidth - i)/2, 0),
- totalHeight - (6 * titleFontMetrics.getDescent()));
+ // draw the x axis label
+ i = titleFontMetrics.stringWidth(xLabel);
+ g2d.drawString(xLabel, Math.max((totalWidth - i)/2, 0),
+ totalHeight - (6 * titleFontMetrics.getDescent()));
- // draw the y axis label
- i = titleFontMetrics.stringWidth(yLabel);
- cx = totalWidth-(totalWidth-6);
- cy = totalHeight - (12 * titleFontMetrics.getDescent());
- for (int j=yLabel.length(); j>0; j--) {
- g2d.drawString(yLabel.substring(j-1,j), cx, cy);
- cy -= titleFontMetrics.getAscent();
- }
-
- // loop through to draw the chart items.
+ // draw the y axis label
+ i = titleFontMetrics.stringWidth(yLabel);
+ cx = totalWidth-(totalWidth-6);
+ cy = totalHeight - (12 * titleFontMetrics.getDescent());
+ for (int j=yLabel.length(); j>0; j--) {
+ g2d.drawString(yLabel.substring(j-1,j), cx, cy);
+ cy -= titleFontMetrics.getAscent();
+ }
+
+ // loop through to draw the chart items.
for (i=0; i < columns; i++) {
- chartItem = chartItems[i];
- label = chartItem.getLabel();
- value = chartItem.getValue();
- String colorStr = chartItem.getColor();
+ chartItem = chartItems[i];
+ label = chartItem.getLabel();
+ value = chartItem.getValue();
+ String colorStr = chartItem.getColor();
- Object color = getColor(colorStr);
- switch (orientation) {
- case VERTICAL:
- default:
+ Object color = getColor(colorStr);
+ switch (orientation) {
+ case VERTICAL:
+ default:
barWidth = maxLabelWidth;
- // set the next X coordinate to account for the label
- // being wider than the bar width.
- cx = (Math.max((barWidth + barSpacing),maxLabelWidth) * i) +
- barSpacing + 12;
+ // set the next X coordinate to account for the label
+ // being wider than the bar width.
+ cx = (Math.max((barWidth + barSpacing),maxLabelWidth) * i) +
+ barSpacing + 12;
- // center the bar chart
- cx += Math.max((totalWidth - (columns * (barWidth +
- (2 * barSpacing))))/2,0);
-
- // set the next Y coordinate to account for the height
- // of the bar as well as the title and labels painted
- // at the bottom of the chart.
- cy = totalHeight - (value) - 1 - (2 * titleFont.getSize());
-
- // draw the label
- g2d.setColor(Color.black);
- g2d.drawString((String)label, cx,
- totalHeight - titleFont.getSize() - (8 * titleFontMetrics.getDescent()));
+ // center the bar chart
+ cx += Math.max((totalWidth - (columns * (barWidth +
+ (2 * barSpacing))))/2,0);
- // draw the shadow bar
- if (color == Color.black) {
- g2d.setColor(Color.gray);
- }
- g2d.fillRect(cx + 5, cy - 28, barWidth, (value));
- // draw the bar with the specified color
- g2d.setColor((Color)(color));
+ // set the next Y coordinate to account for the height
+ // of the bar as well as the title and labels painted
+ // at the bottom of the chart.
+ cy = totalHeight - (value) - 1 - (2 * titleFont.getSize());
+
+ // draw the label
+ g2d.setColor(Color.black);
+ g2d.drawString((String)label, cx,
+ totalHeight - titleFont.getSize() - (8 * titleFontMetrics.getDescent()));
+
+ // draw the shadow bar
+ if (color == Color.black) {
+ g2d.setColor(Color.gray);
+ }
+ g2d.fillRect(cx + 5, cy - 28, barWidth, (value));
+ // draw the bar with the specified color
+ g2d.setColor((Color)(color));
g2d.fillRect(cx, cy - 30, barWidth, (value));
g2d.drawString("" + value, cx, cy - 30 - titleFontMetrics.getDescent());
- break;
- case HORIZONTAL:
- barWidth = titleFont.getSize();
- // set the Y coordinate
- cy = totalHeight - (((barWidth + barSpacing) * i) + barSpacing +
- (12 * titleFontMetrics.getDescent()));
-
+ break;
+ case HORIZONTAL:
+ barWidth = titleFont.getSize();
+ // set the Y coordinate
+ cy = totalHeight - (((barWidth + barSpacing) * i) + barSpacing +
+ (12 * titleFontMetrics.getDescent()));
- // set the X coordinate to be the width of the widest label
- cx = maxLabelWidth + 1;
- cx += Math.max((totalWidth - (maxLabelWidth + 1 +
- titleFontMetrics.stringWidth("" + maxDataValue) +
+ // set the X coordinate to be the width of the widest label
+ cx = maxLabelWidth + 1;
+
+ cx += Math.max((totalWidth - (maxLabelWidth + 1 +
+ titleFontMetrics.stringWidth("" + maxDataValue) +
(maxDataValue))) / 2, 0);
- // draw the labels and the shadow
- g2d.setColor(Color.black);
- g2d.drawString((String)label, cx - maxLabelWidth - 1,
- cy + titleFontMetrics.getAscent());
- if (color == Color.black) {
- g2d.setColor(Color.gray);
- }
- g2d.fillRect(cx + 3, cy + 5, (value), barWidth);
+ // draw the labels and the shadow
+ g2d.setColor(Color.black);
+ g2d.drawString((String)label, cx - maxLabelWidth - 1,
+ cy + titleFontMetrics.getAscent());
+ if (color == Color.black) {
+ g2d.setColor(Color.gray);
+ }
+ g2d.fillRect(cx + 3, cy + 5, (value), barWidth);
- // draw the bar in the current color
- g2d.setColor((Color)(color));
+ // draw the bar in the current color
+ g2d.setColor((Color)(color));
g2d.fillRect(cx, cy, (value), barWidth);
g2d.drawString("" + value, cx + (value ) + 3,
cy + titleFontMetrics.getAscent());
- break;
- }
- }
+ break;
+ }
+ }
OutputStream output = response.getOutputStream();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(output);
encoder.encode(bi);
@@ -409,56 +409,56 @@
* @exception ServletException if a servlet error occurs during processing
*/
private void generatePieChart(HttpServletRequest request,
- HttpServletResponse response)
+ HttpServletResponse response)
throws IOException, ServletException {
response.setContentType("image/jpeg");
-
- // get chart parameters
- String id = request.getParameter("chartId");
- String title = request.getParameter("title");
- if (title == null) {
- title = "Chart";
- }
-
- // label for x/y axis
- String xLabel = request.getParameter("xlabel");
- String yLabel = request.getParameter("ylabel");
- // default image size
- int width = 400;
- int height = 200;
- String widthStr = request.getParameter("width");
- String heightStr = request.getParameter("height");
- if (widthStr != null) {
- width = Integer.parseInt(widthStr);
- }
- if (heightStr != null) {
- height = Integer.parseInt(heightStr);
- }
-
- // get an array of chart items containing our data..
+ // get chart parameters
+ String id = request.getParameter("chartId");
+ String title = request.getParameter("title");
+ if (title == null) {
+ title = "Chart";
+ }
+
+ // label for x/y axis
+ String xLabel = request.getParameter("xlabel");
+ String yLabel = request.getParameter("ylabel");
+
+ // default image size
+ int width = 400;
+ int height = 200;
+ String widthStr = request.getParameter("width");
+ String heightStr = request.getParameter("height");
+ if (widthStr != null) {
+ width = Integer.parseInt(widthStr);
+ }
+ if (heightStr != null) {
+ height = Integer.parseInt(heightStr);
+ }
+
+ // get an array of chart items containing our data..
HttpSession session = request.getSession();
- ChartItem[] chartItems = (ChartItem[])session.getAttribute(id);
- if (chartItems == null) {
+ ChartItem[] chartItems = (ChartItem[])session.getAttribute(id);
+ if (chartItems == null) {
System.out.println("No data items specified...");
- throw new ServletException("No data items specified...");
- }
-
+ throw new ServletException("No data items specified...");
+ }
+
// remove the chart data from session now that chart has been rendered.
session.removeAttribute(id);
-
+
// begin pie chart
Color dropShadow = new Color(240,240,240);
//inner padding to make sure bars never touch the outer border
int innerOffset = 20;
-
+
int pieHeight = height - (innerOffset * 2);
- int pieWidth = pieHeight;
+ int pieWidth = pieHeight;
int halfWidth = width/2;
//Width of the inner graphable area
int innerWidth = width - (innerOffset * 2);
-
+
//graph dimension
Dimension graphDim = new Dimension(width, height);
Rectangle graphRect = new Rectangle(graphDim);
@@ -466,17 +466,17 @@
//border dimensions
Dimension borderDim = new Dimension(halfWidth-2,height-2);
Rectangle borderRect = new Rectangle(borderDim);
-
+
//Set content type
response.setContentType("image/jpeg");
//Create BufferedImage & Graphics2D
- BufferedImage bi = new BufferedImage(width, height,
+ BufferedImage bi = new BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);
Graphics2D g2d = bi.createGraphics();
// Set Antialiasing
- RenderingHints renderHints =
+ RenderingHints renderHints =
new RenderingHints(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
g2d.setRenderingHints(renderHints);
@@ -500,7 +500,7 @@
int border = 20;
//Main chart Ellipse
- Ellipse2D.Double elb = new Ellipse2D.Double(x_pie - border/2,
+ Ellipse2D.Double elb = new Ellipse2D.Double(x_pie - border/2,
y_pie - border/2, pieWidth + border, pieHeight + border);
//Shadow
g2d.setColor(dropShadow);
@@ -546,7 +546,7 @@
if (i == lastElement) {sweepAngle = 360-startAngle;}
// Draw Arc
g2d.setColor(getColor(chartItems[i].getColor()));
- g2d.fillArc(x_pie, y_pie, pieWidth, pieHeight, startAngle,
+ g2d.fillArc(x_pie, y_pie, pieWidth, pieHeight, startAngle,
sweepAngle);
//Increment startAngle with the sweepAngle
startAngle += sweepAngle;
@@ -580,7 +580,7 @@
encoder.encode(bi);
output.close();
}
-
+
/**
* Returns the Color instance corresponding the color passed in.
*
@@ -589,7 +589,7 @@
*/
protected Color getColor(String colorStr) {
Color color = null;
- if (colorStr == null) {
+ if (colorStr == null) {
color = Color.gray;
}
if (colorStr.equals("red")) {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/MenuBarRenderer.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/MenuBarRenderer.java
index 779fe0c..8524fd0 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/MenuBarRenderer.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/MenuBarRenderer.java
@@ -65,7 +65,7 @@
public void decode(FacesContext context, UIComponent component) {
Graph graph = null;
-
+
// if a node was clicked queue an ActionEvent.
Map requestParameterMap = (Map) context.getExternalContext().
getRequestParameterMap();
@@ -107,7 +107,7 @@
selectedClass = (String) component.getAttributes().get("selectedClass");
unselectedClass =
(String) component.getAttributes().get("unselectedClass");
-
+
// Render the menu bar for this graph
Iterator menus = null;
ResponseWriter writer = context.getResponseWriter();
@@ -125,7 +125,7 @@
Node menu = (Node) menus.next();
writer.write("<th bgcolor=\"silver\" align=\"left\">");
// The image links of the nodes that have children behave like
- // command buttons causing the form to be submitted so the state of
+ // command buttons causing the form to be submitted so the state of
// node can be toggled
if (menu.isEnabled()) {
writer.write("<a href=\"");
@@ -154,7 +154,7 @@
Node node = (Node) items.next();
writer.write("<li>");
// Render the label for this node (if any) as a
- // link is the node is enabled.
+ // link is the node is enabled.
if (node.getLabel() != null) {
writer.write(" ");
String labelStyle = null;
@@ -207,9 +207,9 @@
/**
* <p> Returns a string that is rendered as the value of
- * <code>onmousedown</code> attribute. <code>onmousedown</code> event
- * handler is used the track the node that was clicked using a hidden field,
- * then submits the form so that we have the state information to
+ * <code>onmousedown</code> attribute. <code>onmousedown</code> event
+ * handler is used the track the node that was clicked using a hidden field,
+ * then submits the form so that we have the state information to
* reconstitute the tree.
*/
protected String getSubmitScript(String path, FacesContext context) {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/MenuTreeRenderer.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/MenuTreeRenderer.java
index 1930afd..a0e2f6a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/MenuTreeRenderer.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/MenuTreeRenderer.java
@@ -106,7 +106,7 @@
// Render the beginning of this node
writer.write(" <tr valign=\"middle\">");
-
+
// Create the appropriate number of indents
for (int i = 0; i < level; i++) {
int levels = level - i;
@@ -125,13 +125,13 @@
writer.write("\n");
}
- // Render the tree state image for this node. use the "onmousedown" event
+ // Render the tree state image for this node. use the "onmousedown" event
// handler to track which node was clicked. The images are rendered
// as links.
writer.write(" <td>");
if (!node.isLeaf()) {
// The image links of the nodes that have children behave like
- // command buttons causing the form to be submitted so the state of
+ // command buttons causing the form to be submitted so the state of
// node can be toggled
writer.write("<a href=\"");
writer.write(getSubmitScript(node.getPath(), context));
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/TabLabelRenderer.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/TabLabelRenderer.java
index d25d8f2..9049ff9 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/TabLabelRenderer.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/TabLabelRenderer.java
@@ -63,7 +63,7 @@
// Relationship Instance Variables
//
- // Constructors and Initializers
+ // Constructors and Initializers
//
public TabLabelRenderer() {
@@ -148,7 +148,7 @@
return result;
}
-
+
//
// Methods From Renderer
//
@@ -162,7 +162,7 @@
// Was our command the one that caused this submission?
// we don' have to worry about getting the value from request parameter
// because we just need to know if this command caused the submission. We
- // can get the command name by calling currentValue. This way we can
+ // can get the command name by calling currentValue. This way we can
// get around the IE bug.
String clientId = component.getClientId(context);
Map requestParameterMap = (Map) context.getExternalContext().
@@ -177,7 +177,7 @@
// Search for this component's parent "tab" component..
UIComponent tabComponent = findParentForRendererType(component, "Tab");
-
+
// set the "tab" component's "id" in the event...
tabComponent.queueEvent(new PaneSelectedEvent(component,
@@ -261,8 +261,8 @@
private UIComponent findParentForRendererType(UIComponent component, String rendererType) {
Object facetParent = null;
UIComponent currentComponent = component;
-
- // Search for an ancestor that is the specified renderer type;
+
+ // Search for an ancestor that is the specified renderer type;
while (null != (currentComponent = currentComponent.getParent())) {
if (currentComponent.getRendererType().equals(rendererType)) {
break;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/Util.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/Util.java
index d9c8740..e5f2a2c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/Util.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/renderkit/Util.java
@@ -134,7 +134,7 @@
// Relationship Instance Variables
//
-// Constructors and Initializers
+// Constructors and Initializers
//
private Util() {
@@ -170,7 +170,7 @@
/**
- * <p> Return a Locale instance using the following algorithm:
+ * <p> Return a Locale instance using the following algorithm:
*
* <ul>
*
@@ -204,9 +204,9 @@
UIComponent component) {
Locale result = null;
String bundleName = null, bundleAttr = "bundle";
-
-// ParameterCheck.nonNull(context);
-// ParameterCheck.nonNull(component);
+
+// ParameterCheck.nonNull(context);
+// ParameterCheck.nonNull(component);
// verify our component has the proper attributes for bundle.
if (null !=
@@ -217,7 +217,7 @@
(jakarta.servlet.jsp.jstl.fmt.LocalizationContext)
(Util.getValueBinding(bundleName)).getValue(context))) {
result = locCtx.getLocale();
-// Assert.assert_it(null != result);
+// Assert.assert_it(null != result);
}
}
if (null == result) {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ChartItemTag.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ChartItemTag.java
index d444203..8c68396 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ChartItemTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ChartItemTag.java
@@ -24,7 +24,7 @@
import jakarta.faces.webapp.UIComponentTag;
/**
- * <p><strong>ChartItemTag</strong> is the tag handler that processes the
+ * <p><strong>ChartItemTag</strong> is the tag handler that processes the
* <code>chartItem</code> custom tag.</p>
*/
@@ -38,7 +38,7 @@
// Class methods
//
- //
+ //
// Accessors
//
@@ -63,7 +63,7 @@
public void setItemColor(String color) {
this.itemColor = color;
}
-
+
/**
* <p>The value for this item.</p>
*/
@@ -137,7 +137,7 @@
chartItem.setItemLabel(itemLabel);
}
}
-
+
if (null != itemColor) {
if (isValueReference(itemColor)) {
ValueBinding vb = FacesContext.getCurrentInstance()
@@ -147,7 +147,7 @@
chartItem.setItemColor(itemColor);
}
}
-
+
if (null != itemValue) {
if (isValueReference(itemValue)) {
ValueBinding vb = FacesContext.getCurrentInstance()
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ChartTag.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ChartTag.java
index 4839020..0ed1dd0 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ChartTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ChartTag.java
@@ -25,7 +25,7 @@
/**
- * <p><strong>ChartTag</strong> is the tag handler that processes the
+ * <p><strong>ChartTag</strong> is the tag handler that processes the
* <code>chart</code> custom tag.</p>
*/
@@ -65,12 +65,12 @@
public void setOrientation(String orientation) {
this.orientation = orientation;
}
-
+
private String value = null;
public void setValue(String value) {
this.value = value;
}
-
+
/**
* <p>The type of chart. Values can be "bar" or "pie".
*/
@@ -152,7 +152,7 @@
protected void setProperties(UIComponent component) {
super.setProperties(component);
ChartComponent chart = (ChartComponent) component;
-
+
if (width != null) {
if (isValueReference(width)) {
ValueBinding vb = FacesContext.getCurrentInstance()
@@ -162,7 +162,7 @@
chart.setWidth(width);
}
}
-
+
if (height != null) {
if (isValueReference(height)) {
ValueBinding vb = FacesContext.getCurrentInstance()
@@ -172,7 +172,7 @@
chart.setHeight(height);
}
}
-
+
if (orientation != null) {
if (isValueReference(orientation)) {
ValueBinding vb = FacesContext.getCurrentInstance()
@@ -182,7 +182,7 @@
chart.setOrientation(orientation);
}
}
-
+
if (type != null) {
if (isValueReference(type)) {
ValueBinding vb = FacesContext.getCurrentInstance()
@@ -192,7 +192,7 @@
chart.setType(type);
}
}
-
+
if (value != null) {
if (isValueReference(value)) {
ValueBinding vb = FacesContext.getCurrentInstance()
@@ -202,7 +202,7 @@
chart.setValue(value);
}
}
-
+
if (title != null) {
if (isValueReference(title)) {
ValueBinding vb = FacesContext.getCurrentInstance()
@@ -212,7 +212,7 @@
chart.setTitle(title);
}
}
-
+
if (xlabel != null) {
if (isValueReference(xlabel)) {
ValueBinding vb = FacesContext.getCurrentInstance()
@@ -222,7 +222,7 @@
chart.setXlabel(xlabel);
}
}
-
+
if (ylabel != null) {
if (isValueReference(ylabel)) {
ValueBinding vb = FacesContext.getCurrentInstance()
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuBarTag.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuBarTag.java
index 94003dd..11d0cae 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuBarTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuBarTag.java
@@ -193,8 +193,8 @@
vb =
context.getApplication().createValueBinding(
"#{sessionScope.graph_menu}");
- component.setValueBinding("value", vb);
-
+ component.setValueBinding("value", vb);
+
// In the postback case, graph exists already. So make sure
// it doesn't created again.
Graph graph = (Graph) ((GraphComponent) component).getValue();
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuNodeTag.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuNodeTag.java
index bda2640..2bdf7b1 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuNodeTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuNodeTag.java
@@ -62,11 +62,11 @@
private String action = null;
private boolean expanded;
private boolean enabled = true;
-
+
// Relationship Instance Variables
//
- // Constructors and Initializers
+ // Constructors and Initializers
//
public GraphMenuNodeTag() {
@@ -80,7 +80,7 @@
//
// General Methods
//
-
+
/**
* Name of the node
*/
@@ -191,5 +191,5 @@
}
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuTreeTag.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuTreeTag.java
index 2ebf37e..2ca88ad 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuTreeTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphMenuTreeTag.java
@@ -186,15 +186,15 @@
component.setValueBinding("value", vb);
}
}
-
+
// if there is no valueRef attribute set on this tag, then
// we need to build the graph.
if (value == null) {
vb =
context.getApplication().createValueBinding(
"#{sessionScope.graph_tree}");
- component.setValueBinding("value", vb);
-
+ component.setValueBinding("value", vb);
+
// In the postback case, graph exists already. So make sure
// it doesn't created again.
Graph graph = (Graph) ((GraphComponent) component).getValue();
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphTreeNodeTag.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphTreeNodeTag.java
index f5ddd17..97d1189 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphTreeNodeTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/GraphTreeNodeTag.java
@@ -62,11 +62,11 @@
private String action = null;
private boolean expanded;
private boolean enabled = true;
-
+
// Relationship Instance Variables
//
- // Constructors and Initializers
+ // Constructors and Initializers
//
public GraphTreeNodeTag() {
@@ -159,7 +159,7 @@
return BodyTag.EVAL_BODY_BUFFERED;
}
Node node = new Node(name, label, action, icon, enabled, expanded);
-
+
// get the immediate ancestor/parent tag of this tag.
GraphTreeNodeTag parentNode = null;
try {
@@ -169,7 +169,7 @@
} catch (Exception e) {
System.out.println(
"Exception while locating GraphTreeNodeTag.class");
- }
+ }
// if this tag has no parent that is a node tag,
if (parentNode == null) {
// then this should be root
@@ -192,5 +192,5 @@
}
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/PaneTabLabelTag.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/PaneTabLabelTag.java
index e7c6cb2..f84338f 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/PaneTabLabelTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/PaneTabLabelTag.java
@@ -73,11 +73,11 @@
protected String paneTabLabelClass;
public String getPaneTabLabelClass() {
- return paneTabLabelClass;
+ return paneTabLabelClass;
}
public void setPaneTabLabelClass(String newPaneTabLabelClass) {
- paneTabLabelClass = newPaneTabLabelClass;
+ paneTabLabelClass = newPaneTabLabelClass;
}
public void release() {
@@ -132,8 +132,8 @@
createValueBinding(paneTabLabelClass);
component.setValueBinding("paneTabLabelClass", vb);
} else {
- component.getAttributes().put("paneTabLabelClass",
- paneTabLabelClass);
+ component.getAttributes().put("paneTabLabelClass",
+ paneTabLabelClass);
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/PaneTabTag.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/PaneTabTag.java
index 567024a..1fda138 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/PaneTabTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/PaneTabTag.java
@@ -55,11 +55,11 @@
protected String paneClass;
public String getPaneClass() {
- return paneClass;
+ return paneClass;
}
public void setPaneClass(String newPaneClass) {
- paneClass = newPaneClass;
+ paneClass = newPaneClass;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ScrollerTag.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ScrollerTag.java
index dfcc578..0b0f26b 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ScrollerTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/components/taglib/ScrollerTag.java
@@ -52,7 +52,7 @@
* When rendering a widget representing "page navigation" where
* should the facet markup be rendered in relation to the page
* navigation widget? Values are "NORTH", "SOUTH", "EAST", "WEST".
- * Case insensitive. This can be value or a value binding
+ * Case insensitive. This can be value or a value binding
* reference expression.
*/
public void setNavFacetOrientation(String navFacetOrientation) {
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/demo/model/ChartBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/demo/model/ChartBean.java
index 2731b0d..fd0df3f 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/demo/model/ChartBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/demo/model/ChartBean.java
@@ -27,9 +27,9 @@
public class ChartBean {
// Bar Chart Properties -------------------------
-
- public static final int VERTICAL = 0;
- public static final int HORIZONTAL = 1;
+
+ public static final int VERTICAL = 0;
+ public static final int HORIZONTAL = 1;
private int orientation = VERTICAL;
public int getOrientation() {
@@ -38,9 +38,9 @@
public void setOrientation(int orientation) {
this.orientation = orientation;
}
-
+
// ----------------------------------------------
-
+
private int columns = 0;
public int getColumns() {
return columns;
@@ -87,14 +87,14 @@
public ChartBean() {
- setWidth(400);
- setHeight(300);
- setColumns(2);
- setOrientation(ChartBean.HORIZONTAL);
+ setWidth(400);
+ setHeight(300);
+ setColumns(2);
+ setOrientation(ChartBean.HORIZONTAL);
chartItems = new ArrayList(columns);
- chartItems.add(new ChartItem("one", 10, "red"));
- chartItems.add(new ChartItem("two", 20, "blue"));
+ chartItems.add(new ChartItem("one", 10, "red"));
+ chartItems.add(new ChartItem("two", 20, "blue"));
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/demo/taglib/EscapeHtmlTag.java b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/demo/taglib/EscapeHtmlTag.java
index 8871608..29ece40 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/demo/taglib/EscapeHtmlTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/jsfcomponents/src/demo/taglib/EscapeHtmlTag.java
@@ -79,13 +79,13 @@
//*********************************************************************
// Instance variables
-
+
private String reader;
private String writer;
-
+
//*********************************************************************
// Constructors
-
+
public EscapeHtmlTag() {
super();
init();
@@ -96,11 +96,11 @@
reader = null;
writer = null;
}
-
-
+
+
//*********************************************************************
// Tag's properties
-
+
/**
* Tag's 'reader' attribute
*/
@@ -115,10 +115,10 @@
public void setWriter(String reader) {
this.writer = writer;
}
-
+
//*********************************************************************
// TagSupport methods
-
+
public int doEndTag() throws JspException {
Reader in;
Writer out;
@@ -152,10 +152,10 @@
super.release();
init();
}
-
+
//*********************************************************************
// Tag's scific behavior methods
-
+
/**
* Transform
*/
@@ -179,10 +179,10 @@
"error copying chars", ex);
}
}
-
+
//*********************************************************************
// Utility methods
-
+
/**
* Evaluate elexprvalue
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/logging/TestLifecycleModule.java b/appserver/tests/v2-tests/appserv-tests/sqetests/logging/TestLifecycleModule.java
index a60bfa0..78e98a0 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/logging/TestLifecycleModule.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/logging/TestLifecycleModule.java
@@ -27,53 +27,53 @@
public class TestLifecycleModule implements LifecycleListener {
- // receive a server lifecycle event
+ // receive a server lifecycle event
public void handleEvent(LifecycleEvent event) throws ServerLifecycleException {
- LifecycleEventContext ctx = event.getLifecycleEventContext();
+ LifecycleEventContext ctx = event.getLifecycleEventContext();
if (LifecycleEvent.INIT_EVENT == event.getEventType()) {
- System.out.println("*");
- System.out.println("*");
+ System.out.println("*");
+ System.out.println("*");
ctx.log("TestLifecycleModule: INIT_EVENT PASSED");
- System.out.println("*");
- System.out.println("*");
+ System.out.println("*");
+ System.out.println("*");
return;
}
if (LifecycleEvent.STARTUP_EVENT == event.getEventType()) {
- System.out.println("*");
- System.out.println("*");
+ System.out.println("*");
+ System.out.println("*");
ctx.log("TestLifecycleModule: STARTUP_EVENT PASSED");
- System.out.println("*");
- System.out.println("*");
+ System.out.println("*");
+ System.out.println("*");
return;
}
if (LifecycleEvent.READY_EVENT == event.getEventType()) {
- System.out.println("*");
- System.out.println("*");
+ System.out.println("*");
+ System.out.println("*");
ctx.log("TestLifecycleModule: READY_EVENT PASSED");
- System.out.println("*");
- System.out.println("*");
+ System.out.println("*");
+ System.out.println("*");
return;
}
if (LifecycleEvent.SHUTDOWN_EVENT== event.getEventType()) {
- System.out.println("*");
- System.out.println("*");
+ System.out.println("*");
+ System.out.println("*");
ctx.log("TestLifecycleModule: SHUTDOWN_EVENT PASSED");
- System.out.println("*");
- System.out.println("*");
+ System.out.println("*");
+ System.out.println("*");
return;
}
if (LifecycleEvent.TERMINATION_EVENT == event.getEventType()) {
- System.out.println("*");
- System.out.println("*");
+ System.out.println("*");
+ System.out.println("*");
ctx.log("TestLifecycleModule: TERMINATION_EVENT PASSED");
- System.out.println("*");
- System.out.println("*");
+ System.out.println("*");
+ System.out.println("*");
return;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/logging/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/logging/build.properties
index 861ba3c..d4a5d5c 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/logging/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/logging/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="logging"/>
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="classname" value="TestLifecycleModule"/>
+<property name="classname" value="TestLifecycleModule"/> \u0020
<property name="modulename" value="TestLifecycleModule"/>
<property name="servername" value="server"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/logging/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/logging/build.xml
index 636eb26..0dabbb1 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/logging/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/logging/build.xml
@@ -30,14 +30,14 @@
&commonBuild;
&commonRun;
&testproperties;
-
+
<target name="all" depends="build,setup,restart,unsetup"/>
<target name="run-test" depends="build,setup,restart"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<target name="setup">
<antcall target="create-lifecycle"/>
<antcall target="set-lifecycle-classpath"/>
@@ -91,7 +91,7 @@
<target name="unsetup">
<antcall target="delete-lifecycle"/>
</target>
-
+
<target name="delete-lifecycle" depends="init-common">
<echo message="Deleting Life Cycle Module ${modulename}"/>
<exec executable="${ASADMIN}" failonerror="false">
@@ -108,8 +108,8 @@
</target>
<target name="build" depends="compile">
- </target>
-
+ </target>
+
<target name="usage">
<antcall target="usage-common"/>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/management/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/management/build.xml
index 05634a3..c39d17a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/management/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/management/build.xml
@@ -27,49 +27,49 @@
<param name="mejb-target" value="all"/>
</antcall>
</target>
-
+
<target name="run-test">
<antcall target="mejbtests">
<param name="mejb-target" value="run-test"/>
</antcall>
</target>
-
+
<target name="clean">
<antcall target="mejbtests">
<param name="mejb-target" value="clean"/>
</antcall>
</target>
-
+
<target name="build">
<antcall target="mejbtests">
<param name="mejb-target" value="build"/>
</antcall>
</target>
-
+
<target name="deploy">
<antcall target="mejbtests">
<param name="mejb-target" value="deploy"/>
</antcall>
</target>
-
+
<target name="undeploy">
<antcall target="mejbtests">
<param name="mejb-target" value="undeploy"/>
</antcall>
</target>
-
+
<target name="run">
<antcall target="mejbtests">
<param name="mejb-target" value="run"/>
</antcall>
</target>
-
+
<target name="setup">
<antcall target="mejbtests">
<param name="mejb-target" value="setup"/>
</antcall>
</target>
-
+
<target name="unsetup">
<antcall target="mejbtests">
<param name="mejb-target" value="unsetup"/>
@@ -90,7 +90,7 @@
</target>
<target name="usage">
- <echo> Usage:
+ <echo> Usage:
======== Targets by execution granularity =========
ant clean (Cleans all management tests)
@@ -107,11 +107,11 @@
ant all (Executes all the mejb tests)
===== Targets by technoloy and execution granularity ======
- Note: Run the command of the following type:
+ Note: Run the command of the following type:
% ant mejb -Dmejb-target=clean
to run the 'clean' target for 'stateless' tests
- </echo>
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/management/mejb/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/management/mejb/build.properties
index 344d7c5..3b1b8b1 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/management/mejb/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/management/mejb/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="management-mejb"/>
-<property name="appname" value="${module}"/>
+<property name="appname" value="${module}"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="management-mejbClient"/>
+<property name="test.client"\u0020
+ value="management-mejbClient"/>
<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="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="verbose.mode" value="false"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/management/mejb/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/management/mejb/build.xml
index 2ebb146..eb82261 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/management/mejb/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/management/mejb/build.xml
@@ -33,16 +33,16 @@
<target name="run-test" depends="clean,build,deploy,run,undeploy"/>
<target name="setup">
- <antcall target="create-file-users"/>
+ <antcall target="create-file-users"/>
</target>
<target name="unsetup">
- <antcall target="delete-file-users"/>
+ <antcall target="delete-file-users"/>
</target>
<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"/>
@@ -51,13 +51,13 @@
<target name="build" depends="compile">
<antcall target="appclient-jar-common">
- <param name="appclientjar.classes"
+ <param name="appclientjar.classes"
value="**/*Client*.class" />
- </antcall>
+ </antcall>
<antcall target="ear-common"/>
- </target>
-
- <target name="deploy"
+ </target>
+
+ <target name="deploy"
depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -66,12 +66,12 @@
<antcall target="runclient-common">
<param name="appclient.application.args" value="${verbose.mode}"/>
</antcall>
-
+
</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/v2-tests/appserv-tests/sqetests/management/mejb/client/Client.java b/appserver/tests/v2-tests/appserv-tests/sqetests/management/mejb/client/Client.java
index 70f8def..0b7913e 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/management/mejb/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/management/mejb/client/Client.java
@@ -27,59 +27,59 @@
import com.sun.ejte.ccl.reporter.SimpleReporterAdapter;
public class Client {
-
+
// consts
public static String kTestNotRun = "TEST NOT RUN";
public static String kTestPassed = "TEST PASSED";
public static String kTestFailed = "TEST FAILED";
public boolean DEBUG = false;
-
+
String jndiName = "ejb/mgmt/MEJB";
- private static SimpleReporterAdapter stat =
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
-
+
public static void main (String[] args) {
stat.addDescription("management-mejb");
Client client = new Client(args);
client.doTest();
stat.printSummary("management-mejb");
}
-
+
public Client(String[] args) {
String debug=args[0];
- if(debug.equalsIgnoreCase("false"))
- DEBUG=false;
- if(debug.equalsIgnoreCase("true"))
- DEBUG=true;
- }
+ if(debug.equalsIgnoreCase("false"))
+ DEBUG=false;
+ if(debug.equalsIgnoreCase("true"))
+ DEBUG=true;
+ }
-
-
+
+
public String doTest() {
-
+
boolean pass = true;
String res = kTestNotRun;
-
+
try {
-
+
Context ic = new InitialContext();
System.out.println("***Created initial context");
-
+
java.lang.Object objref = ic.lookup("ejb/mgmt/MEJB");
System.out.println("***Looked up ManagementHome!!");
-
+
ManagementHome home = (ManagementHome)PortableRemoteObject.narrow(
objref, ManagementHome.class);
System.out.println("***Narrowed ManagementHome!!");
-
+
Management mejb = home.create();
System.out.println("***Got the MEJB!!");
-
+
String domain = mejb.getDefaultDomain();
System.out.println("***MEJB default domain = "+domain);
int mbeanCount = mejb.getMBeanCount().intValue();
System.out.println("***MBeanCount = "+mbeanCount);
-
+
// Print attributes of all MBeans
ObjectName query = new ObjectName("*:*");
Set mbeanNames = mejb.queryNames(query, null);
@@ -90,23 +90,23 @@
}
if(DEBUG){
System.out.println("Test running in verbose mode");
- printConsoleOutput(mbeanNames,mejb);
+ printConsoleOutput(mbeanNames,mejb);
}
mejb.remove();
if ( pass ) {
res = kTestPassed;
System.out.println("MEJB Test passed");
stat.addStatus("MEJB Test", stat.PASS);
-
+
} else {
res = kTestFailed;
System.out.println("MEJB Test failed");
stat.addStatus("MEJB Test", stat.FAIL);
-
+
}
-
+
return res;
-
+
} catch(NamingException ne){
System.out.println("***Exception while initializing context.\n");
ne.printStackTrace();
@@ -117,19 +117,19 @@
res = kTestFailed;
return res;
}
- }
-
+ }
+
public void printConsoleOutput(Set mbeanNames, Management managementbean){
Set mbeanNamesSet=mbeanNames;
Management mejb=managementbean;
-
+
try{
Iterator it = mbeanNamesSet.iterator();
while ( it.hasNext() ) {
-
+
ObjectName name = (ObjectName)it.next();
System.out.println("ObjectName = "+name);
-
+
// Construct list of attr names
MBeanInfo info = mejb.getMBeanInfo(name);
MBeanAttributeInfo[] attrInfo = info.getAttributes();
@@ -138,15 +138,15 @@
attrNames[i] = attrInfo[i].getName();
}
// Get attr values from MEJB and print them
-
+
AttributeList attrs = mejb.getAttributes(name, attrNames);
for ( int i=0; i<attrs.size(); i++ ) {
-
+
if (attrs.get(i) != null) {
System.out.println("TYPE = " +
attrs.get(i).getClass().getName());
}
-
+
if (attrs.get(i) instanceof Attribute) {
Attribute attr = (Attribute)attrs.get(i);
System.out.println("Attribute name = "+attr.getName()
@@ -164,6 +164,6 @@
}
//System.out.println("=======================");
}
-
-
+
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/build.properties
index 1dc749c..c684072 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/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="sec"/>
<property name="app.type" value="application"/>
@@ -26,4 +26,4 @@
<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="appname" value="sec-methodperms"/>
+<property name="appname" value="sec-methodperms"/> \u0020
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/build.xml
index 15c645e..c8bcaa8 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/build.xml
@@ -31,7 +31,7 @@
&commonBuild;
&commonRun;
&testProperties;
-
+
<target name="all" depends="build, setup, deploy,run, undeploy, unsetup"/>
<!-- assumes that create-users has been called before -->
<!-- run-test target added to have a separate setup/unsetup commonly -->
@@ -52,7 +52,7 @@
</target>
<target name="build" depends="compile">
-<!-- <property name="ejbjar.classes" value="**/*Home*.class,**/*Bean*.class,**/*Data*.class,*.dbschema"/>
+<!-- <property name="ejbjar.classes" value="**/*Home*.class,**/*Bean*.class,**/*Data*.class,*.dbschema"/>
-->
<antcall target="build-ear-common"/>
</target>
@@ -66,13 +66,13 @@
<exec executable="${APPCLIENT}">
<arg value="-client" />
<arg value="${assemble.dir}/${appname}AppClient.jar"/>
- <arg value="-xml"/>
- <arg value="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
- <arg value="-textauth"/>
- <arg value="-user"/>
- <arg value="j2ee"/>
- <arg value="-password"/>
- <arg value="j2ee"/>
+ <arg value="-xml"/>
+ <arg value="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ <arg value="-textauth"/>
+ <arg value="-user"/>
+ <arg value="j2ee"/>
+ <arg value="-password"/>
+ <arg value="j2ee"/>
</exec>
</target>
@@ -95,12 +95,12 @@
<target name="create-user">
<antcall target="create-user-common">
- <param name="user" value="j2ee"/>
- <param name="password" value="j2ee"/>
- <param name="groups" value="employee"/>
+ <param name="user" value="j2ee"/>
+ <param name="password" value="j2ee"/>
+ <param name="groups" value="employee"/>
</antcall>
</target>
-
+
<target name="delete-user">
<!-- remove test users, just cleanup. -->
<antcall target="delete-user-common">
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/client/MethodPermClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/client/MethodPermClient.java
index efa3d92..02c2c93 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/client/MethodPermClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/client/MethodPermClient.java
@@ -37,90 +37,90 @@
System.out.print("-->EJB method permissions!");
stat.addDescription("EJB method permissions");
client.doTest();
- stat.printSummary("Authorize_methodperms");
-
+ stat.printSummary("Authorize_methodperms");
+
}
-
+
public MethodPermClient (String[] args) {
//super(args);
}
-
+
public String doTest() {
-
- MethodPermRemote hr=null;
+
+ MethodPermRemote hr=null;
String res=null;
Context ic = null;
LoginContext lc=null;
MethodPermRemoteHome home=null;
- try{
- ic = new InitialContext();
-// Security.setProperty("policy.allowSystemProperty", "true");
- lc = new LoginContext();
- lc.login("j2ee","j2ee");
- // create EJB using factory from container
+ try{
+ ic = new InitialContext();
+// Security.setProperty("policy.allowSystemProperty", "true");
+ lc = new LoginContext();
+ lc.login("j2ee","j2ee");
+ // create EJB using factory from container
java.lang.Object objref = ic.lookup("MyMethodPerm");
-
- System.err.println("Looked up home!!");
-
- home = (MethodPermRemoteHome)PortableRemoteObject.narrow(
- objref, MethodPermRemoteHome.class);
- System.err.println("Narrowed home!!");
-
- hr = home.create(helloStr);
- System.err.println("Got the EJB!!");
+
+ System.err.println("Looked up home!!");
+
+ home = (MethodPermRemoteHome)PortableRemoteObject.narrow(
+ objref, MethodPermRemoteHome.class);
+ System.err.println("Narrowed home!!");
+
+ hr = home.create(helloStr);
+ System.err.println("Got the EJB!!");
}catch (Exception ex) {
ex.printStackTrace();
//res = Tester.kTestFailed;
stat.addStatus("Sec::Authorize_methodperms Testsuite",stat.FAIL);
res="FAIL";
}
- // invoke 3 overloaded methods on the EJB
+ // invoke 3 overloaded methods on the EJB
try{
- System.out.println ("Calling authorized method - authorizedMethod");
- System.out.println(hr.authorizedMethod());
+ System.out.println ("Calling authorized method - authorizedMethod");
+ System.out.println(hr.authorizedMethod());
- System.out.println ("Calling authorized method - authorizedMethod - hi 129");
- System.out.println(hr.authorizedMethod("Hi", 129));
-
- System.out.println ("Calling authorized method - authorizedMethod 115");
- System.out.println(hr.authorizedMethod(115));
+ System.out.println ("Calling authorized method - authorizedMethod - hi 129");
+ System.out.println(hr.authorizedMethod("Hi", 129));
- //res = Tester.kTestPassed;
+ System.out.println ("Calling authorized method - authorizedMethod 115");
+ System.out.println(hr.authorizedMethod(115));
+
+ //res = Tester.kTestPassed;
stat.addStatus("Sec::Authorize_methodperms Test1-Calling authorized method",stat.PASS);
-
- } catch(Exception re){
+
+ } catch(Exception re){
re.printStackTrace();
- System.out.println("Test Failed");
+ System.out.println("Test Failed");
stat.addStatus("Sec::Authorize_methodperms Test1-Calling authorized method",stat.FAIL);
res="FAIL";
- //return Tester.kTestFailed;
- }
- try{
- // invoke unauthorized method on the EJB
- System.out.println ("Calling unauthorized method - sayGoodBye");
- System.out.println(hr.sayGoodbye());
- System.out.println (" Test failed: able to call good bye method!");
- //return Tester.kTestFailed;
+ //return Tester.kTestFailed;
+ }
+ try{
+ // invoke unauthorized method on the EJB
+ System.out.println ("Calling unauthorized method - sayGoodBye");
+ System.out.println(hr.sayGoodbye());
+ System.out.println (" Test failed: able to call good bye method!");
+ //return Tester.kTestFailed;
stat.addStatus("Sec::Authorize_methodperms Test2-Calling unauthorized method",stat.FAIL);
res="FAIL";
- } catch(Exception gbye){
- //res = Tester.kTestPassed;
+ } catch(Exception gbye){
+ //res = Tester.kTestPassed;
stat.addStatus("Sec::Authorize_methodperms Test2-Calling unauthorized method",stat.PASS);
res="PASS";
- }
+ }
try{
// invoke method on the EJB not authorized
System.out.println ("Calling unauthorized method - unauthorizedMethod");
hr.unauthorizedMethod();
-
+
//res = Tester.kTestFailed;
stat.addStatus("Sec::Authorize_methodperms Test3-expected Exception-Calling unauthorized method",stat.FAIL);
res="FAIL";
-
+
} catch (RemoteException remex) {
System.out.println("Caught expected RemoteException from unauthorizedMethod()");
//res = Tester.kTestPassed;
@@ -130,11 +130,11 @@
stat.addStatus("Sec::Authorize_methodperms Test3-expected Exception-Calling unauthorized method",stat.FAIL);
res="FAIL";
}
- return res;
-
+ return res;
+
}
-
+
public final static String helloStr = "Hello MethodPerm!!!";
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/descriptor/ejb-jar.xml
index b6b84a1..6d7f5ac 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/descriptor/ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/descriptor/ejb-jar.xml
@@ -70,7 +70,7 @@
<method-param>java.lang.String</method-param>
<method-param>int</method-param>
</method-params>
- </method>
+ </method>
<method>
<ejb-name>MethodPermissionsBean</ejb-name>
<method-intf>Remote</method-intf>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermBean.java
index 1803225..4984e39 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermBean.java
@@ -17,78 +17,78 @@
package com.sun.s1peqe.security.authoriz.methodperms;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import jakarta.ejb.SessionBean;
import jakarta.ejb.SessionContext;
public class MethodPermBean implements SessionBean {
private String str;
private SessionContext sc;
-
+
public MethodPermBean(){}
-
+
public void ejbCreate(String str) throws RemoteException {
-
- System.out.println("In ejbCreate !!");
+
+ System.out.println("In ejbCreate !!");
this.str = str;
-
+
}
-
+
public String authorizedMethod() throws RemoteException {
-
- System.out.println("MethodPerm Bean - inside authorizedMethod() !");
- System.out.println("CALLER PRINCIPAL: " + sc.getCallerPrincipal());
- boolean mgr = sc.isCallerInRole("MGR");
- boolean admin = sc.isCallerInRole("ADMIN");
- boolean staff = sc.isCallerInRole("STAFF");
- boolean emp = sc.isCallerInRole("EMP");
- StringBuffer sbuf = new StringBuffer();
- sbuf.append("\nIs CallerInRole: MGR(shud be true) = " + mgr);
- sbuf.append("\nIs CallerInRole: ADMIN(shud b false) = " + admin);
- sbuf.append("\nIs CallerInRole: STAFF(shud b true) = " + staff);
- sbuf.append("\nIs CallerInRole: EMP(shud b true) = " + emp);
- System.out.println (sbuf.toString());
- if(mgr && !admin && staff && emp)
- return sbuf.toString();
- else
- throw new RemoteException("Caller in role failed ");
-
+
+ System.out.println("MethodPerm Bean - inside authorizedMethod() !");
+ System.out.println("CALLER PRINCIPAL: " + sc.getCallerPrincipal());
+ boolean mgr = sc.isCallerInRole("MGR");
+ boolean admin = sc.isCallerInRole("ADMIN");
+ boolean staff = sc.isCallerInRole("STAFF");
+ boolean emp = sc.isCallerInRole("EMP");
+ StringBuffer sbuf = new StringBuffer();
+ sbuf.append("\nIs CallerInRole: MGR(shud be true) = " + mgr);
+ sbuf.append("\nIs CallerInRole: ADMIN(shud b false) = " + admin);
+ sbuf.append("\nIs CallerInRole: STAFF(shud b true) = " + staff);
+ sbuf.append("\nIs CallerInRole: EMP(shud b true) = " + emp);
+ System.out.println (sbuf.toString());
+ if(mgr && !admin && staff && emp)
+ return sbuf.toString();
+ else
+ throw new RemoteException("Caller in role failed ");
+
}
-
+
public String authorizedMethod(String s, int i) throws RemoteException {
-
- System.out.println("MethodPerm Bean - inside authorizedMethod(String s, int i)!!");
- //System.out.println("Is CallerInRole: " + sc.isCallerInRole("MGR"));
- //System.out.println("Is CallerInRole: " + sc.isCallerInRole("STAFF"));
- //System.out.println("Is CallerInRole: " + sc.isCallerInRole("EMP"));
- //System.out.println("Is CallerInRole: " + sc.isCallerInRole("ADMIN"));
+
+ System.out.println("MethodPerm Bean - inside authorizedMethod(String s, int i)!!");
+ //System.out.println("Is CallerInRole: " + sc.isCallerInRole("MGR"));
+ //System.out.println("Is CallerInRole: " + sc.isCallerInRole("STAFF"));
+ //System.out.println("Is CallerInRole: " + sc.isCallerInRole("EMP"));
+ //System.out.println("Is CallerInRole: " + sc.isCallerInRole("ADMIN"));
return str + " " + s + " " + i;
-
+
}
-
+
public String authorizedMethod(int i) throws RemoteException {
-
- System.out.println("MethodPerm Bean - inside authorizedMethod(int i)!!!");
+
+ System.out.println("MethodPerm Bean - inside authorizedMethod(int i)!!!");
return str + " " + i;
-
+
}
public void unauthorizedMethod() throws RemoteException {
-
- System.out.println("MethodPerm Bean - inside unauthorized method!!!!");
-
+
+ System.out.println("MethodPerm Bean - inside unauthorized method!!!!");
+
}
-
+
public String sayGoodbye() throws RemoteException {
-
- System.out.println("MethodPerm Bean - inside sayGoodbye()!!!!!");
+
+ System.out.println("MethodPerm Bean - inside sayGoodbye()!!!!!");
return str + " sayGoodbye";
-
+
}
-
+
public void setSessionContext(SessionContext sc) {
-
- this.sc = sc;
+
+ this.sc = sc;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermRemote.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermRemote.java
index f4adedd..151b781 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermRemote.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermRemote.java
@@ -28,5 +28,5 @@
public String authorizedMethod(int j) throws RemoteException;
public void unauthorizedMethod() throws RemoteException;
public String sayGoodbye() throws RemoteException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermRemoteHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermRemoteHome.java
index 4be614b..5e51382 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermRemoteHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/authoriz/methodperms/ejb/MethodPermRemoteHome.java
@@ -27,5 +27,5 @@
public interface MethodPermRemoteHome extends EJBHome {
public MethodPermRemote create (String str) throws RemoteException, CreateException;
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/build.xml
index 7177d7b..c678c32 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/build.xml
@@ -34,7 +34,7 @@
<echo message="================================================"/>
<echo message=" SJSAS Quicklook: Security Tests "/>
<echo message="================================================"/>
-
+
<ant dir="wss" target="all"/>
<ant dir="authoriz/methodperms" target="all" />
<ant dir="simple" target="all"/>
@@ -68,10 +68,10 @@
<target name="usage">
<echo>
- ant all --> Setup and Run all tests
- ant setup --> Setup configuration for all tests
- ant run-test --> Run all tests without setup
- ant unsetup --> Unsetup configuration for all tests
+ ant all --> Setup and Run all tests
+ ant setup --> Setup configuration for all tests
+ ant run-test --> Run all tests without setup
+ ant unsetup --> Unsetup configuration for all tests
</echo>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/build.properties
index f4760e7..107ffc5 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/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="sec"/>
<!--
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/build.xml
index bfbcedb..9cc745c 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/build.xml
@@ -47,7 +47,7 @@
</target>
<!--
- Quick look test run for integrating with top level for running subset of tests.
+ Quick look test run for integrating with top level for running subset of tests.
-->
<target name="quick-look" depends="init-common,setup">
<ant antfile="build.xml" dir="daomanager" target="all" />
@@ -57,19 +57,19 @@
<target name="usage">
<!--<antcall target="usage-common"/> -->
- <echo message="=============================================="/>
- <echo message="****** Security Testsuite (BankAdmin App) *****"/>
- <echo message="Standard Commands:"/>
- <echo message="ant quick-look -->build,deploy,setup and run a single test, daomanager from bankapp"/>
- <echo message="ant all -->build,deploy,setup and run the testsuite"/>
- <echo message=" "/>
- <echo message="Optional Commands:"/>
- <echo message="ant setup -->Does the serverside config"/>
- <echo message="ant restart-server -->Restarts appserver"/>
- <echo message="ant create-file-users-->Creates security file realm users/groups"/>
- <echo message="ant create-jmsresource -->Configures all the required jms resources"/>
- <echo message="ant config-db -->Configures the DB"/>
- <echo message="=============================================="/>
+ <echo message="=============================================="/>
+ <echo message="****** Security Testsuite (BankAdmin App) *****"/>
+ <echo message="Standard Commands:"/>
+ <echo message="ant quick-look -->build,deploy,setup and run a single test, daomanager from bankapp"/>
+ <echo message="ant all -->build,deploy,setup and run the testsuite"/>
+ <echo message=" "/>
+ <echo message="Optional Commands:"/>
+ <echo message="ant setup -->Does the serverside config"/>
+ <echo message="ant restart-server -->Restarts appserver"/>
+ <echo message="ant create-file-users-->Creates security file realm users/groups"/>
+ <echo message="ant create-jmsresource -->Configures all the required jms resources"/>
+ <echo message="ant config-db -->Configures the DB"/>
+ <echo message="=============================================="/>
</target>
@@ -113,7 +113,7 @@
<ant antfile="build.xml" dir="mesgprovider" target="run" />
-->
</target>
-
+
<!-- unsetup all the resources -->
<target name="unsetup" depends="init-common">
<antcall target="delete-file-users"/>
@@ -157,7 +157,7 @@
<target name="delete-jmsresources-local" depends="init-common">
<exec executable="${ASADMIN}" failonerror="false">
- <arg line="delete-jms-resource"/>
+ <arg line="delete-jms-resource"/>
<arg line="${as.props}"/>
<arg line="--instance ${appserver.instance.name}"/>
<arg line="jms/adminQueue"/>
@@ -181,45 +181,45 @@
<arg line="jms/MyQueueConnectionFactory"/>
</exec>
<exec executable="${ASADMIN}" failonerror="false">
- <arg line="delete-jmsdest"/>
+ <arg line="delete-jmsdest"/>
<arg line="${as.props}"/>
<arg line="--instance ${appserver.instance.name}"/>
<arg line="--desttype jakarta.jms.Queue"/>
<arg line="MyQueue"/>
</exec>
<exec executable="${ASADMIN}" failonerror="false">
- <arg line="delete-jmsdest"/>
+ <arg line="delete-jmsdest"/>
<arg line="${as.props}"/>
<arg line="--instance ${appserver.instance.name}"/>
<arg line="--desttype jakarta.jms.Queue"/>
<arg line="adminQueue"/>
- </exec>
+ </exec>
</target>
<!--target for creating the file users -->
<target name="create-file-users" depends="init-common">
- <antcall target="create-user-common">
- <param name="user" value="scott"/>
- <param name="password" value="j2ee"/>
- <param name="groups" value="ejb-test"/>
- </antcall>
- <antcall target="create-user-common">
- <param name="user" value="deepa"/>
- <param name="password" value="deepa"/>
- <param name="groups" value="staff"/>
- </antcall>
+ <antcall target="create-user-common">
+ <param name="user" value="scott"/>
+ <param name="password" value="j2ee"/>
+ <param name="groups" value="ejb-test"/>
+ </antcall>
+ <antcall target="create-user-common">
+ <param name="user" value="deepa"/>
+ <param name="password" value="deepa"/>
+ <param name="groups" value="staff"/>
+ </antcall>
</target>
<!--target for deleting the file users -->
<target name="delete-file-users" depends="init-common">
- <antcall target="delete-user-common">
- <param name="user" value="scott"/>
- <param name="groups" value="ejb-test"/>
- </antcall>
- <antcall target="delete-user-common">
- <param name="user" value="deepa"/>
- <param name="groups" value="staff"/>
- </antcall>
+ <antcall target="delete-user-common">
+ <param name="user" value="scott"/>
+ <param name="groups" value="ejb-test"/>
+ </antcall>
+ <antcall target="delete-user-common">
+ <param name="user" value="deepa"/>
+ <param name="groups" value="staff"/>
+ </antcall>
</target>
@@ -241,20 +241,20 @@
<param name="jms.resource.type" value="jakarta.jms.Queue"/>
<param name="jms.resource.name" value="jms/MyQueue"/>
</antcall>
-
+
</target>
-
+
<!-- Target for creating the db and configuration of db" -->
<target name="config-db">
- <antcall target="execute-sql-common">
- <param name="sql.file" value="sql/bankadmin_pointbase.sql"/>
- </antcall>
+ <antcall target="execute-sql-common">
+ <param name="sql.file" value="sql/bankadmin_pointbase.sql"/>
+ </antcall>
</target>
<!-- Target for creating the db" -->
<target name="create-db" depends="init-common">
- <echo message="Creating the sample db - ${db.url}"/>
+ <echo message="Creating the sample db - ${db.url}"/>
<exec executable="${db.root}/client_tools/PB_Commander.sh">
<arg line="${db.driver}"/>
<arg line="${db.url}"/>
@@ -272,32 +272,32 @@
<!-- creating the outfile with zero size to have the file during jdbc setup -->
<target name="init" depends="init-common">
- <mkdir dir="${build.classes.dir}"/>
+ <mkdir dir="${build.classes.dir}"/>
<touch file="${build.classes.dir}/setupDBTables.out"/>
</target>
- <target name="setup"
+ <target name="setup"
depends="init,create-file-users,create-jmsresources,deploy-jdbc-common,create-persistence-resource-common,reconfig-common,config-db">
<mkdir dir="${build.classes.dir}"/>
- <echo message="Configured the security file realm, jms resources, jdbc resources, populating db, restarting the server...done"/>
+ <echo message="Configured the security file realm, jms resources, jdbc resources, populating db, restarting the server...done"/>
</target>
-
- <target name="setup-norestart"
+
+ <target name="setup-norestart"
depends="init,create-file-users,create-jmsresources,deploy-jdbc-common,create-persistence-resource-common,config-db">
<mkdir dir="${build.classes.dir}"/>
- <echo message="Configured the security file realm, jms resources, jdbc resources, populating db...done"/>
+ <echo message="Configured the security file realm, jms resources, jdbc resources, populating db...done"/>
</target>
<!--
Clean the DB
-->
<target name="clean-db" depends="init-common,create-dboutfile">
- <antcall target="execute-sql-common">
+ <antcall target="execute-sql-common">
<param name="sql.file" value="sql/bankadmin_drop_pointbase.sql"/>
</antcall>
</target>
-<!--
+<!--
Create the outfile before executing the sql
-->
<target name="create-dboutfile" depends="init-common">
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/build.properties
index 7470989..714fa67a 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/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="sec"/>
<property name="app.type" value="application"/>
@@ -28,4 +28,4 @@
<property name="sun-cmp-dbschema" value="descriptor/sec_bankadmin_schema.dbschema"/>
<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="sec-daomanager"/>
+<property name="appname" value="sec-daomanager"/> \u0020
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/build.xml
index 70ced57..c8aae11 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/build.xml
@@ -29,7 +29,7 @@
&commonSetup;
&commonBuild;
&testProperties;
-
+
<target name="all" depends="build,deploy,run,undeploy"/>
<target name="run-test" depends="build,deploy,run,undeploy"/>
@@ -48,7 +48,7 @@
</target>
<target name="build" depends="compile">
-<!-- <property name="ejbjar.classes" value="**/*Home*.class,**/*Bean*.class,**/*Data*.class,*.dbschema"/>
+<!-- <property name="ejbjar.classes" value="**/*Home*.class,**/*Bean*.class,**/*Data*.class,*.dbschema"/>
-->
<antcall target="build-ear"/>
</target>
@@ -57,11 +57,11 @@
<antcall target="deploy-common"/>
<!-- As this app contain common ejbs to be shared by other apps, copying the client.jar to instance lib directory and restart the instance-->
- <!--
- commented as other dependent apps are not putting under this workspace directory
+ <!--
+ commented as other dependent apps are not putting under this workspace directory
<copy file="${assemble.dir}/${appname}AppClient.jar" tofile="${env.S1AS_HOME}/domains/domain1/${appserver.instance.name}/lib/${appname}AppClient.jar"/>
<ant antfile="build.xml" dir="../" target="restart-server"/>
- -->
+ -->
</target>
@@ -72,11 +72,11 @@
<arg value="${assemble.dir}/${appname}AppClient.jar"/>
<arg value="-xml"/>
<arg value="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
- <arg value="-textauth"/>
- <arg value="-user"/>
- <arg value="scott"/>
- <arg value="-password"/>
- <arg value="j2ee"/>
+ <arg value="-textauth"/>
+ <arg value="-user"/>
+ <arg value="scott"/>
+ <arg value="-password"/>
+ <arg value="j2ee"/>
</exec>
</target>
@@ -159,5 +159,5 @@
</antcall>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/client/BeanTestClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/client/BeanTestClient.java
index 558c5fc..3862fa7 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/client/BeanTestClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/client/BeanTestClient.java
@@ -35,7 +35,7 @@
* @version 1.0
*/
-public class BeanTestClient
+public class BeanTestClient
{
private Properties beanprops=null;
private javax.naming.Context jndi=null;
@@ -54,12 +54,12 @@
this.beanprops=p;
}
- public void setupJNDIContext(Properties p)
+ public void setupJNDIContext(Properties p)
{
try
{
jndi=new javax.naming.InitialContext();
- }catch(Exception e)
+ }catch(Exception e)
{
e.printStackTrace();
}
@@ -79,13 +79,13 @@
return (EJBHome)ejbHome;
}
-
+
public EJBObject getRemoteInterface(EJBHome ejbHome) {
System.out.println("inside getting remote interface");
try{
ejbObject=((CustomerRemoteHome)ejbHome).createCustomer(customerID,customerID);
- System.out.println("Remote interface of Customer Bean"+ejbObject.getClass().getName());
-
+ System.out.println("Remote interface of Customer Bean"+ejbObject.getClass().getName());
+
}catch(jakarta.ejb.DuplicateKeyException e) {
System.out.println("Exception:Customer already exists");
}
@@ -94,66 +94,66 @@
}
return (EJBObject)ejbObject;
}
-
- public void runTestClient()
+
+ public void runTestClient()
{
- try
- {
- Object obj=(CustomerRemoteHome)jndi.lookup("java:comp/env/ejb/CustomerBean");
- ejbHome=(CustomerRemoteHome)PortableRemoteObject.narrow(obj,com.sun.s1peqe.security.integration.bankadmin.daomanager.CustomerRemoteHome.class);
- System.out.println("Home interface of Customer Bean"+ejbHome.getClass().getName());
- }catch(Throwable e)
- {
- e.printStackTrace();
- }
- System.out.println("inside getting remote interface");
- try{
- try{ejbObject=((CustomerRemoteHome)ejbHome).findByPrimaryKey(customerID);
- }catch(jakarta.ejb.ObjectNotFoundException e){System.out.println("customer does not exist");}
- if(ejbObject==null)
- {
- System.out.println("Creating customer..."+customerID);
- ejbObject=((CustomerRemoteHome)ejbHome).createCustomer(customerID,customerID);
- }
- System.out.println("Remote interface of Customer Bean"+ejbObject.getClass().getName());
- boolean ret=ejbObject.TestCallerInRole();
- if(ret==true)
- stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.PASS);
- else if(ret==false)
- stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.FAIL);
- else
- {
- stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.FAIL);
- System.out.println("Test did not get run");
- }
+ try
+ {
+ Object obj=(CustomerRemoteHome)jndi.lookup("java:comp/env/ejb/CustomerBean");
+ ejbHome=(CustomerRemoteHome)PortableRemoteObject.narrow(obj,com.sun.s1peqe.security.integration.bankadmin.daomanager.CustomerRemoteHome.class);
+ System.out.println("Home interface of Customer Bean"+ejbHome.getClass().getName());
+ }catch(Throwable e)
+ {
+ e.printStackTrace();
+ }
+ System.out.println("inside getting remote interface");
+ try{
+ try{ejbObject=((CustomerRemoteHome)ejbHome).findByPrimaryKey(customerID);
+ }catch(jakarta.ejb.ObjectNotFoundException e){System.out.println("customer does not exist");}
+ if(ejbObject==null)
+ {
+ System.out.println("Creating customer..."+customerID);
+ ejbObject=((CustomerRemoteHome)ejbHome).createCustomer(customerID,customerID);
+ }
+ System.out.println("Remote interface of Customer Bean"+ejbObject.getClass().getName());
+ boolean ret=ejbObject.TestCallerInRole();
+ if(ret==true)
+ stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.PASS);
+ else if(ret==false)
+ stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.FAIL);
+ else
+ {
+ stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.FAIL);
+ System.out.println("Test did not get run");
+ }
- }catch (Throwable e) {
- e.printStackTrace();
- }
+ }catch (Throwable e) {
+ e.printStackTrace();
+ }
- try {
- System.out.println("created customer from client"+customerID);
- boolean ret=ejbObject.TestCallerInRole();
- if(ret==true)
- stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.PASS);
- else if(ret==false)
- stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.FAIL);
- else
- {
- stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.FAIL);
- System.out.println("Test did not get run");
- }
-
- }catch(Throwable e) {
- stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.FAIL);
- e.printStackTrace();
- }
+ try {
+ System.out.println("created customer from client"+customerID);
+ boolean ret=ejbObject.TestCallerInRole();
+ if(ret==true)
+ stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.PASS);
+ else if(ret==false)
+ stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.FAIL);
+ else
+ {
+ stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.FAIL);
+ System.out.println("Test did not get run");
+ }
+
+ }catch(Throwable e) {
+ stat.addStatus("JACC:cmp_cmp isCallerInRole",stat.FAIL);
+ e.printStackTrace();
+ }
}
-
+
public void cleanupTests(){
stat.printSummary("cmp_cmpID");
}
-
+
public void run() {
try {
logger.info("inside run method");
@@ -171,7 +171,7 @@
Properties p=null;// we are testing locally only, no properties to test
BeanTestClient testClient=new BeanTestClient(p);
testClient.run();
-
+
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/descriptor/ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/descriptor/ejb-jar.xml
index c7f6640..817fbae 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/descriptor/ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/descriptor/ejb-jar.xml
@@ -45,11 +45,11 @@
</cmp-field>
<primkey-field>accountID</primkey-field>
<security-role-ref>
- <role-name>Manager</role-name>
+ <role-name>Manager</role-name>
<role-link>Manager</role-link>
</security-role-ref>
<security-role-ref>
- <role-name>Administrator</role-name>
+ <role-name>Administrator</role-name>
<role-link>Administrator</role-link>
</security-role-ref>
<security-identity>
@@ -85,11 +85,11 @@
<ejb-link>sec-daomanager-ejb.jar#AccountBean</ejb-link>
</ejb-local-ref>
<security-role-ref>
- <role-name>Manager</role-name>
+ <role-name>Manager</role-name>
<role-link>Manager</role-link>
</security-role-ref>
<security-role-ref>
- <!--<role-name>ADMIN</role-name>-->
+ <!--<role-name>ADMIN</role-name>-->
<role-name>Administrator</role-name>
<role-link>Administrator</role-link>
</security-role-ref>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/descriptor/sun-cmp-mappings.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/descriptor/sun-cmp-mappings.xml
index 2312a2c..f394035 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/descriptor/sun-cmp-mappings.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/descriptor/sun-cmp-mappings.xml
@@ -20,8 +20,8 @@
<sun-cmp-mappings>
<sun-cmp-mapping>
- <schema>sec_bankadmin_schema</schema>
- <entity-mapping>
+ <schema>sec_bankadmin_schema</schema>
+ <entity-mapping>
<ejb-name>CustomerBean</ejb-name>
<table-name>SEC_BANKADMIN_CUSTOMEREJB</table-name>
<cmp-field-mapping>
@@ -41,7 +41,7 @@
</column-pair>
</cmr-field-mapping>
</entity-mapping>
- <entity-mapping>
+ <entity-mapping>
<ejb-name>AccountBean</ejb-name>
<table-name>SEC_BANKADMIN_ACCOUNTEJB</table-name>
<cmp-field-mapping>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountBean.java
index 52f177d..ae8265f 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountBean.java
@@ -23,19 +23,19 @@
public abstract class AccountBean extends EnterpriseBeanLogger implements jakarta.ejb.EntityBean
{
-
+
private static Logger logger = Logger.getLogger("bank.admin");
private static ConsoleHandler ch = new ConsoleHandler();
-
+
public abstract String getAccountID();
public abstract void setAccountID(String id);
-
+
public abstract Double getAmount();
public abstract void setAmount(Double amt);
-
+
public abstract HashMap getPrivileges();
public abstract void setPrivileges(HashMap privileges);
-
+
//Business methods
@@ -74,7 +74,7 @@
toXML("ejbLoad","CMP Account");
}
-
+
public void ejbStore() {
toXML("ejbStore","CMP Account");
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountDataObject.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountDataObject.java
index 69b5757..c1a2b97 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountDataObject.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountDataObject.java
@@ -58,8 +58,8 @@
}
public String toString(){
- return new String(getAccountID());
- }
+ return new String(getAccountID());
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountLocal.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountLocal.java
index 688162e..a26c4e7 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountLocal.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountLocal.java
@@ -20,7 +20,7 @@
public interface AccountLocal extends jakarta.ejb.EJBLocalObject
{
- public AccountDataObject getDAO();
-
+ public AccountDataObject getDAO();
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountLocalHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountLocalHome.java
index 99eb972..da77b6b 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountLocalHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountLocalHome.java
@@ -24,7 +24,7 @@
public interface AccountLocalHome extends jakarta.ejb.EJBLocalHome
{
- public AccountLocal createAccount (AccountDataObject dao)
- throws jakarta.ejb.CreateException;
+ public AccountLocal createAccount (AccountDataObject dao)
+ throws jakarta.ejb.CreateException;
public AccountLocal findByPrimaryKey(String id) throws jakarta.ejb.FinderException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountRemote.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountRemote.java
index c787813..9d99420 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountRemote.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountRemote.java
@@ -20,5 +20,5 @@
public interface AccountRemote extends jakarta.ejb.EJBObject
{
- public AccountDataObject getDAO() throws java.rmi.RemoteException;
+ public AccountDataObject getDAO() throws java.rmi.RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountRemoteHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountRemoteHome.java
index 8dcbdda..7ea84bc 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountRemoteHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/AccountRemoteHome.java
@@ -25,8 +25,8 @@
public interface AccountRemoteHome extends jakarta.ejb.EJBHome
{
- public AccountRemote createAccount (AccountDataObject dao)
- throws jakarta.ejb.CreateException,RemoteException;
+ public AccountRemote createAccount (AccountDataObject dao)
+ throws jakarta.ejb.CreateException,RemoteException;
public AccountRemote findByPrimaryKey(String id) throws jakarta.ejb.FinderException,RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerBean.java
index 619fb2b..802339d 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerBean.java
@@ -30,45 +30,45 @@
AccountLocalHome accountHome=null;
public javax.naming.Context jndiContext=null;
Object objref=null;
-
+
private static Logger logger = Logger.getLogger("bank.admin");
private static ConsoleHandler ch = new ConsoleHandler();
-
+
public abstract String getCustomerID();
public abstract void setCustomerID(String id);
-
+
public abstract String getCustomerName();
public abstract void setCustomerName(String name);
-
+
//relationship fields
-
+
public abstract Collection getAccounts();
public abstract void setAccounts(Collection account);
-
+
//Business methods
public String ejbCreateCustomer(String id,String name)
throws jakarta.ejb.CreateException
{
-
+
toXML("ejbCreateCustomer","Enter");
//if(ejbContext.isCallerInRole("ADMIN"))
if(ejbContext.isCallerInRole("Administrator"))
toXML("ejbCreateCustomer","isCallerInRole: "+"administrator");
else
toXML("ejbCreateCustomer","isCallerInRole: "+"NOT IN administrator");
-
+
setCustomerID(id);
setCustomerName(name);
toXML("ejbCreateCustomer","Created Customer: "+id);
java.security.Principal principal=ejbContext.getCallerPrincipal();
toXML("ejbCreateCustomer","getCallerPrincipal: "+principal);
toXML("ejbCreateCustomer","Exit");
-
+
return null;
}
-
+
public boolean TestCallerInRole()
{
boolean isCallerInRole=false;
@@ -84,7 +84,7 @@
isCallerInRole=false;
}
return isCallerInRole;
-
+
}
public void addAccount(AccountDataObject ado)
@@ -94,12 +94,12 @@
{
java.security.Principal principal=ejbContext.getCallerPrincipal();
toXML("addAccount","getCallerPrincipal: "+ principal);
-
+
if(ejbContext.isCallerInRole("Administrator"))
toXML("addAccount","isCallerInRole: "+"administrator");
else
toXML("addAccount","isCallerInRole: "+"NOT IN administrator");
-
+
logger.info("CustomerBean\t Primary key of acct being added\t"+ado.getAccountID());
AccountLocal accountLocal=accountHome.createAccount(ado);
getAccounts().add(accountLocal);
@@ -142,13 +142,13 @@
addAccount Needs Remote Interface instead of Local,stupud workaround");*/
jndiContext=new javax.naming.InitialContext();
toXML("setEntityContext", "got_JNDIContext");
-
+
objref=jndiContext.lookup("java:comp/env/ejb/Account");
toXML("setEntityContext","Looked_up_Account");
-
+
accountHome=(AccountLocalHome)javax.rmi.PortableRemoteObject.narrow(objref,AccountLocalHome.class);
toXML("setEntityContext","Created Account Home");
-
+
}
catch(Throwable e) {
logXMLException((Exception)e,"SetEntityContext Failed!");
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerLocal.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerLocal.java
index 41409d6..9d3fde6 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerLocal.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerLocal.java
@@ -20,8 +20,8 @@
public interface CustomerLocal extends jakarta.ejb.EJBLocalObject
{
- public String getCustomerName();
- public String getCustomerID();
+ public String getCustomerName();
+ public String getCustomerID();
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerLocalHome.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerLocalHome.java
index e0d9549..d2c79ca 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerLocalHome.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/daomanager/ejb/CustomerLocalHome.java
@@ -24,8 +24,8 @@
public interface CustomerLocalHome extends jakarta.ejb.EJBLocalHome
{
- public CustomerLocal createCustomer (String id,String name)
- throws jakarta.ejb.CreateException;
+ public CustomerLocal createCustomer (String id,String name)
+ throws jakarta.ejb.CreateException;
public CustomerLocal findByPrimaryKey(String id) throws jakarta.ejb.FinderException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/sql/bankadmin_pointbase.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/sql/bankadmin_pointbase.sql
index 1137270..88be957 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/sql/bankadmin_pointbase.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/bankadmin/sql/bankadmin_pointbase.sql
@@ -11,7 +11,7 @@
CREATE TABLE sec_bankadmin_customerejb (customerid VARCHAR2(255) PRIMARY KEY, customername VARCHAR2(255));
-CREATE TABLE sec_bankadmin_accountejb (accountid VARCHAR2(255) PRIMARY KEY, amount NUMERIC, prv BLOB(5000),fk_customerejb varchar2(255));
+CREATE TABLE sec_bankadmin_accountejb (accountid VARCHAR2(255) PRIMARY KEY, amount NUMERIC, prv BLOB(5000),fk_customerejb varchar2(255));
ALTER TABLE sec_bankadmin_accountejb ADD CONSTRAINT fk_customerejb FOREIGN KEY (fk_customerejb) REFERENCES sec_bankadmin_customerejb(customerid) ON DELETE CASCADE;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/build.xml
index 4158116..fd206f7 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/integration/build.xml
@@ -47,14 +47,14 @@
<ant dir="bankadmin" target="setup-norestart" />
</target>
-
+
<target name="run-test" >
<ant dir="bankadmin" target="run-test" />
</target>
-
+
<target name="usage">
- <antcall target="usage-common"/>
+ <antcall target="usage-common"/>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/sec-common.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/sec-common.xml
index 5ef50c9..00551ef 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/sec-common.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/sec-common.xml
@@ -50,9 +50,9 @@
</target>
<target name="create-message-security-provider">
- <antcall target="create-server-message-security-provider"/>
- <antcall target="create-client-message-security-provider"/>
-
+ <antcall target="create-server-message-security-provider"/>
+ <antcall target="create-client-message-security-provider"/>
+
</target>
<target name="enable-wss-message-security-provider" depends="init-common">
@@ -84,11 +84,11 @@
<target name="delete-message-security-provider">
<antcall target="delete-message-security-provider-common">
- <param name="wss.provider.name" value="${wss.server.provider.name}"/>
- </antcall>
+ <param name="wss.provider.name" value="${wss.server.provider.name}"/>
+ </antcall>
<antcall target="delete-message-security-provider-common">
- <param name="wss.provider.name" value="${wss.client.provider.name}"/>
- </antcall>
+ <param name="wss.provider.name" value="${wss.client.provider.name}"/>
+ </antcall>
</target>
@@ -147,15 +147,15 @@
<!-- Configure NSS for IIOP -->
<target name="config-nss-iiop" depends="init-common">
- <antcall target="set-jvm-option">
- <param name="jvm.option" value="-DNSS_USE_FOR_IIOP=true"/>
+ <antcall target="set-jvm-option">
+ <param name="jvm.option" value="-DNSS_USE_FOR_IIOP=true"/>
</antcall>
</target>
<!-- Remove NSS config for IIOP -->
<target name="remove-nss-iiop" depends="init-common">
- <antcall target="unset-jvm-option">
- <param name="jvm.option" value="-DNSS_USE_FOR_IIOP=true"/>
+ <antcall target="unset-jvm-option">
+ <param name="jvm.option" value="-DNSS_USE_FOR_IIOP=true"/>
</antcall>
</target>
@@ -167,7 +167,7 @@
<arg line="-d ${admin.domain.dir}/${admin.domain}/config -a"/>
</exec>
<concat>
- <filelist dir="${admin.domain.dir}/${admin.domain}/config" files="certdb.rfc"/>
+ <filelist dir="${admin.domain.dir}/${admin.domain}/config" files="certdb.rfc"/>
</concat>
<antcall target="import-cert-jks">
<param name="cert.alias" value="${cert.nickname}"/>
@@ -182,7 +182,7 @@
<arg line="-d ${admin.domain.dir}/${admin.domain}/config -a"/>
</exec>
<concat>
- <filelist dir="${admin.domain.dir}/${admin.domain}/config" files="certdb.rfc"/>
+ <filelist dir="${admin.domain.dir}/${admin.domain}/config" files="certdb.rfc"/>
</concat>
<antcall target="import-cert-jks">
<param name="cert.alias" value="${token.name}:${cert.nickname}"/>
@@ -406,7 +406,7 @@
<param name="keystore.pass" value="changeit"/>
<param name="key.pass" value="changeit"/>
<param name="key.alias" value="s1as"/>
- <param name="dname" value="CN=S1AS, OU=Sun Java System, O=Sun Microsystems, L=Santa Clara, ST=California, C=US"/>
+ <param name="dname" value="CN=S1AS, OU=Sun Java System, O=Sun Microsystems, L=Santa Clara, ST=California, C=US"/>
</antcall>
<antcall target="list-cert-jks">
<param name="keystore.file" value="s1as.jks"/>
@@ -472,8 +472,8 @@
</target>
-<!--
-Hardware Accelerator setup related targets
+<!--
+Hardware Accelerator setup related targets
-->
<target name="add-pkcs11-module-token" depends="init-common">
<echo message="Adding PKCS11 Module or token to NSS Certdb..."/>
@@ -517,7 +517,7 @@
<arg line="-L"/>
<arg line="-d ${admin.domain.dir}/${admin.domain}/config"/>
<arg line="-h ${token.name}"/>
- <arg line="-f passfile"/>
+ <arg line="-f passfile"/>
</exec>
</target>
@@ -525,18 +525,18 @@
<!-- Log related -->
<target name="set-client-log-level" depends="init-common">
<echo message="Setting client default log level WARNING to ${log.level}"/>
- <replace
- token="WARNING"
+ <replace
+ token="WARNING"
value="${log.level}"
- file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
</target>
<target name="set-client-default-log-level" depends="init-common">
<echo message="Setting client default log level WARNING from ${log.level}"/>
- <replace
- token="${log.level}"
+ <replace
+ token="${log.level}"
value="WARNING"
- file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
</target>
<target name="set-server-security-log-level" depends="init-common">
@@ -563,10 +563,10 @@
</target>
<target name="set-Props-MacOS" if="isMac" depends="init-common">
- <property name="java.lib.path" value="${env.JAVA_HOME}/lib"/>
+ <property name="java.lib.path" value="${env.JAVA_HOME}/lib"/>
</target>
<target name="set-Props-nonMacOS" unless="isMac" depends="init-common">
- <property name="java.lib.path" value="${env.JAVA_HOME}/jre/lib"/>
+ <property name="java.lib.path" value="${env.JAVA_HOME}/jre/lib"/>
</target>
<target name="import-cert-jks" depends="init-common">
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/WebTest.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/WebTest.java
index da8182f..88a52fd 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/WebTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/WebTest.java
@@ -47,14 +47,14 @@
// The stat reporter writes out the test info and results
// into the top-level quicklook directory during a run.
-
+
stat.addDescription("Basic Web Authentication/Authorization Test");
String host = args[0];
String portS = args[1];
int port = new Integer(portS).intValue();
String name;
-
+
System.out.println("Host ["+host+"] port ("+port+")");
// GET with a user who maps directly to role
@@ -69,7 +69,7 @@
System.out.println(t.getMessage());
stat.addStatus(name, stat.FAIL);
}
-
+
// GET with a user who maps through group
name="simpleauth: BASIC/access control: testuser42";
try {
@@ -128,7 +128,7 @@
os.write("GET /simpleauth/Test.jsp HTTP/1.0\n".getBytes());
os.write(auth.getBytes());
os.write("\n".getBytes());
-
+
InputStream is = s.getInputStream();
BufferedReader bis = new BufferedReader(new InputStreamReader(is));
String line = null;
@@ -144,5 +144,5 @@
s.close();
throw new Exception("String not found: "+result);
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/build.properties
index 6e67ed5..911240f 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/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="web"/>
<property name="appname" value="${module}-simpleauth"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/build.xml
index 8b81efb..a52c851 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/simple/build.xml
@@ -31,15 +31,15 @@
&commonRun;
&testproperties;
- <target name="all"
+ <target name="all"
depends="clean,build,setup,deploy,run,undeploy,unsetup"/>
<!-- run-test target added to have setup/unsetup commonly -->
- <target name="run-test"
+ <target name="run-test"
depends="clean,build,deploy,run,undeploy">
</target>
- <target name="all-no-delete"
+ <target name="all-no-delete"
depends="clean,build,setup,deploy,run"/>
<target name="clean" depends="init-common">
@@ -47,17 +47,17 @@
</target>
<target name="build">
- <property name="hasWebclient" value="yes"/>
+ <property name="hasWebclient" value="yes"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
- <param name="webclient.war.classes" value="**/*.class"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
</antcall>
<antcall target="local-ear-common"/>
<javac
srcdir="."
classpath="${env.APS_HOME}/lib/reporter.jar"
includes="WebTest.java"/>
- </target>
+ </target>
<target name="setup">
<antcall target="create-user-common">
@@ -76,7 +76,7 @@
<param name="groups" value="testgroup10"/>
</antcall>
</target>
-
+
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
@@ -95,7 +95,7 @@
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="unsetup">
<!-- remove test users, just cleanup. -->
@@ -123,11 +123,11 @@
<target name="local-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}"
+ <mkdir dir="${build.classes.dir}/META-INF"/>
+ <copy file="${sun-application.xml}"
tofile="${build.classes.dir}/META-INF/sun-application.xml"
- failonerror="true"/>
- <ear earfile="${assemble.dir}/${appname}App.ear"
+ failonerror="true"/>
+ <ear earfile="${assemble.dir}/${appname}App.ear"
appxml="${application.xml}">
<fileset dir="${assemble.dir}">
<include name="*.war"/>
@@ -135,7 +135,7 @@
<fileset dir="${build.classes.dir}">
<include name="META-INF/sun-application.xml"/>
</fileset>
- </ear>
+ </ear>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/build.properties
index 5de7f8b..7527ae3 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/build.properties
@@ -15,28 +15,28 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="sec-ssl"/>
-<property name="appname" value="${module}-converter"/>
+<property name="appname" value="${module}-converter"/> \u0020
-<property name="assemble"
- value="${build.classes.dir}/archive"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
-<property name="appclient.jar"
- value="${assemble.dir}/${appname}-client.jar"/>
+<property name="assemble"\u0020
+ value="${build.classes.dir}/archive"/>
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
+<property name="appclient.jar"\u0020
+ value="${assemble.dir}/${appname}-client.jar"/> \u0020
-<property name="test.client"
- value="com.sun.s1peqe.security.ssl.converter.client.ConverterClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.security.ssl.converter.client.ConverterClient"/>
<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="application-client.xml"\u0020
+ value="descriptor/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/sun-application-client.xml"/>
<property name="app.type" value="application"/>
@@ -45,9 +45,9 @@
<!-- ============================================================ -->
<!--
<property name="jndi.name" value="SSLconverter"/>
-<property name="provider.url" value="iiop://localhost:${orb.port}"/>
-<property name="ctxfactory" value="com.sun.enterprise.naming.SerialInitContextFactory"/>
-<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/>
+<property name="provider.url" value="iiop://localhost:${orb.port}"/>\u0020
+<property name="ctxfactory" value="com.sun.enterprise.naming.SerialInitContextFactory"/>\u0020
+<property name="ctxfactory" value="com.sun.jndi.cosnaming.CNCtxFactory"/>\u0020
-->
<!-- SE/EE specific to use NSS -->
<property name="cert.nickname" value="s1as"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/build.xml
index 555eabd..9aaf953 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/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,34 +49,34 @@
<target name="build" depends="compile">
<antcall target="build-ear-common"/>
- </target>
-
+ </target>
+
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
<target name="run" depends="set-appserver-version">
- <antcall target="run-win"/>
- <antcall target="run-unix"/>
+ <antcall target="run-win"/>
+ <antcall target="run-unix"/>
</target>
<target name="run-win" depends="set-appserver-version" if="isWindows">
- <antcall target="runclient-local-win"/>
- <antcall target="runclient-local-ee-win"/>
+ <antcall target="runclient-local-win"/>
+ <antcall target="runclient-local-ee-win"/>
</target>
<target name="runclient-local-win" depends="init-common" unless="isEE">
- <echo message="Test is running on Platform Edition!"/>
+ <echo message="Test is running on Platform Edition!"/>
<exec executable="${APPCLIENT}">
<env key="VMARGS" value=" -Djavax.net.ssl.trustStore="${admin.domain.dir}/${admin.domain}/config/cacerts.jks" -Djavax.net.ssl.trustStorePassword=${master.password}" />
<arg value="-client" />
<arg value="${assemble.dir}/${appname}AppClient.jar"/>
- <!-- dummy user added as appclient throwing login window -->
- <arg value="-textauth"/>
+ <!-- dummy user added as appclient throwing login window -->
+ <arg value="-textauth"/>
<arg value="-user"/>
<arg value="temp"/>
<arg value="-password"/>
<arg value="temp"/>
- <arg line="-xml "${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml""/>
+ <arg line="-xml "${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml""/>
</exec>
<!-- confirming report generation... -->
<antcall target="checkReporting-common">
@@ -87,20 +87,20 @@
</target>
<target name="runclient-local-ee-win" depends="init-common" if="isEE">
- <echo message="Test is running on Standard/Enterprise Edition!"/>
- <antcall target="get-certdb-to-jks">
- </antcall>
+ <echo message="Test is running on Standard/Enterprise Edition!"/>
+ <antcall target="get-certdb-to-jks">
+ </antcall>
<exec executable="${APPCLIENT}">
<env key="VMARGS" value=" -Djavax.net.ssl.trustStore="${admin.domain.dir}/${admin.domain}/config/certdb_cacerts.jks"" />
<arg value="-client" />
<arg value="${assemble.dir}/${appname}AppClient.jar"/>
- <!-- dummy user added as appclient throwing login window -->
- <arg value="-textauth"/>
+ <!-- dummy user added as appclient throwing login window -->
+ <arg value="-textauth"/>
<arg value="-user"/>
<arg value="temp"/>
<arg value="-password"/>
<arg value="temp"/>
- <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
</exec>
<!-- confirming report generation... -->
<antcall target="checkReporting-common">
@@ -109,25 +109,25 @@
<param name="test.count" value="1"/>
</antcall>
</target>
-
+
<target name="run-unix" depends="set-appserver-version" if="isUnix">
- <antcall target="runclient-local-unix"/>
- <antcall target="runclient-local-ee-unix"/>
+ <antcall target="runclient-local-unix"/>
+ <antcall target="runclient-local-ee-unix"/>
</target>
<target name="runclient-local-unix" depends="init-common" unless="isEE">
- <echo message="Test is running on Platform Edition!"/>
+ <echo message="Test is running on Platform Edition!"/>
<exec executable="${APPCLIENT}">
<env key="VMARGS" value=" -Djavax.net.ssl.trustStore=${admin.domain.dir}/${admin.domain}/config/cacerts.jks -Djavax.net.ssl.trustStorePassword=${master.password}" />
<arg value="-client" />
<arg value="${assemble.dir}/${appname}AppClient.jar"/>
- <!-- dummy user added as appclient throwing login window -->
- <arg value="-textauth"/>
+ <!-- dummy user added as appclient throwing login window -->
+ <arg value="-textauth"/>
<arg value="-user"/>
<arg value="temp"/>
<arg value="-password"/>
<arg value="temp"/>
- <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
</exec>
<!-- confirming report generation... -->
<antcall target="checkReporting-common">
@@ -139,20 +139,20 @@
</target>
<target name="runclient-local-ee-unix" depends="init-common" if="isEE">
- <echo message="Test is running on Standard/Enterprise Edition!"/>
- <antcall target="get-certdb-to-jks">
- </antcall>
+ <echo message="Test is running on Standard/Enterprise Edition!"/>
+ <antcall target="get-certdb-to-jks">
+ </antcall>
<exec executable="${APPCLIENT}">
<env key="VMARGS" value=" -Djavax.net.ssl.trustStore=${admin.domain.dir}/${admin.domain}/config/certdb_cacerts.jks" />
<arg value="-client" />
<arg value="${assemble.dir}/${appname}AppClient.jar"/>
- <!-- dummy user added as appclient throwing login window -->
- <arg value="-textauth"/>
+ <!-- dummy user added as appclient throwing login window -->
+ <arg value="-textauth"/>
<arg value="-user"/>
<arg value="temp"/>
<arg value="-password"/>
<arg value="temp"/>
- <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ <arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
</exec>
<!-- confirming report generation... -->
<antcall target="checkReporting-common">
@@ -165,7 +165,7 @@
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<!-- =============================================== -->
<!-- Target to run the standalone client without ACC -->
@@ -184,7 +184,7 @@
<jvmarg value="-Djavax.net.ssl.keyStore=${admin.domain.dir}/${admin.domain}/config/keystore.jks"/>
<jvmarg value="-Djavax.net.ssl.trustStore=${admin.domain.dir}/${admin.domain}/config/cacerts.jks"/>
<jvmarg value="-Djavax.net.ssl.trustStorePassword=${master.password}"/>
- <jvmarg value="-Dcom.sun.CORBA.connection.ORBSocketFactoryClass=com.sun.enterprise.iiop.IIOPSSLSocketFactory"/>
+ <jvmarg value="-Dcom.sun.CORBA.connection.ORBSocketFactoryClass=com.sun.enterprise.iiop.IIOPSSLSocketFactory"/>
<arg value="${provider.url}"/>
<arg value="${ctxfactory}"/>
<arg value="${jndi.name}"/>
@@ -201,12 +201,12 @@
<exec executable="${env.S1AS_HOME}/lib/certutil" output="${admin.domain.dir}/${admin.domain}/config/certdb.rfc">
<env key="LD_LIBRARY_PATH" path="${env.S1AS_HOME}/lib"/>
<arg line="-L -n ${cert.nickname}"/>
- <arg line="-d ${admin.domain.dir}/${admin.domain}/config -a"/>
+ <arg line="-d ${admin.domain.dir}/${admin.domain}/config -a"/>
</exec>
<antcall target="import-cert-jks">
- <param name="cert.alias" value="${cert.nickname}"/>
- <param name="keystore.file" value="${admin.domain.dir}/${admin.domain}/config/certdb_cacerts.jks"/>
- <param name="cert.file" value="${admin.domain.dir}/${admin.domain}/config/certdb.rfc"/>
+ <param name="cert.alias" value="${cert.nickname}"/>
+ <param name="keystore.file" value="${admin.domain.dir}/${admin.domain}/config/certdb_cacerts.jks"/>
+ <param name="cert.file" value="${admin.domain.dir}/${admin.domain}/config/certdb.rfc"/>
</antcall>
</target>
@@ -229,16 +229,16 @@
<!-- get the appserver edition -->
<target name="set-appserver-version" depends="init-common">
- <!--
- <exec executable="${ASADMIN}" output="as_version.txt">
- <arg line="version"/>
- <arg line="${as.props}"/>
- </exec>
- <loadfile property="Version" srcFile="as_version.txt" failonerror="false"/>
- <echo message="Got the version=${Version}"/>
- -->
- <!-- use the following workaround to find the appserver edition until I figureout the above parse method -->
- <available file="${admin.domain.dir}/${admin.domain}/config/cert8.db" type="file" property="isEE"/>
+ <!--
+ <exec executable="${ASADMIN}" output="as_version.txt">
+ <arg line="version"/>
+ <arg line="${as.props}"/>
+ </exec>
+ <loadfile property="Version" srcFile="as_version.txt" failonerror="false"/>
+ <echo message="Got the version=${Version}"/>
+ -->
+ <!-- use the following workaround to find the appserver edition until I figureout the above parse method -->
+ <available file="${admin.domain.dir}/${admin.domain}/config/cert8.db" type="file" property="isEE"/>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/client/ConverterClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/client/ConverterClient.java
index 48cfeeb..de25254 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/client/ConverterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/client/ConverterClient.java
@@ -27,7 +27,7 @@
/**
* A simple java client. This uses the services provided by the <code>ConverterBean</code> and
- * converts 100 US dollars to Yen and 100 Yen to Euro.
+ * converts 100 US dollars to Yen and 100 Yen to Euro.
* <p>In this regard, it does the following in order
* <ul>
* <li>Locates the home interface of the enterprise bean
@@ -37,21 +37,21 @@
* <br>
* <b>Locating the home interface:</b>
* <blockquote><pre>
- * Context initial = new InitialContext();
- * Context myEnv = (Context)initial.lookup("java:comp/env");
- * Object objref = myEnv.lookup("ejb/SimpleConverter");
+ * Context initial = new InitialContext();
+ * Context myEnv = (Context)initial.lookup("java:comp/env");
+ * Object objref = myEnv.lookup("ejb/SimpleConverter");
* ConverterHome home = (ConverterHome)PortableRemoteObject.narrow(objref, ConverterHome.class);
* </pre></blockquote>
* <br>
* <b>Creating the remote interface:</b>
* <blockquote><pre>
- * Converter currencyConverter = home.create();
+ * Converter currencyConverter = home.create();
* </pre></blockquote>
* <br>
* <b>Invoking business methods:</b>
* <blockquote><pre>
* BigDecimal param = new BigDecimal ("100.00");
- * amount = currencyConverter.dollarToYen(param);
+ * amount = currencyConverter.dollarToYen(param);
* amount = currencyConverter.yenToEuro(param);
* </pre></blockquote>
* <br>
@@ -66,7 +66,7 @@
public class ConverterClient {
- private SimpleReporterAdapter stat =
+ private SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
ConverterClient() {
@@ -80,35 +80,35 @@
*
*/
public static void main(String[] args) {
- ConverterClient client = new ConverterClient();
- client.run(args);
+ ConverterClient client = new ConverterClient();
+ client.run(args);
}
private void run(String[] args) {
String url = null;
- String testId = null;
+ String testId = null;
String jndiName = null;
Context context = null;
String ctxFactory = null;
- java.lang.Object obj = null;
+ java.lang.Object obj = null;
try {
stat.addDescription("Security::SSL tester -converter sample.");
if (args.length == 3) {
url = args[0];
ctxFactory = args[1];
- jndiName = args[2];
+ jndiName = args[2];
}
if ( (url == null) || (ctxFactory == null) ) {
- testId = "Sec::SSL_simple Converter Sample AppClient";
+ testId = "Sec::SSL_simple Converter Sample AppClient";
// Initialize the Context with default properties
context = new InitialContext();
System.out.println("Default Context Initialized...");
// Create Home object
obj = context.lookup("java:comp/env/ejb/SSLSimpleConverter");
} else {
- testId = "Sec::SSL_simple Standalone-Client";
+ testId = "Sec::SSL_simple Standalone-Client";
Properties env = new Properties();
env.put("java.naming.provider.url", url);
env.put("java.naming.factory.initial", ctxFactory);
@@ -138,7 +138,7 @@
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
} finally {
- stat.printSummary(testId);
+ stat.printSummary(testId);
}
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/descriptor/application.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/descriptor/application.xml
index d13047f..47deab2 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/descriptor/application.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/descriptor/application.xml
@@ -23,7 +23,7 @@
<small-icon></small-icon>
<large-icon></large-icon>
</icon>
- <display-name>SSLConverterApp</display-name>
+ <display-name>SSLConverterApp</display-name>
<module>
<java>sec-ssl-converter-client.jar</java>
</module>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/ejb/ConverterBean.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/ejb/ConverterBean.java
index 2f251a7..1e984b2 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/ejb/ConverterBean.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/converter/ejb/ConverterBean.java
@@ -71,7 +71,7 @@
* Loads the state of the bean from secondary storage. Required by EJB spec.
*/
public void ejbActivate() {}
-
+
/**
* Keeps the state of the bean to secondary storage. Required by EJB spec.
*/
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/KeyTool.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/KeyTool.java
index 833eb57..80fae83 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/KeyTool.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/KeyTool.java
@@ -50,7 +50,7 @@
// The respective in-memory keystores
private KeyStore pkcs12KeyStore = null;
private KeyStore jksKeyStore = null;
-
+
private static String PKCS12 = "-pkcs12";
private static String INFILE = "-pkcsFile";
private static String OUTFILE = "-jksFile";
@@ -60,46 +60,46 @@
private static String JKSKEYSTOREPASS = "-jksKeyStorePass";
private static String JKSKEYPASS = "-jksKeyPass";
private static LocalStringManagerImpl localStrings =
- new LocalStringManagerImpl(KeyTool.class);
+ new LocalStringManagerImpl(KeyTool.class);
/**
- * The class is only instantiated for PKCS12 - all other
+ * The class is only instantiated for PKCS12 - all other
* keytool functionality is passed to the sun.security.tools.KeyTool
* @param the file name of the PKCS12 file
* @param the output file name of the JKS file
* @param the provider - In this case SunJSSE
* @param password to the PKCS12 keystore
- * @param password to the key in the PKCS12 keystore
+ * @param password to the key in the PKCS12 keystore
* @param password to the JKS keystore
* @param password to the key in the JKS keystore
* currently it has to be the same as the JKS keystore password
* @exception Problem in loading the keystores
*/
public KeyTool (String infile, String outfile, String pkcsKeyStorePass,
- String pkcsKeyPass, String jksKeyStorePass,
- String jksKeyPass,
- String provider) throws IOException {
- inputFile = new File (infile);
- outputFile = new File (outfile);
- this.pkcsKeyStorePass = pkcsKeyStorePass.toCharArray ();
- this.pkcsKeyPass = pkcsKeyPass.toCharArray ();
- this.jksKeyStorePass = jksKeyStorePass.toCharArray ();
- this.jksKeyPass = jksKeyPass.toCharArray ();
- this.provider = provider;
- // if the output file exists delete it and create a new file
- try{
- if (outputFile.exists ()){
- throw new IOException ("Output file already exists!");
- }
- // Get the keystores from the engines.
- pkcs12KeyStore = KeyStore.getInstance ("PKCS12", provider);
- jksKeyStore = KeyStore.getInstance ("JKS");
+ String pkcsKeyPass, String jksKeyStorePass,
+ String jksKeyPass,
+ String provider) throws IOException {
+ inputFile = new File (infile);
+ outputFile = new File (outfile);
+ this.pkcsKeyStorePass = pkcsKeyStorePass.toCharArray ();
+ this.pkcsKeyPass = pkcsKeyPass.toCharArray ();
+ this.jksKeyStorePass = jksKeyStorePass.toCharArray ();
+ this.jksKeyPass = jksKeyPass.toCharArray ();
+ this.provider = provider;
+ // if the output file exists delete it and create a new file
+ try{
+ if (outputFile.exists ()){
+ throw new IOException ("Output file already exists!");
+ }
+ // Get the keystores from the engines.
+ pkcs12KeyStore = KeyStore.getInstance ("PKCS12", provider);
+ jksKeyStore = KeyStore.getInstance ("JKS");
- } catch (Exception e) {
- // catch possible security and io exceptions
- throw new IOException (e.getMessage ());
- }
- readKeyStores ();
+ } catch (Exception e) {
+ // catch possible security and io exceptions
+ throw new IOException (e.getMessage ());
+ }
+ readKeyStores ();
}
/**
* Load both the keystore's into memory.
@@ -107,211 +107,211 @@
* is created.
*/
public void readKeyStores() throws IOException {
- FileInputStream pkcsFis = null;
- FileInputStream jksFis = null;
- try {
- pkcsFis = new FileInputStream(inputFile);
- jksFis = new FileInputStream (outputFile);
- } catch(Exception e) {
- // No problem we'll create one....
- // e.printStackTrace();
- } finally {
- try {
- pkcs12KeyStore.load(pkcsFis, pkcsKeyStorePass);
- // Dont need a password as creating a new
- // keystore.
- jksKeyStore.load (jksFis, null);
- } catch(Exception ce) {
- // Can't do much... too bad.
- ce.printStackTrace();
- }
- if(pkcsFis != null)
- pkcsFis.close();
- if (jksFis != null)
- jksFis.close ();
+ FileInputStream pkcsFis = null;
+ FileInputStream jksFis = null;
+ try {
+ pkcsFis = new FileInputStream(inputFile);
+ jksFis = new FileInputStream (outputFile);
+ } catch(Exception e) {
+ // No problem we'll create one....
+ // e.printStackTrace();
+ } finally {
+ try {
+ pkcs12KeyStore.load(pkcsFis, pkcsKeyStorePass);
+ // Dont need a password as creating a new
+ // keystore.
+ jksKeyStore.load (jksFis, null);
+ } catch(Exception ce) {
+ // Can't do much... too bad.
+ ce.printStackTrace();
}
- }
+ if(pkcsFis != null)
+ pkcsFis.close();
+ if (jksFis != null)
+ jksFis.close ();
+ }
+ }
/**
- * Write the JKS keystore that is populated with values from
+ * Write the JKS keystore that is populated with values from
* the PKCS12 keystore to the outputfile.
*/
public void writeJksKeyStore() throws IOException {
- FileOutputStream fos = null;
- try {
- fos = new FileOutputStream(outputFile);
- } catch(Exception e) {
- // No problem we'll create one....
- // e.printStackTrace();
- } finally {
- try {
- jksKeyStore.store (fos, jksKeyStorePass);
- } catch(Exception ce) {
- // Can't do much... too bad.
- ce.printStackTrace();
- }
- if(fos != null)
- fos.close();
+ FileOutputStream fos = null;
+ try {
+ fos = new FileOutputStream(outputFile);
+ } catch(Exception e) {
+ // No problem we'll create one....
+ // e.printStackTrace();
+ } finally {
+ try {
+ jksKeyStore.store (fos, jksKeyStorePass);
+ } catch(Exception ce) {
+ // Can't do much... too bad.
+ ce.printStackTrace();
}
- }
- /**
- * Copies the keys and certificates in the PKCS12 file to
+ if(fos != null)
+ fos.close();
+ }
+ }
+ /**
+ * Copies the keys and certificates in the PKCS12 file to
* the in-memory JKS keystore
* @exception If the keystore has not been instantiated or
* the password to the key is'nt proper
*/
public void replicatePkcs12ToJks () throws Exception {
- Enumeration e = pkcs12KeyStore.aliases ();
- for (; e.hasMoreElements (); ){
- String alias = (String)e.nextElement ();
- if (pkcs12KeyStore.isKeyEntry (alias)){
+ Enumeration e = pkcs12KeyStore.aliases ();
+ for (; e.hasMoreElements (); ){
+ String alias = (String)e.nextElement ();
+ if (pkcs12KeyStore.isKeyEntry (alias)){
if (debug)
- System.out.println ("Alias "+alias+ " is a key entry ");
-
- /* Get the key and associated certificate chain
- * from PKCS12 keystore and put in JKS keystore
- */
- Key key = pkcs12KeyStore.getKey (alias, pkcsKeyPass);
- Certificate[] certs =
- pkcs12KeyStore.getCertificateChain (alias);
- jksKeyStore.setKeyEntry (alias, key, jksKeyPass, certs);
- } else if (pkcs12KeyStore.isCertificateEntry (alias)){
- if (debug)
- System.out.println (" Alias "+alias +
- " is a certificate entry");
- jksKeyStore.setCertificateEntry
- (alias, pkcs12KeyStore.getCertificate (alias));
- }
- }
+ System.out.println ("Alias "+alias+ " is a key entry ");
+
+ /* Get the key and associated certificate chain
+ * from PKCS12 keystore and put in JKS keystore
+ */
+ Key key = pkcs12KeyStore.getKey (alias, pkcsKeyPass);
+ Certificate[] certs =
+ pkcs12KeyStore.getCertificateChain (alias);
+ jksKeyStore.setKeyEntry (alias, key, jksKeyPass, certs);
+ } else if (pkcs12KeyStore.isCertificateEntry (alias)){
+ if (debug)
+ System.out.println (" Alias "+alias +
+ " is a certificate entry");
+ jksKeyStore.setCertificateEntry
+ (alias, pkcs12KeyStore.getCertificate (alias));
+ }
+ }
}
/**
* Prints the information in the PKCS12 keystore
*/
public void info () throws Exception{
- System.out.println (" Keystore Information");
- System.out.println (" Type = " + pkcs12KeyStore.getType ());
- System.out.println (" Provider = "+ pkcs12KeyStore.getProvider ());
- System.out.println (" KeyStore size = "+pkcs12KeyStore.size ());
- Enumeration e = pkcs12KeyStore.aliases ();
- System.out.println (" Kstore Aliases ");
- for (; e.hasMoreElements (); ){
- String alias = (String)e.nextElement ();
- System.out.println (" Alias = "+ alias);
- if (pkcs12KeyStore.isKeyEntry (alias)){
- System.out.println ("Alias is a key entry ");
- Key key = pkcs12KeyStore.getKey (alias, pkcsKeyPass);
- System.out.println (" Format = "+key.getFormat ());
- } else if (pkcs12KeyStore.isCertificateEntry (alias)){
- System.out.println (" Alias is a certificate entry");
- }
- }
- System.out.println (" End of Information");
+ System.out.println (" Keystore Information");
+ System.out.println (" Type = " + pkcs12KeyStore.getType ());
+ System.out.println (" Provider = "+ pkcs12KeyStore.getProvider ());
+ System.out.println (" KeyStore size = "+pkcs12KeyStore.size ());
+ Enumeration e = pkcs12KeyStore.aliases ();
+ System.out.println (" Kstore Aliases ");
+ for (; e.hasMoreElements (); ){
+ String alias = (String)e.nextElement ();
+ System.out.println (" Alias = "+ alias);
+ if (pkcs12KeyStore.isKeyEntry (alias)){
+ System.out.println ("Alias is a key entry ");
+ Key key = pkcs12KeyStore.getKey (alias, pkcsKeyPass);
+ System.out.println (" Format = "+key.getFormat ());
+ } else if (pkcs12KeyStore.isCertificateEntry (alias)){
+ System.out.println (" Alias is a certificate entry");
+ }
}
- /**
+ System.out.println (" End of Information");
+ }
+ /**
* Initializes the provider to be the JSSE provider
*/
public static void initProvider() {
- try {
- Provider p =
- (Provider) Class.forName(JSSE_PROVIDER).newInstance();
- Security.addProvider(p);
+ try {
+ Provider p =
+ (Provider) Class.forName(JSSE_PROVIDER).newInstance();
+ Security.addProvider(p);
- } catch(Exception e) {
- e.printStackTrace();
- }
- }
+ } catch(Exception e) {
+ e.printStackTrace();
+ }
+ }
/**
* Gets the provider name for JSSE
*/
public static String getProviderName (){
- try{
- Provider p =
- (Provider) Class.forName(JSSE_PROVIDER).newInstance();
- return p.getName ();
- } catch (Exception e) {
- e.printStackTrace ();
- }
- return null;
+ try{
+ Provider p =
+ (Provider) Class.forName(JSSE_PROVIDER).newInstance();
+ return p.getName ();
+ } catch (Exception e) {
+ e.printStackTrace ();
+ }
+ return null;
}
public static void help (boolean exit){
- System.out.println
- (localStrings.getLocalString ("enterprise.security.keytool",
- "keytool"));
- System.out.println
- (localStrings.getLocalString
- ("enterprise.security.keytooloptions", "PKCS Options:"));
- System.out.println (" "+ PKCS12 +
- " "+ INFILE + " fileName" +
- " "+ PKCSKEYSTOREPASS + " password" +
- " "+PKCSKEYPASS +" password" +
- " "+OUTFILE+ " outputFileName"+
- " "+JKSKEYSTOREPASS + " password");
- /* uncomment when support for this present in JSSE
- System.Out.Println (" "+JKSKEYPASS+ " password");
- */
- if (exit)
- System.exit (-1);
+ System.out.println
+ (localStrings.getLocalString ("enterprise.security.keytool",
+ "keytool"));
+ System.out.println
+ (localStrings.getLocalString
+ ("enterprise.security.keytooloptions", "PKCS Options:"));
+ System.out.println (" "+ PKCS12 +
+ " "+ INFILE + " fileName" +
+ " "+ PKCSKEYSTOREPASS + " password" +
+ " "+PKCSKEYPASS +" password" +
+ " "+OUTFILE+ " outputFileName"+
+ " "+JKSKEYSTOREPASS + " password");
+ /* uncomment when support for this present in JSSE
+ System.Out.Println (" "+JKSKEYPASS+ " password");
+ */
+ if (exit)
+ System.exit (-1);
}
public static void main(String[] args) {
- boolean pkcs = false;
- initProvider();
- String provider = null;
- String inFile = null;
- String outFile = null;
- String jksKeyPass = null;
- String jksKeyStorePass = null;
- String pkcsKeyPass = null;
- String pkcsKeyStorePass = null;
- try{
- if (args.length == 0){
- help (false);
- sun.security.tools.KeyTool.main (args);
- }
- if (args[0].equalsIgnoreCase (PKCS12)){
- pkcs = true;
- if (args.length != 11)
- help (true);
- if (!args[1].equalsIgnoreCase (INFILE))
- help (true);
- inFile = args[2];
- if (!args[3].equalsIgnoreCase (PKCSKEYSTOREPASS))
- help (true);
- pkcsKeyStorePass = args[4];
- if (!args[5].equalsIgnoreCase (PKCSKEYPASS))
- help (true);
- pkcsKeyPass = args[6];
- if (!args[7].equalsIgnoreCase (OUTFILE))
- help (true);
- outFile = args[8];
- if (!args[9].equalsIgnoreCase (JKSKEYSTOREPASS))
- help (true);
-
- jksKeyStorePass = args[10];
- jksKeyPass = jksKeyStorePass;
- /*
- // Uncomment the following when support
- // for different keystore and key pass present in JSSE
+ boolean pkcs = false;
+ initProvider();
+ String provider = null;
+ String inFile = null;
+ String outFile = null;
+ String jksKeyPass = null;
+ String jksKeyStorePass = null;
+ String pkcsKeyPass = null;
+ String pkcsKeyStorePass = null;
+ try{
+ if (args.length == 0){
+ help (false);
+ sun.security.tools.KeyTool.main (args);
+ }
+ if (args[0].equalsIgnoreCase (PKCS12)){
+ pkcs = true;
+ if (args.length != 11)
+ help (true);
+ if (!args[1].equalsIgnoreCase (INFILE))
+ help (true);
+ inFile = args[2];
+ if (!args[3].equalsIgnoreCase (PKCSKEYSTOREPASS))
+ help (true);
+ pkcsKeyStorePass = args[4];
+ if (!args[5].equalsIgnoreCase (PKCSKEYPASS))
+ help (true);
+ pkcsKeyPass = args[6];
+ if (!args[7].equalsIgnoreCase (OUTFILE))
+ help (true);
+ outFile = args[8];
+ if (!args[9].equalsIgnoreCase (JKSKEYSTOREPASS))
+ help (true);
- if (!args[11].equalsIgnoreCase (JKSKEYPASS))
- help ();
- jksKeyPass = args[12];
- */
- }
- if (!pkcs){
- sun.security.tools.KeyTool.main(args);
- } else{
- provider = getProviderName ();
- KeyTool kt = new KeyTool (inFile, outFile, pkcsKeyStorePass,
- pkcsKeyPass, jksKeyStorePass,
- jksKeyPass,
- provider);
- kt.replicatePkcs12ToJks ();
- kt.writeJksKeyStore ();
- }
- } catch (Exception e){
- System.out.println (e.getMessage ());
- e.printStackTrace ();
- }
+ jksKeyStorePass = args[10];
+ jksKeyPass = jksKeyStorePass;
+ /*
+ // Uncomment the following when support
+ // for different keystore and key pass present in JSSE
+
+ if (!args[11].equalsIgnoreCase (JKSKEYPASS))
+ help ();
+ jksKeyPass = args[12];
+ */
+ }
+ if (!pkcs){
+ sun.security.tools.KeyTool.main(args);
+ } else{
+ provider = getProviderName ();
+ KeyTool kt = new KeyTool (inFile, outFile, pkcsKeyStorePass,
+ pkcsKeyPass, jksKeyStorePass,
+ jksKeyPass,
+ provider);
+ kt.replicatePkcs12ToJks ();
+ kt.writeJksKeyStore ();
+ }
+ } catch (Exception e){
+ System.out.println (e.getMessage ());
+ e.printStackTrace ();
+ }
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/build.properties
index de896f9..a25088e 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/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="security"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/build.xml
index 36f6067..497c334 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/ssl/util/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="."/>
@@ -50,11 +50,11 @@
</target>
<target name="build" depends="compile">
- <jar destfile="${env.APS_HOME}/lib/sslutil.jar">
- <fileset dir="${build.classes.dir}"
- includes="**/KeyTool.class"
- />
- </jar>
+ <jar destfile="${env.APS_HOME}/lib/sslutil.jar">
+ <fileset dir="${build.classes.dir}"
+ includes="**/KeyTool.class"
+ />
+ </jar>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/build.properties
index 1650705..7fb831d 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/build.properties
@@ -15,6 +15,6 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="wss"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/build.xml
index ba95f87..30aaa13 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/build.xml
@@ -39,44 +39,44 @@
&run;
<target name="all" depends="display-header,init-common">
- <antcall target="setup"/>
- <ant dir="servletjaxws" target="all"/>
- <ant dir="ejbws" target="all"/>
- <ant dir="servletws" target="all"/>
-
- <antcall target="unsetup"/>
+ <antcall target="setup"/>
+ <ant dir="servletjaxws" target="all"/>
+ <ant dir="ejbws" target="all"/>
+ <ant dir="servletws" target="all"/>
+
+ <antcall target="unsetup"/>
</target>
-
+
<target name="display-header">
- <echo message="-->Running ${ant.project.name} tests from ${basedir} ..."/>
+ <echo message="-->Running ${ant.project.name} tests from ${basedir} ..."/>
</target>
-
+
<target name="run-test">
- <ant dir="servletjaxws" target="all"/>
- <ant dir="ejbws" target="all"/>
- <ant dir="servletws" target="all"/>
+ <ant dir="servletjaxws" target="all"/>
+ <ant dir="ejbws" target="all"/>
+ <ant dir="servletws" target="all"/>
</target>
-
+
<target name="setup" depends="init-common">
- <!-- *** The following is commented as message security level is being provided at application level. Uncomment only to test with default provider at server level policies. **
- <antcall target="enable-wss-message-security-provider"/>
- <antcall target="enable-wss-client-message-security-provider"/>
- <copy failonerror="false" file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"
+ <!-- *** The following is commented as message security level is being provided at application level. Uncomment only to test with default provider at server level policies. **
+ <antcall target="enable-wss-message-security-provider"/>
+ <antcall target="enable-wss-client-message-security-provider"/>
+ <copy failonerror="false" file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"
tofile="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml.baseconfig"/>
- -->
- <antcall target="setup-client-cert-s1as"/>
- <antcall target="create-users"/>
- <antcall target="enable-wss-log"/>
+ -->
+ <antcall target="setup-client-cert-s1as"/>
+ <antcall target="create-users"/>
+ <antcall target="enable-wss-log"/>
</target>
<target name="enable-wss-client-message-security-provider" depends="set-appserver-version">
- <antcall target="enable-wss-client-message-security-provider-pe"/>
- <antcall target="enable-wss-client-message-security-provider-ee"/>
+ <antcall target="enable-wss-client-message-security-provider-pe"/>
+ <antcall target="enable-wss-client-message-security-provider-ee"/>
</target>
<target name="enable-wss-client-message-security-provider-pe" unless="isEE">
- <copy failonerror="false" file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"
+ <copy failonerror="false" file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"
tofile="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml.sqe"/>
<copy overwrite="true" failonerror="false" file="config/glassfish-acc.xml"
tofile="config/glassfish-acc.xml.org"/>
@@ -108,38 +108,38 @@
</target>
<target name="generate-sample-jks-cert" depends="init-common">
- <antcall target="create-sample-self-jks-cert"/>
+ <antcall target="create-sample-self-jks-cert"/>
</target>
<target name="unsetup" depends="init-common">
- <!-- *** The following is commented as message security level is being provided at application level. Uncomment only to test with default provider at server level policies. **
+ <!-- *** The following is commented as message security level is being provided at application level. Uncomment only to test with default provider at server level policies. **
<antcall target="disable-wss-message-security-provider"/>
- <copy overwrite="true" failonerror="false" file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml.sqe"
- tofile="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
- <delete file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml.sqe" failonerror="false"/>
- <delete file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml.baseconfig" failonerror="false"/>
- -->
- <antcall target="unsetup-client-cert-s1as"/>
- <antcall target="delete-users"/>
- <antcall target="disable-wss-log"/>
+ <copy overwrite="true" failonerror="false" file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml.sqe"
+ tofile="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ <delete file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml.sqe" failonerror="false"/>
+ <delete file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml.baseconfig" failonerror="false"/>
+ -->
+ <antcall target="unsetup-client-cert-s1as"/>
+ <antcall target="delete-users"/>
+ <antcall target="disable-wss-log"/>
</target>
<target name="usage">
- <echo message="=============================================="/>
- <echo message="****** Security-WSS Testsuites *****"/>
- <echo message="ant all -->Run all tests"/>
- <echo message="=============================================="/>
+ <echo message="=============================================="/>
+ <echo message="****** Security-WSS Testsuites *****"/>
+ <echo message="ant all -->Run all tests"/>
+ <echo message="=============================================="/>
</target>
<target name="restart" depends="init-common">
- <antcall target="restart-server-instance-common"/>
+ <antcall target="restart-server-instance-common"/>
</target>
<target name="setup-client-cert" depends="set-appserver-version">
- <antcall target="create-sample-jks-cert"/>
- <antcall target="est-cert-trust-ee"/>
+ <antcall target="create-sample-jks-cert"/>
+ <antcall target="est-cert-trust-ee"/>
</target>
<target name="create-sample-jks-cert" if="isEE">
@@ -170,13 +170,13 @@
<param name="cert.file" value="clientcert_rfc.crt"/>
</antcall>
- <!-- JSSE trust store -->
- <antcall target="est-cert-trust-jks-ee"/>
+ <!-- JSSE trust store -->
+ <antcall target="est-cert-trust-jks-ee"/>
</target>
-
+
<target name="est-cert-trust-jks-ee" depends="init-common">
- <antcall target="get-certdb-to-jks">
+ <antcall target="get-certdb-to-jks">
<param name="cert.nickname" value="s1as"/>
</antcall>
<antcall target="import-cert-jks">
@@ -184,11 +184,11 @@
<param name="keystore.file" value="${admin.domain.dir}/${admin.domain}/config/certdb_cacerts.jks"/>
<param name="cert.file" value="clientcert_rfc.crt"/>
</antcall>
-
+
</target>
<target name="unsetup-client-cert" depends="set-appserver-version">
- <antcall target="unsetup-client-cert-ee"/>
+ <antcall target="unsetup-client-cert-ee"/>
<antcall target="update-back-wss-client-alias"/>
</target>
@@ -207,11 +207,11 @@
</target>
<target name="update-wss-client-alias" depends="init-common">
- <echo message="commented the clientcert replacement in wss-client-config-2.0.xml" />
- <!--
+ <echo message="commented the clientcert replacement in wss-client-config-2.0.xml" />
+ <!--
<replace token="s1as" value="clientcert" file="${env.S1AS_HOME}/lib/appclient/wss-client-config-2.0.xml"/>
<replace token="s1as" value="clientcert" file="${admin.domain.dir}/${admin.domain}/config/wss-client-config-2.0.xml"/>
- -->
+ -->
</target>
<target name="update-back-wss-client-alias" depends="init-common">
@@ -220,63 +220,63 @@
</target>
<target name="setup-client-cert-s1as" depends="set-appserver-version">
- <antcall target="setup-client-cert-s1as-ee"/>
+ <antcall target="setup-client-cert-s1as-ee"/>
</target>
<target name="unsetup-client-cert-s1as" depends="set-appserver-version">
- <antcall target="unsetup-client-cert-s1as-ee"/>
+ <antcall target="unsetup-client-cert-s1as-ee"/>
</target>
<target name="setup-client-cert-s1as-ee" depends="init-common" if="isEE">
- <antcall target="export-cert-p12-nss">
- <param name="cert.file" value="${env.APS_HOME}/sqetests/security/wss/s1as.p12"/>
- <param name="cert.dir" value="${admin.domain.dir}/${admin.domain}/config"/>
- <param name="certdb.pwd" value="${ssl.password}"/>
- <param name="cert.pwd" value="${ssl.password}"/>
- <param name="cert.nickname" value="s1as"/>
- </antcall>
- <antcall target="convert-pkcs12-to-jks">
- <param name="pkcs12.file" value="${env.APS_HOME}/sqetests/security/wss/s1as.p12"/>
- <param name="pkcs12.pass" value="${ssl.password}"/>
- <param name="jks.file" value="${env.APS_HOME}/sqetests/security/wss/s1as.jks"/>
- <param name="jks.pass" value="changeit"/>
+ <antcall target="export-cert-p12-nss">
+ <param name="cert.file" value="${env.APS_HOME}/sqetests/security/wss/s1as.p12"/>
+ <param name="cert.dir" value="${admin.domain.dir}/${admin.domain}/config"/>
+ <param name="certdb.pwd" value="${ssl.password}"/>
+ <param name="cert.pwd" value="${ssl.password}"/>
+ <param name="cert.nickname" value="s1as"/>
+ </antcall>
+ <antcall target="convert-pkcs12-to-jks">
+ <param name="pkcs12.file" value="${env.APS_HOME}/sqetests/security/wss/s1as.p12"/>
+ <param name="pkcs12.pass" value="${ssl.password}"/>
+ <param name="jks.file" value="${env.APS_HOME}/sqetests/security/wss/s1as.jks"/>
+ <param name="jks.pass" value="changeit"/>
</antcall>
- <antcall target="get-certdb-to-jks">
+ <antcall target="get-certdb-to-jks">
<param name="cert.nickname" value="s1as"/>
</antcall>
</target>
<target name="unsetup-client-cert-s1as-ee" depends="init-common" if="isEE">
- <delete failonerror="false" file="${env.APS_HOME}/sqetests/security/wss/s1as.jks"/>
- <delete failonerror="false" file="${env.APS_HOME}/sqetests/security/wss/s1as.p12"/>
- <delete failonerror="false" file="${env.APS_HOME}/sqetests/security/wss/certpassfile"/>
- <delete failonerror="false" file="${env.APS_HOME}/sqetests/security/wss/passfile"/>
- <delete failonerror="false" file="${admin.domain.dir}/${admin.domain}/config/certdb_cacerts.jks"/>
- <delete failonerror="false" file="${admin.domain.dir}/${admin.domain}/config/certdb.rfc"/>
+ <delete failonerror="false" file="${env.APS_HOME}/sqetests/security/wss/s1as.jks"/>
+ <delete failonerror="false" file="${env.APS_HOME}/sqetests/security/wss/s1as.p12"/>
+ <delete failonerror="false" file="${env.APS_HOME}/sqetests/security/wss/certpassfile"/>
+ <delete failonerror="false" file="${env.APS_HOME}/sqetests/security/wss/passfile"/>
+ <delete failonerror="false" file="${admin.domain.dir}/${admin.domain}/config/certdb_cacerts.jks"/>
+ <delete failonerror="false" file="${admin.domain.dir}/${admin.domain}/config/certdb.rfc"/>
</target>
<target name="enable-wss-log" depends="init-common">
- <replace token="dumpMessages="false""
+ <replace token="dumpMessages="false""
value="dumpMessages="true""
- file="${admin.domain.dir}/${admin.domain}/config/wss-server-config-2.0.xml"/>
- <replace token="dumpMessages="false""
+ file="${admin.domain.dir}/${admin.domain}/config/wss-server-config-2.0.xml"/>
+ <replace token="dumpMessages="false""
value="dumpMessages="true""
- file="${env.S1AS_HOME}/lib/appclient/wss-client-config-2.0.xml"/>
- <replace token=""WARNING""
+ file="${env.S1AS_HOME}/lib/appclient/wss-client-config-2.0.xml"/>
+ <replace token=""WARNING""
value=""INFO""
- file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
</target>
<target name="disable-wss-log" depends="init-common">
- <replace token="dumpMessages="true""
+ <replace token="dumpMessages="true""
value="dumpMessages="false""
- file="${admin.domain.dir}/${admin.domain}/config/wss-server-config-2.0.xml"/>
- <replace token="dumpMessages="true""
+ file="${admin.domain.dir}/${admin.domain}/config/wss-server-config-2.0.xml"/>
+ <replace token="dumpMessages="true""
value="dumpMessages="false""
- file="${env.S1AS_HOME}/lib/appclient/wss-client-config-2.0.xml"/>
- <replace token=""INFO""
+ file="${env.S1AS_HOME}/lib/appclient/wss-client-config-2.0.xml"/>
+ <replace token=""INFO""
value=""WARNING""
- file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
+ file="${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
</target>
<target name="create-users" depends="init-common">
@@ -307,6 +307,6 @@
</antcall>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/config/wss-client-config.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/config/wss-client-config.xml
index dc25b65..1d70ad5 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/config/wss-client-config.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/config/wss-client-config.xml
@@ -16,20 +16,20 @@
-->
-<xwss:SecurityConfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config"
- dumpMessages="true">
+<xwss:SecurityConfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config"
+ dumpMessages="true">
<xwss:Timestamp/>
- <xwss:RequireUsernameToken nonceRequired="false" passwordDigestRequired="false"/>
+ <xwss:RequireUsernameToken nonceRequired="false" passwordDigestRequired="false"/>
<xwss:RequireEncryption>
<xwss:Target type="qname">{http://schemas.xmlsoap.org/soap/envelope/}Body</xwss:Target>
</xwss:RequireEncryption>
<xwss:RequireSignature>
<xwss:Target type="qname">{http://schemas.xmlsoap.org/soap/envelope/}Body</xwss:Target>
- </xwss:RequireSignature>
+ </xwss:RequireSignature>
<xwss:Encrypt keyEncryptionAlgorithm="RSA_v1dot5">
<xwss:X509Token certificateAlias="s1as"/>
- <xwss:Target type="uri">#username-token</xwss:Target>
- </xwss:Encrypt>
+ <xwss:Target type="uri">#username-token</xwss:Target>
+ </xwss:Encrypt>
<xwss:Sign>
<xwss:X509Token certificateAlias="s1as"/>
</xwss:Sign>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/config/wss-server-config.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/config/wss-server-config.xml
index 762a02c..882ba8b 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/config/wss-server-config.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/config/wss-server-config.xml
@@ -16,7 +16,7 @@
-->
-<xwss:SecurityConfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config"
+<xwss:SecurityConfiguration xmlns:xwss="http://java.sun.com/xml/ns/xwss/config"
dumpMessages="false">
<xwss:Timestamp/>
<xwss:RequireEncryption>
@@ -24,11 +24,11 @@
</xwss:RequireEncryption>
<xwss:RequireSignature>
<xwss:Target type="qname">{http://schemas.xmlsoap.org/soap/envelope/}Body</xwss:Target>
- </xwss:RequireSignature>
- <xwss:RequireUsernameToken nonceRequired="false" passwordDigestRequired="false"/>
+ </xwss:RequireSignature>
+ <xwss:RequireUsernameToken nonceRequired="false" passwordDigestRequired="false"/>
<xwss:Encrypt keyEncryptionAlgorithm="RSA_v1dot5">
<xwss:X509Token certificateAlias="s1as"/>
- </xwss:Encrypt>
+ </xwss:Encrypt>
<xwss:Sign>
<xwss:X509Token certificateAlias="s1as"/>
</xwss:Sign>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/build.properties
index ae02bff..ef4b16d 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/build.properties
@@ -15,22 +15,22 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="wss"/>
-<property name="appname" value="${module}-ejbtaxcal"/>
+<property name="appname" value="${module}-ejbtaxcal"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.appserv.sqe.security.wss.ejbws.taxcal.client.TaxCalClient"/>
+<property name="test.client"\u0020
+ value="com.sun.appserv.sqe.security.wss.ejbws.taxcal.client.TaxCalClient"/>
<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="wsdl-file" value="wsdl/TaxCalEjbService.wsdl"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/build.xml
index 0faea49..a1af016 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/build.xml
@@ -34,20 +34,20 @@
&testproperties;
<target name="all" depends="display-header, clean, build, deploy, run, undeploy"/>
-
+
<target name="build-deploy-run" depends="display-header, clean, build, deploy, run"/>
-
+
<target name="display-header">
- <echo message="-->Running ${ant.project.name} bat tests from ${basedir} ..."/>
+ <echo message="-->Running ${ant.project.name} bat tests from ${basedir} ..."/>
</target>
-
+
<target name="run-test" depends="clean, build, deploy, run, undeploy"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<target name="compile" depends="init-common,clean-common, generate-artifacts">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -58,18 +58,18 @@
</target>
<target name="generate-artifacts">
- <antcall target="import-wsdl">
- <param name="mapping.file"
- value="${ejb-mapping.xml}"/>
- <param name="config-wsdl.file"
- value="config/config-ejb.xml"/>
- </antcall>
- <antcall target="import-wsdl">
- <param name="mapping.file"
- value="${client-mapping.xml}"/>
- <param name="config-wsdl.file"
- value="config/config-client.xml"/>
- </antcall>
+ <antcall target="import-wsdl">
+ <param name="mapping.file"
+ value="${ejb-mapping.xml}"/>
+ <param name="config-wsdl.file"
+ value="config/config-ejb.xml"/>
+ </antcall>
+ <antcall target="import-wsdl">
+ <param name="mapping.file"
+ value="${client-mapping.xml}"/>
+ <param name="config-wsdl.file"
+ value="config/config-client.xml"/>
+ </antcall>
</target>
<target name="ws-package-appclientjar-common">
@@ -131,13 +131,13 @@
</target>
<target name="build" depends="init-common,compile">
- <antcall target="ws-package-ejb-jar-common">
- <param name="ejbjar.classes"
+ <antcall target="ws-package-ejb-jar-common">
+ <param name="ejbjar.classes"
value="**/wss/ejbws/taxcal/*.class" />
<param name="ejbjar.files" value="${build.classes.dir}"/>
<param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/>
- </antcall>
- <antcall target="ws-package-appclientjar-common">
+ </antcall>
+ <antcall target="ws-package-appclientjar-common">
<param name="appclientjar.classes"
value="**/wss/ejbws/taxcal/client/*.class" />
<param name="appclientjar.files"
@@ -147,7 +147,7 @@
</antcall>
<antcall target="ear-common"/>
- </target>
+ </target>
<target name="deploy"
depends="init-common, reconfig-common">
@@ -160,12 +160,12 @@
</target>
<target name="runclient-ssl-win" depends="set-appserver-version" if="isWindows">
- <antcall target="runclient-ssl-pe-win"/>
- <antcall target="runclient-ssl-ee-win"/>
+ <antcall target="runclient-ssl-pe-win"/>
+ <antcall target="runclient-ssl-ee-win"/>
</target>
<target name="runclient-ssl-unix" depends="set-appserver-version" if="isUnix">
- <antcall target="runclient-ssl-pe-unix"/>
- <antcall target="runclient-ssl-ee-unix"/>
+ <antcall target="runclient-ssl-pe-unix"/>
+ <antcall target="runclient-ssl-ee-unix"/>
</target>
<target name="runclient-ssl-pe-win" depends="init-common" unless="isEE">
@@ -219,7 +219,7 @@
<param name="test.description" value="${test.description}"/>
<param name="test.count" value="2"/>
</antcall>
-
+
</target>
<target name="runclient-ssl-pe-unix" depends="init-common" unless="isEE">
@@ -273,21 +273,21 @@
<param name="test.description" value="${test.description}"/>
<param name="test.count" value="2"/>
</antcall>
-
+
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
</target>
- <!--
- =======================================================
+ <!--
+ =======================================================
User Defined specific targets
=======================================================
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/client/TaxCalClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/client/TaxCalClient.java
index 5a2e3fe..779fc03 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/client/TaxCalClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/client/TaxCalClient.java
@@ -24,23 +24,23 @@
* This is AppClient program that access StateTaxEJB and FedTax EJB Webservices.
* It expects StateTax webservice endpoint and FedTax endpoint URLs.
* This client is accessed in the ant run target after configuring the webservices
- * message security at system level or applevel.
+ * message security at system level or applevel.
*
* @version 1.1 03 May 2004
* @author Jagadesh Munta
*/
public class TaxCalClient {
/*
- * Tests the getStateTax and getFedTax with expected values. If value
+ * Tests the getStateTax and getFedTax with expected values. If value
* matched,then test PASSED else FAILED.
*/
- private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
+ private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
// J2EE simple reporter for logging the test status.
- private static String stateTaxEndpoint = null;
- private static String fedTaxEndpoint = null;
- private static String testSuite = "Security-wss-ejbws-";
- private static String testCase = null;
- private static TaxCalEjbService taxCalService = null;
+ private static String stateTaxEndpoint = null;
+ private static String fedTaxEndpoint = null;
+ private static String testSuite = "Security-wss-ejbws-";
+ private static String testCase = null;
+ private static TaxCalEjbService taxCalService = null;
public static void main (String[] args) {
@@ -55,7 +55,7 @@
}
stat.addDescription("This is to test message security with sign or username token on request and response with signing using ejb based webservices.");
- try {
+ try {
TaxCalClient client = new TaxCalClient();
Context ic = new InitialContext();
taxCalService = (TaxCalEjbService)
@@ -69,7 +69,7 @@
stat.printSummary(testSuite);
}
-
+
public void callStateTaxService() {
double income = 85000.00;
double deductions = 5000.00;
@@ -95,7 +95,7 @@
System.out.println("State TaxCalEjbWebservice client failed");
stat.addStatus(testSuite + "mesgsign-StateTaxPort", stat.FAIL);
ex.printStackTrace();
- }
+ }
}
public void callFedTaxService() {
@@ -122,7 +122,7 @@
System.out.println("Fed TaxCalEjbWebService client failed");
stat.addStatus(testSuite + "username-FedTaxPort", stat.FAIL);
ex.printStackTrace();
- }
+ }
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-client.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-client.xml
index 88be322..5fb4441 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-client.xml
@@ -19,7 +19,7 @@
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <wsdl
+ <wsdl
location="wsdl/TaxCalEjbService.wsdl"
packageName="com.sun.appserv.sqe.security.wss.ejbws.taxcal.client"/>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-ejb.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-ejb.xml
index 192286e..90a0e24 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-ejb.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-ejb.xml
@@ -19,7 +19,7 @@
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <wsdl
+ <wsdl
location="wsdl/TaxCalEjbService.wsdl"
packageName="com.sun.appserv.sqe.security.wss.ejbws.taxcal"/>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-sclient.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-sclient.xml
index 192286e..90a0e24 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-sclient.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-sclient.xml
@@ -19,7 +19,7 @@
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <wsdl
+ <wsdl
location="wsdl/TaxCalEjbService.wsdl"
packageName="com.sun.appserv.sqe.security.wss.ejbws.taxcal"/>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-sei.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-sei.xml
index 44ceb71..a5a7d86 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-sei.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/config/config-sei.xml
@@ -18,16 +18,16 @@
-->
<configuration
- xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <service name="TaxCalEjbService"
- targetNamespace="http://tax.org/wsdl"
- typeNamespace="http://tax.org/types"
- packageName="com.sun.appserv.sqe.security.wss.ejbws.taxcal">
- <interface name="com.sun.appserv.sqe.security.wss.ejbws.taxcal.FedTaxIF"
- servantName="com.sun.appserv.sqe.security.wss.ejbws.taxcal.FedTaxEjb"/>
- <interface name="com.sun.appserv.sqe.security.wss.ejbws.taxcal.StateTaxIF"
- servantName="com.sun.appserv.sqe.security.wss.ejbws.taxcal.StateTaxEjb">
- </interface>
- </service>
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service name="TaxCalEjbService"
+ targetNamespace="http://tax.org/wsdl"
+ typeNamespace="http://tax.org/types"
+ packageName="com.sun.appserv.sqe.security.wss.ejbws.taxcal">
+ <interface name="com.sun.appserv.sqe.security.wss.ejbws.taxcal.FedTaxIF"
+ servantName="com.sun.appserv.sqe.security.wss.ejbws.taxcal.FedTaxEjb"/>
+ <interface name="com.sun.appserv.sqe.security.wss.ejbws.taxcal.StateTaxIF"
+ servantName="com.sun.appserv.sqe.security.wss.ejbws.taxcal.StateTaxEjb">
+ </interface>
+ </service>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/FedTaxEjb.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/FedTaxEjb.java
index 25b6f07..6ae7dfd 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/FedTaxEjb.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/FedTaxEjb.java
@@ -41,7 +41,7 @@
}
public void ejbCreate() throws RemoteException {
- System.out.println("In FedTaxEjb::ejbCreate !!");
+ System.out.println("In FedTaxEjb::ejbCreate !!");
}
// Business service method implementation.
@@ -52,7 +52,7 @@
public void setSessionContext(SessionContext sc) {
this.sc = sc;
}
-
+
public void ejbRemove() throws RemoteException {
}
@@ -61,5 +61,5 @@
public void ejbPassivate() {
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/FedTaxIF.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/FedTaxIF.java
index 3b5f04c..cfb323c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/FedTaxIF.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/FedTaxIF.java
@@ -31,7 +31,7 @@
/*
* Interface to declare one business method - getFedTax method.
*/
- public double getFedTax(double income, double deductions)
+ public double getFedTax(double income, double deductions)
throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/StateTaxEjb.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/StateTaxEjb.java
index 601b8b5..d67e21c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/StateTaxEjb.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/StateTaxEjb.java
@@ -17,7 +17,7 @@
package com.sun.appserv.sqe.security.wss.ejbws.taxcal;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import jakarta.ejb.SessionBean;
import jakarta.ejb.SessionContext;
import jakarta.ejb.EJBException;
@@ -37,12 +37,12 @@
*/
private SessionContext sc;
private static final double STATE_TAX_RATE = 0.3;
-
+
public StateTaxEjb() {
}
-
+
public void ejbCreate() throws RemoteException {
- System.out.println("In StateTaxEjb::ejbCreate !!");
+ System.out.println("In StateTaxEjb::ejbCreate !!");
}
// Business method implementation.
@@ -50,16 +50,16 @@
return ((income - deductions) * STATE_TAX_RATE);
}
- public void setSessionContext(SessionContext sc) {
+ public void setSessionContext(SessionContext sc) {
this.sc = sc;
}
-
+
public void ejbRemove() throws RemoteException {
}
-
+
public void ejbActivate() {
}
-
+
public void ejbPassivate() {
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/StateTaxIF.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/StateTaxIF.java
index 4d0b0b2..bb3199c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/StateTaxIF.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/ejbws/ejb/StateTaxIF.java
@@ -30,7 +30,7 @@
/*
* Interface to declare one business method - getFedTax method.
*/
- public double getStateTax(double income, double deductions)
+ public double getStateTax(double income, double deductions)
throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/build.properties
index 21de2a3..69b670a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/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="wss"/>
-<property name="appname" value="${module}-tax"/>
+<property name="appname" value="${module}-tax"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.appserv.sqe.security.wss.annotations.client.TaxCalClient"/>
+<property name="test.client"\u0020
+ value="com.sun.appserv.sqe.security.wss.annotations.client.TaxCalClient"/>
<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="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="wsdl-file" value="wsdl/TaxService.wsdl"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/build.xml
index 4a6eb07..3a22a2c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/build.xml
@@ -35,13 +35,13 @@
&testproperties;
<target name="all" depends="display-header, clean, build, deploy, build-client,run,undeploy"/>
-
+
<target name="build-deploy-run" depends="display-header, clean, build, deploy, build-client, run"/>
-
+
<target name="display-header">
- <echo message="-->Running ${ant.project.name} tests from ${basedir} ..."/>
+ <echo message="-->Running ${ant.project.name} tests from ${basedir} ..."/>
</target>
-
+
<target name="run-test" depends="clean, build, deploy, build-client, run, undeploy"/>
<target name="clean" depends="init-common">
@@ -55,8 +55,8 @@
</target>
<target name="update-wsdl-location" depends="init-common">
- <copy file="client/TaxCalClient.java.template" tofile="client/TaxCalClient.java" overwrite="true"/>
- <replace file="client/TaxCalClient.java" token="localhost:8080" value="${http.host}:${http.port}"/>
+ <copy file="client/TaxCalClient.java.template" tofile="client/TaxCalClient.java" overwrite="true"/>
+ <replace file="client/TaxCalClient.java" token="localhost:8080" value="${http.host}:${http.port}"/>
</target>
<target name="compile-client" depends="init-common,clean-common">
@@ -67,7 +67,7 @@
</antcall>
</target>
-
+
<!-- Generation of service wsdl file.
Run this target in case you need to update the wsdl file
after making changes to the endpoint.
@@ -91,27 +91,27 @@
<arg line="wsdl/TaxService.wsdl"/>
</exec>
</target>
-
+
<target name="generate-client-artifacts" depends="init-common">
<exec executable="${WSIMPORT}">
<arg line="-keep "/>
<arg line="-d ${build.classes.dir}"/>
<arg line="http://${http.host}:${http.port}/${appname}-web/wss/TaxService?wsdl"/>
</exec>
- </target>
+ </target>
<target name="build-war" depends="init-common">
- <antcall target="webclient-war-common">
+ <antcall target="webclient-war-common">
<param name="hasWebclient" value="true"/>
- <param name="webclient.war.classes"
+ <param name="webclient.war.classes"
value="**/wss/annotations/*.class" />
- <param name="war.classes"
+ <param name="war.classes"
value="**/wss/annotations/*.class" />
- </antcall>
+ </antcall>
</target>
-
+
<target name="build-client" depends="init-common, compile-client">
- <antcall target="ws-package-appclientjar-common">
+ <antcall target="ws-package-appclientjar-common">
<param name="appclientjar.classes"
value="**/taxws/*.class **/wss/annotations/client/*.class" />
<param name="appclientjar.files"
@@ -120,7 +120,7 @@
value="${assemble.dir}/${appname}-client.jar"/>
</antcall>
</target>
-
+
<target name="ws-package-appclientjar-common" depends="init-common">
<mkdir dir="${assemble.dir}"/>
<delete file="${appclient.jar}" failonerror="false"/>
@@ -145,11 +145,11 @@
</metainf>
</jar>
<delete dir="${build.classes.dir}/META-INF" failonerror="false"/>
- </target>
-
+ </target>
+
<target name="build" depends="init-common,compile">
<antcall target="build-war"/>
- </target>
+ </target>
<target name="deploy-war" depends="init-common">
<antcall target="deploy-war-common">
@@ -173,27 +173,27 @@
</target>
<target name="runclient-nossl" depends="init-common">
- <property name="endpoint-url"
+ <property name="endpoint-url"
value="http://${http.host}:${http.port}/${appname}-web/wss/TaxService"/>
<exec executable="${APPCLIENT}" dir="${build.classes.dir}">
- <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/>
- <arg line="-client"/>
+ <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/>
+ <arg line="-client"/>
<arg line="${assemble.dir}/${appname}-client.jar"/>
- <arg line="${endpoint-url}"/>
+ <arg line="${endpoint-url}"/>
</exec>
</target>
<target name="runclient-ssl" depends="set-appserver-version">
- <antcall target="runclient-ssl-pe"/>
- <antcall target="runclient-ssl-ee"/>
+ <antcall target="runclient-ssl-pe"/>
+ <antcall target="runclient-ssl-ee"/>
</target>
<target name="runclient-local" depends="init-common">
<echo message="Executing appclient at ${basedir}"/>
- <property name="endpoint-url"
+ <property name="endpoint-url"
value="http://${http.host}:${http.port}/${appname}-web/wss/TaxService"/>
- <exec executable="${APPCLIENT}"
- failonerror="false" timeout="1500000"
+ <exec executable="${APPCLIENT}"
+ failonerror="false" timeout="1500000"
outputproperty="runclientCommonOutput">
<arg line="-client" />
<arg line="${assemble.dir}/${appname}-client.jar"/>
@@ -201,7 +201,7 @@
<arg line="-user j2ee"/>
<arg line="-password j2ee"/>
<arg line="-xml ${admin.domain.dir}/${admin.domain}/config/glassfish-acc.xml"/>
- <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/>
+ <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/>
</exec>
<echo message="${runclientCommonOutput}"/>
<antcall target="check-runclient-output" inheritAll="true" inheritRefs="true"/>
@@ -211,16 +211,16 @@
<param name="test.description" value="${test.description}"/>
<param name="test.count" value="1"/>
</antcall>
- </target>
-
+ </target>
+
<target name="runclient-ssl-pe" depends="init-common" unless="isEE">
<echo message="Test is running on Platform Edition!"/>
- <property name="endpoint-url"
+ <property name="endpoint-url"
value="http://${http.host}:${http.port}/${appname}-web/wss/TaxService"/>
<exec executable="${APPCLIENT}">
<env key="VMARGS" value="-Djavax.net.ssl.keyStore=${admin.domain.dir}/${admin.domain}/config/keystore.jks -Djavax.net.ssl.keyStorePassword=${master.password} -Djavax.net.ssl.trustStore=${admin.domain.dir}/${admin.domain}/config/cacerts.jks -Djavax.net.ssl.trustStorePassword=${master.password}" />
- <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/>
+ <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/>
<arg value="-client" />
<arg value="${assemble.dir}/${appname}-client.jar"/>
<arg value="-textauth"/>
@@ -241,12 +241,12 @@
<target name="runclient-ssl-ee" depends="init-common" if="isEE">
<echo message="Test is running on Standard/Enterprise Edition!"/>
- <property name="endpoint-url"
+ <property name="endpoint-url"
value="http://${http.host}:${http.port}/${appname}-web/wss/TaxService"/>
<exec executable="${APPCLIENT}">
<env key="VMARGS" value=" -Djavax.net.ssl.keyStore=${env.APS_HOME}/sqetests/security/wss/s1as.jks -Djavax.net.ssl.trustStore=${admin.domain.dir}/${admin.domain}/config/certdb_cacerts.jks -Djavax.net.ssl.trustStorePassword=changeit" />
- <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/>
+ <env key="APPCPATH" value="${env.APS_HOME}/lib/reporter.jar"/>
<arg value="-client" />
<arg value="${assemble.dir}/${appname}-client.jar"/>
<!-- dummy user added as appclient throwing login window -->
@@ -264,21 +264,21 @@
<param name="test.description" value="${test.description}"/>
<param name="test.count" value="1"/>
</antcall>
-
+
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-war"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
</target>
- <!--
- =======================================================
+ <!--
+ =======================================================
User Defined specific targets
=======================================================
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/client/TaxCalClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/client/TaxCalClient.java
index 3bcf626..b291484 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/client/TaxCalClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/client/TaxCalClient.java
@@ -26,22 +26,22 @@
* This is AppClient program that access StateTaxEJB and FedTax EJB Webservices.
* It expects StateTax webservice endpoint and FedTax endpoint URLs.
* This client is accessed in the ant run target after configuring the webservices
- * message security at system level or applevel.
+ * message security at system level or applevel.
*
* @version 1.1 05 Aug 2005
* @author Jagadesh Munta
*/
-
+
public class TaxCalClient {
/*
- * Tests the getStateTax and getFedTax with expected values. If value
+ * Tests the getStateTax and getFedTax with expected values. If value
* matched,then test PASSED else FAILED.
*/
- private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
+ private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
// J2EE simple reporter for logging the test status.
- private static String taxEndpoint = null;
- private static String testSuite = "sec-wss-annotate-servletendpoint";
- private static String testCase = null;
+ private static String taxEndpoint = null;
+ private static String testSuite = "sec-wss-annotate-servletendpoint";
+ private static String testCase = null;
@WebServiceRef(wsdlLocation="http://localhost:8080/wss-tax-web/wss/TaxService?wsdl")
static TaxService service;
@@ -56,8 +56,8 @@
taxEndpoint = args[0];
}
- stat.addDescription("Security-WSS-ejb webservice");
- try {
+ stat.addDescription("Security-WSS-ejb webservice");
+ try {
TaxCalClient client = new TaxCalClient();
client.callTaxService();
}catch(Exception e){
@@ -66,14 +66,14 @@
stat.printSummary(testSuite);
}
-
+
public void callTaxService() {
double income = 97000.00;
double deductions = 7000.00;
double expectedTax = 18000.00;
String testStatus = "fail";
-
+
try {
if (service!=null) {
Tax port = service.getTaxPort();
@@ -91,7 +91,7 @@
}
}else {
System.out.println("Error: Not able to get the service and is null!");
- testStatus = stat.FAIL;
+ testStatus = stat.FAIL;
}
} catch (Exception ex) {
@@ -99,8 +99,8 @@
ex.printStackTrace();
testStatus = stat.FAIL;
} finally {
- stat.addStatus(testSuite+"-getFedTax" , testStatus);
- }
+ stat.addStatus(testSuite+"-getFedTax" , testStatus);
+ }
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/web/Tax.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/web/Tax.java
index bb7ed94..4d57de6 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/web/Tax.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletjaxws/web/Tax.java
@@ -21,7 +21,7 @@
import jakarta.jws.WebMethod;
/**
- * FedTax WebService endpoint using the Java EE 5 annotations.
+ * FedTax WebService endpoint using the Java EE 5 annotations.
* Used for testing Web Services Security tests on Java EE 5 platform.
*
* @version 1.1 08 Aug 2005
@@ -45,5 +45,5 @@
return ((income - deductions) * FED_TAX_RATE);
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/build.properties
index 9961dab..0aeccde 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/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="wss"/>
-<property name="appname" value="${module}-taxcal"/>
+<property name="appname" value="${module}-taxcal"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.appserv.sqe.security.wss.servletws.taxcal.client.TaxCalClient"/>
+<property name="test.client"\u0020
+ value="com.sun.appserv.sqe.security.wss.servletws.taxcal.client.TaxCalClient"/>
<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="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="wsdl-file" value="wsdl/TaxCalServletService.wsdl"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/build.xml
index 8ebdfa1..c4f7937 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/build.xml
@@ -35,7 +35,7 @@
<target name="all" depends="display-header, clean, build, deploy, run, undeploy"/>
- <target name="run-test"
+ <target name="run-test"
depends="clean, build, deploy, run, undeploy"/>
<target name="clean" depends="init-common">
@@ -43,7 +43,7 @@
</target>
<target name="display-header">
- <echo message="-->Running ${ant.project.name} tests from ${basedir} ..."/>
+ <echo message="-->Running ${ant.project.name} tests from ${basedir} ..."/>
</target>
<target name="compile" depends="init-common,clean-common, generate-artifacts">
@@ -142,28 +142,28 @@
</target>
<target name="build" depends="init-common,compile">
- <antcall target="ws-package-appclientjar-common">
- <param name="appclientjar.classes"
+ <antcall target="ws-package-appclientjar-common">
+ <param name="appclientjar.classes"
value="com/sun/appserv/sqe/security/wss/servletws/taxcal/client/*.class" />
<param name="appclientjar.files"
value="${build.classes.dir}"/>
<param name="appclient.jar"
value="${assemble.dir}/${appname}-client.jar"/>
- </antcall>
- <!--antcall target="ws-war-common"-->
- <antcall target="ws-package-war-common">
+ </antcall>
+ <!--antcall target="ws-war-common"-->
+ <antcall target="ws-package-war-common">
<param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
- <param name="war.classes"
+ <param name="war.classes"
value="com/sun/appserv/sqe/security/wss/servletws/taxcal/*.class" />
- <param name="mappingfile.name"
+ <param name="mappingfile.name"
value="${web-mapping.xml}" />
- <param name="mappingfile.location"
+ <param name="mappingfile.location"
value="${build.classes.dir}"/>
- <param name="webservices.xml"
+ <param name="webservices.xml"
value="${web-webservices.xml}" />
- </antcall>
+ </antcall>
<antcall target="ear-common"/>
- </target>
+ </target>
<target name="deploy"
depends="init-common">
@@ -171,10 +171,10 @@
</target>
<target name="run">
- <antcall target="runclient-ssl-win"/>
- <antcall target="runclient-ssl-unix"/>
+ <antcall target="runclient-ssl-win"/>
+ <antcall target="runclient-ssl-unix"/>
</target>
-
+
<target name="runclient-ssl-win" depends="set-appserver-version" if="isWindows">
<antcall target="runclient-ssl-pe-win"/>
<antcall target="runclient-ssl-ee-win"/>
@@ -292,17 +292,17 @@
</antcall>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
</target>
- <!--
- =======================================================
+ <!--
+ =======================================================
User Defined specific targets
=======================================================
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/client/TaxCalClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/client/TaxCalClient.java
index 05a9879..57c3abb 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/client/TaxCalClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/client/TaxCalClient.java
@@ -24,93 +24,93 @@
public class TaxCalClient {
- private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
- private static String stateTaxEndpoint = null;
- private static String fedTaxEndpoint = null;
- private static String testSuite = "Security-wss-servletws-";
- private static String testCase = null;
- private static TaxCalServletService taxCalService = null;
+ private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
+ private static String stateTaxEndpoint = null;
+ private static String fedTaxEndpoint = null;
+ private static String testSuite = "Security-wss-servletws-";
+ private static String testCase = null;
+ private static TaxCalServletService taxCalService = null;
- public static void main (String[] args) {
+ public static void main (String[] args) {
- if(args[0] == null || args[1] == null){
- System.out.println("TaxCal client: Argument missing. Please provide target" +
- "endpoint address as argument");
- System.exit(1);
- } else {
- stateTaxEndpoint = args[0];
- fedTaxEndpoint = args[1];
- }
+ if(args[0] == null || args[1] == null){
+ System.out.println("TaxCal client: Argument missing. Please provide target" +
+ "endpoint address as argument");
+ System.exit(1);
+ } else {
+ stateTaxEndpoint = args[0];
+ fedTaxEndpoint = args[1];
+ }
- stat.addDescription("This is to test message security with sign or username token on request and response with signing using servlet based webservices.");
- try {
- TaxCalClient client = new TaxCalClient();
- Context ic = new InitialContext();
- taxCalService = (TaxCalServletService)
- ic.lookup("java:comp/env/service/TaxCalServletService");
+ stat.addDescription("This is to test message security with sign or username token on request and response with signing using servlet based webservices.");
+ try {
+ TaxCalClient client = new TaxCalClient();
+ Context ic = new InitialContext();
+ taxCalService = (TaxCalServletService)
+ ic.lookup("java:comp/env/service/TaxCalServletService");
- client.callStateTaxService(); // Uses BinaryToken - Sign
- client.callFedTaxService(); // Uses Username Token
- }catch(Exception e){
- e.printStackTrace();
- }
+ client.callStateTaxService(); // Uses BinaryToken - Sign
+ client.callFedTaxService(); // Uses Username Token
+ }catch(Exception e){
+ e.printStackTrace();
+ }
- stat.printSummary(testSuite);
+ stat.printSummary(testSuite);
}
-
- public void callStateTaxService() {
- double income = 85000.00;
- double deductions = 5000.00;
- //String targetEndpointAddress =
- // "http://localhost:1024/taxcalculator";
+ public void callStateTaxService() {
+ double income = 85000.00;
+ double deductions = 5000.00;
- try {
+ //String targetEndpointAddress =
+ // "http://localhost:1024/taxcalculator";
- StateTaxIF taxCalIFPort = taxCalService.getStateTaxIFPort();
+ try {
- ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
- stateTaxEndpoint);
+ StateTaxIF taxCalIFPort = taxCalService.getStateTaxIFPort();
- double stateTax = taxCalIFPort.getStateTax(income, deductions);
- System.out.println("State tax from servlet based TaxCalService :" + stateTax);
+ ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ stateTaxEndpoint);
- if(stateTax == 24000.00)
- stat.addStatus(testSuite + "mesgsign-StateTaxPort", stat.PASS);
- else
- stat.addStatus(testSuite + "mesgsign-StateTaxPort", stat.FAIL);
+ double stateTax = taxCalIFPort.getStateTax(income, deductions);
+ System.out.println("State tax from servlet based TaxCalService :" + stateTax);
- } catch (Exception ex) {
- System.out.println("TaxCalEjbWebservice client failed");
- stat.addStatus(testSuite + "mesgsign-StateTaxPort", stat.FAIL);
- ex.printStackTrace();
- }
- }
+ if(stateTax == 24000.00)
+ stat.addStatus(testSuite + "mesgsign-StateTaxPort", stat.PASS);
+ else
+ stat.addStatus(testSuite + "mesgsign-StateTaxPort", stat.FAIL);
- public void callFedTaxService() {
- double income = 97000.00;
- double deductions = 7000.00;
- try {
- //String targetEndpointAddress =
- //"http://localhost:1024/FindInterestServlet/FindInterest";
+ } catch (Exception ex) {
+ System.out.println("TaxCalEjbWebservice client failed");
+ stat.addStatus(testSuite + "mesgsign-StateTaxPort", stat.FAIL);
+ ex.printStackTrace();
+ }
+ }
- FedTaxIF taxCalIFPort = taxCalService.getFedTaxIFPort();
- ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
- fedTaxEndpoint);
+ public void callFedTaxService() {
+ double income = 97000.00;
+ double deductions = 7000.00;
+ try {
+ //String targetEndpointAddress =
+ //"http://localhost:1024/FindInterestServlet/FindInterest";
- double fedTax = taxCalIFPort.getFedTax(income, deductions);
- System.out.println("Fed tax from Servlet based TaxCalService :" + fedTax);
+ FedTaxIF taxCalIFPort = taxCalService.getFedTaxIFPort();
+ ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ fedTaxEndpoint);
- if(fedTax == 18000.00)
- stat.addStatus(testSuite + "username-FedTaxPort", stat.PASS);
- else
- stat.addStatus(testSuite + "username-FedTaxPort", stat.FAIL);
-
- } catch (Exception ex) {
- System.out.println("TaxCalServletWebService client failed");
- stat.addStatus(testSuite + "username-FedTaxPort", stat.FAIL);
- ex.printStackTrace();
- }
- }
+ double fedTax = taxCalIFPort.getFedTax(income, deductions);
+ System.out.println("Fed tax from Servlet based TaxCalService :" + fedTax);
+
+ if(fedTax == 18000.00)
+ stat.addStatus(testSuite + "username-FedTaxPort", stat.PASS);
+ else
+ stat.addStatus(testSuite + "username-FedTaxPort", stat.FAIL);
+
+ } catch (Exception ex) {
+ System.out.println("TaxCalServletWebService client failed");
+ stat.addStatus(testSuite + "username-FedTaxPort", stat.FAIL);
+ ex.printStackTrace();
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-client.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-client.xml
index 15d00b6..6242f8e 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-client.xml
@@ -19,7 +19,7 @@
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <wsdl
+ <wsdl
location="wsdl/TaxCalServletService.wsdl"
packageName="com.sun.appserv.sqe.security.wss.servletws.taxcal.client"/>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-sei.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-sei.xml
index c20299c..db654f1 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-sei.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-sei.xml
@@ -18,16 +18,16 @@
-->
<configuration
- xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <service name="TaxCalServletService"
- targetNamespace="http://tax.org/wsdl"
- typeNamespace="http://tax.org/types"
- packageName="com.sun.appserv.sqe.security.wss.servletws.taxcal">
- <interface name="com.sun.appserv.sqe.security.wss.servletws.taxcal.FedTaxIF"
- servantName="com.sun.appserv.sqe.security.wss.servletws.taxcal.FedTaxServlet"/>
- <interface name="com.sun.appserv.sqe.security.wss.servletws.taxcal.StateTaxIF"
- servantName="com.sun.appserv.sqe.security.wss.servletws.taxcal.StateTaxServlet">
- </interface>
- </service>
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service name="TaxCalServletService"
+ targetNamespace="http://tax.org/wsdl"
+ typeNamespace="http://tax.org/types"
+ packageName="com.sun.appserv.sqe.security.wss.servletws.taxcal">
+ <interface name="com.sun.appserv.sqe.security.wss.servletws.taxcal.FedTaxIF"
+ servantName="com.sun.appserv.sqe.security.wss.servletws.taxcal.FedTaxServlet"/>
+ <interface name="com.sun.appserv.sqe.security.wss.servletws.taxcal.StateTaxIF"
+ servantName="com.sun.appserv.sqe.security.wss.servletws.taxcal.StateTaxServlet">
+ </interface>
+ </service>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-web.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-web.xml
index f384162..16a69eb 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/config/config-web.xml
@@ -19,7 +19,7 @@
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <wsdl
+ <wsdl
location="wsdl/TaxCalServletService.wsdl"
packageName="com.sun.appserv.sqe.security.wss.servletws.taxcal"/>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/descriptor/sun-application-client.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/descriptor/sun-application-client.xml
index e8a932c..14ee64a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/descriptor/sun-application-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/descriptor/sun-application-client.xml
@@ -50,6 +50,6 @@
<response-protection auth-source="content"/>
</message-security>
</message-security-binding>
- </port-info>
+ </port-info>
</service-ref>
</sun-application-client>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/descriptor/sun-web.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/descriptor/sun-web.xml
index 591bd6d..56986ef 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/descriptor/sun-web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/descriptor/sun-web.xml
@@ -52,5 +52,5 @@
</message-security>
</message-security-binding>
</webservice-endpoint>
- </servlet>
+ </servlet>
</sun-web-app>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/FedTaxIF.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/FedTaxIF.java
index 62bec97..6f9c1b7 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/FedTaxIF.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/FedTaxIF.java
@@ -22,6 +22,6 @@
public interface FedTaxIF extends Remote{
- public double getFedTax(double income, double deductions) throws RemoteException;
+ public double getFedTax(double income, double deductions) throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/FedTaxServlet.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/FedTaxServlet.java
index 9981d25..84a8820 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/FedTaxServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/FedTaxServlet.java
@@ -21,15 +21,15 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.Call;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import javax.naming.*;
import javax.xml.rpc.Service;
import javax.xml.rpc.server.ServiceLifecycle;
import javax.xml.namespace.QName;
import jakarta.servlet.SingleThreadModel;
-public class FedTaxServlet implements
- SingleThreadModel, ServiceLifecycle {
+public class FedTaxServlet implements
+ SingleThreadModel, ServiceLifecycle {
public FedTaxServlet() {
System.out.println("FedTaxServlet() instantiated");
@@ -44,7 +44,7 @@
}
public double getFedTax(double income, double deductions) {
- System.out.println("getStateTax invoked from servlet endpoint");
- return ((income - deductions) * 0.2);
+ System.out.println("getStateTax invoked from servlet endpoint");
+ return ((income - deductions) * 0.2);
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/StateTaxIF.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/StateTaxIF.java
index 232f79b..6cc070a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/StateTaxIF.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/StateTaxIF.java
@@ -22,6 +22,6 @@
public interface StateTaxIF extends Remote{
- public double getStateTax(double income, double deductions) throws RemoteException;
+ public double getStateTax(double income, double deductions) throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/StateTaxServlet.java b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/StateTaxServlet.java
index e2ea1b1..c8cfeeb 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/StateTaxServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/security/wss/servletws/web/StateTaxServlet.java
@@ -21,15 +21,15 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.Call;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import javax.naming.*;
import javax.xml.rpc.Service;
import javax.xml.rpc.server.ServiceLifecycle;
import javax.xml.namespace.QName;
import jakarta.servlet.SingleThreadModel;
-public class StateTaxServlet implements
- SingleThreadModel, ServiceLifecycle {
+public class StateTaxServlet implements
+ SingleThreadModel, ServiceLifecycle {
public StateTaxServlet() {
System.out.println("StateTaxServlet() instantiated");
@@ -44,7 +44,7 @@
}
public double getStateTax(double income, double deductions) {
- System.out.println("getStateTax invoked from servlet endpoint");
- return ((income - deductions) * 0.3);
+ System.out.println("getStateTax invoked from servlet endpoint");
+ return ((income - deductions) * 0.3);
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/build.xml
index ad4481b..e9c6914b 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/build.xml
@@ -27,49 +27,49 @@
<param name="txn-target" value="all"/>
</antcall>
</target>
-
+
<target name="run-test">
<antcall target="runtxntests">
<param name="txn-target" value="run-test"/>
</antcall>
</target>
-
+
<target name="clean">
<antcall target="runtxntests">
<param name="txn-target" value="clean"/>
</antcall>
</target>
-
+
<target name="build">
<antcall target="runtxntests">
<param name="txn-target" value="build"/>
</antcall>
</target>
-
+
<target name="deploy">
<antcall target="runtxntests">
<param name="txn-target" value="deploy"/>
</antcall>
</target>
-
+
<target name="undeploy">
<antcall target="runtxntests">
<param name="txn-target" value="undeploy"/>
</antcall>
</target>
-
+
<target name="run">
<antcall target="runtxntests">
<param name="txn-target" value="run"/>
</antcall>
</target>
-
+
<target name="setup">
<antcall target="runtxntests">
<param name="txn-target" value="setup"/>
</antcall>
</target>
-
+
<target name="unsetup">
<antcall target="runtxntests">
<param name="txn-target" value="unsetup"/>
@@ -90,7 +90,7 @@
</target>
<target name="usage">
- <echo> Usage:
+ <echo> Usage:
======== Targets by execution granularity =========
ant clean (Cleans all txn tests)
@@ -107,11 +107,11 @@
ant all (Executes all the txn tests)
===== Targets by technoloy and execution granularity ======
- Note: Run the command of the following type:
+ Note: Run the command of the following type:
% ant txglobal -Dtxn-target=clean
to run the 'clean' target for 'stateless' tests
- </echo>
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/build.properties
index 921c956..59744c9 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/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="transaction"/>
<property name="application.xml" value="descriptor/application.xml"/>
@@ -23,7 +23,7 @@
<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="appname" value="txglobal"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
-<property name="appclient.jar" value="${assemble.dir}/txglobal-client.jar"/>
+<property name="appname" value="txglobal"/> \u0020
+<property name="appclientjar.files" value="${build.classes.dir}"/> \u0020
+<property name="appclient.jar" value="${assemble.dir}/txglobal-client.jar"/>\u0020
<property name="jdbc.resource.type" value="javax.sql.XADataSource"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/build.xml
index ddcdc33..9de5f46 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/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/beanB"/>
@@ -50,8 +50,8 @@
<target name="build" depends="compile">
<antcall target="build-ear-common"/>
- </target>
-
+ </target>
+
<target name="setup" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create_pointbase.sql"/>
@@ -84,11 +84,11 @@
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runclient-common"/>
</target>
-
+
<target name="unsetup" depends="init-common">
<antcall target="delete-jdbc-resource-common">
<param name="jdbc.resource.name" value="jdbc/s1qeDB1"/>
@@ -107,7 +107,7 @@
<param name="sql.file" value="sql/drop_pointbase.sql"/>
</antcall>
<antcall target="execute-sql-common">
- <param name="db.url"
+ <param name="db.url"
value="jdbc:pointbase:server://${db.host}:9093/sun-appserv-samples"/>
<param name="sql.file" value="sql/drop_pointbase.sql"/>
</antcall>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/client/Client.java b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/client/Client.java
index a93a29c..eeb9293 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/client/Client.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/client/Client.java
@@ -32,15 +32,15 @@
public Client() {
}
- public static void main(String[] args) {
- System.out.println("\nStarting Txglobal Test Suite");
- Client client = new Client();
+ public static void main(String[] args) {
+ System.out.println("\nStarting Txglobal Test Suite");
+ Client client = new Client();
// initialize the context and home object
client.setup();
// run the tests
- client.runTestClient();
+ client.runTestClient();
}
public void setup() {
@@ -73,7 +73,7 @@
}
public void testTxCommit() {
- try {
+ try {
System.out.println("Execute BeanA::testTxCommit");
TxRemoteA beanA = home.create();
@@ -81,7 +81,7 @@
if (result) {
status.addStatus("txglobal testTxCommit: ", status.PASS);
- } else {
+ } else {
status.addStatus("txglobal testTxCommit: ", status.FAIL);
}
@@ -94,7 +94,7 @@
}
public void testTxRollback() {
- try {
+ try {
System.out.println("Execute BeanA::testTxRollback");
TxRemoteA beanA = home.create();
@@ -102,7 +102,7 @@
if (result) {
status.addStatus("txglobal testTxRollback: ", status.PASS);
- } else {
+ } else {
status.addStatus("txglobal testTxRollback: ", status.FAIL);
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanA/TxBeanA.java b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanA/TxBeanA.java
index ad488b6..9392628 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanA/TxBeanA.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanA/TxBeanA.java
@@ -55,7 +55,7 @@
public void ejbRemove() {
System.out.println("ejbRemove in BeanA");
}
-
+
public void ejbDestroy() {
System.out.println("ejbDestroy in BeanA");
}
@@ -112,7 +112,7 @@
if ( (beanB == null) || (tx == null) ) {
throw new NullPointerException();
}
-
+
tx.begin();
beanB.delete("A1001");
beanB.insert("A1003", 8000);
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanB/TxBeanB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanB/TxBeanB.java
index 74dd3a3..3ac78ec 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanB/TxBeanB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanB/TxBeanB.java
@@ -45,14 +45,14 @@
private String dbURL1 = null;
private String dbURL2 = null;
private String password = null;
- private SessionContext ctx = null;
+ private SessionContext ctx = null;
private QueueConnectionFactory qfactory = null;
// ------------------------------------------------------------------------
// Container Required Methods
// ------------------------------------------------------------------------
public void setSessionContext(SessionContext sc) {
- System.out.println("setSessionContext in BeanB");
+ System.out.println("setSessionContext in BeanB");
try {
ctx = sc;
Context ic = new InitialContext();
@@ -68,13 +68,13 @@
}
public void ejbCreate() {
- System.out.println("ejbCreate in BeanB");
+ System.out.println("ejbCreate in BeanB");
try {
Context context = new InitialContext();
-
- qfactory = (QueueConnectionFactory)
+
+ qfactory = (QueueConnectionFactory)
context.lookup("java:comp/env/jms/QCFactory");
-
+
queue = (Queue) context.lookup("java:comp/env/jms/SampleQueue");
System.out.println("QueueConnectionFactory & " +
@@ -83,22 +83,22 @@
System.out.println("Exception in ejbCreate: " + ex.toString());
ex.printStackTrace();
}
- }
+ }
public void ejbDestroy() {
- System.out.println("ejbDestroy in BeanB");
+ System.out.println("ejbDestroy in BeanB");
}
public void ejbActivate() {
- System.out.println("ejbActivate in BeanB");
+ System.out.println("ejbActivate in BeanB");
}
-
+
public void ejbPassivate() {
- System.out.println("ejbPassivate in BeanB");
+ System.out.println("ejbPassivate in BeanB");
}
public void ejbRemove() {
- System.out.println("ejbRemove in BeanB");
+ System.out.println("ejbRemove in BeanB");
}
// ------------------------------------------------------------------------
@@ -107,7 +107,7 @@
public void insert(String acc, float bal) throws RemoteException {
Connection con1 = null;
Connection con2 = null;
- System.out.println("insert in BeanB");
+ System.out.println("insert in BeanB");
try {
con1 = getConnection(dbURL1);
Statement stmt1 = con1.createStatement();
@@ -138,7 +138,7 @@
public void delete(String account) throws RemoteException {
Connection con1 = null;
Connection con2 = null;
- System.out.println("delete in BeanB");
+ System.out.println("delete in BeanB");
try {
con1 = getConnection(dbURL1);
Statement stmt1 = con1.createStatement();
@@ -167,7 +167,7 @@
}
public void sendJMSMessage(String msg) throws RemoteException {
- System.out.println("sendJMSMessage in BeanB");
+ System.out.println("sendJMSMessage in BeanB");
try {
QueueConnection qconn = qfactory.createQueueConnection();
QueueSession qsession = qconn.createQueueSession(true, 0);
@@ -190,7 +190,7 @@
public boolean verifyResults(String account, String resource)
throws RemoteException {
boolean result = false;
- System.out.println("verifyResults in BeanB");
+ System.out.println("verifyResults in BeanB");
try {
if (resource.equals("DB1")) {
result = checkResult(getConnection(dbURL1), account);
@@ -226,13 +226,13 @@
private boolean checkResult(Connection conn, String account) {
boolean result = false;
- System.out.println("checkResult in BeanB");
+ System.out.println("checkResult in BeanB");
try {
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM txAccount WHERE " +
"account = '"+ account + "'");
- if ( rs.next() ) {
+ if ( rs.next() ) {
result = true;
}
} catch (Exception ex) {
@@ -248,7 +248,7 @@
private Connection getConnection(String dbURL) {
Connection con = null;
- System.out.println("getConnection in BeanB");
+ System.out.println("getConnection in BeanB");
try{
Context context = new InitialContext();
DataSource ds = (DataSource) context.lookup(dbURL);
@@ -256,7 +256,7 @@
System.out.println("Got DB Connection Successfully...");
} catch (Exception ex) {
System.out.println("Exception in getConnection: " + ex.toString());
- ex.printStackTrace();
+ ex.printStackTrace();
}
return con;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanB/TxRemoteB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanB/TxRemoteB.java
index f0832f1..8b8b6c5 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanB/TxRemoteB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/transaction/txglobal/ejb/beanB/TxRemoteB.java
@@ -23,6 +23,6 @@
public void delete(String account) throws RemoteException;
public void insert(String account, float balance) throws RemoteException;
public void sendJMSMessage(String msg) throws RemoteException;
- public boolean verifyResults(String account, String resource)
+ public boolean verifyResults(String account, String resource)
throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/build.properties
index 2dc60cf..d5b2b1b 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/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="web"/>
-<property name="appname" value="${module}-bookstore"/>
+<property name="appname" value="${module}-bookstore"/> \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="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="bookstore3"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/build.xml
index fa8382c..e068391 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/build.xml
@@ -30,28 +30,28 @@
&commonBuild;
&commonRun;
&testproperties;
-
+
<target name="all" depends="build,setup,deploy-war,run-war, unsetup"/>
<target name="run-test" depends="build,deploy-war,run-war,undeploy-war"/>
-
+
<!--
- <antcall target="build"/>
- <antcall target="setup"/>
- <antcall target="deploy-war"/>
- <antcall target="run-war"/>
- <antcall target="undeploy-war"/>
- <antcall target="deploy-ear"/>
- <antcall target="run-ear"/>
- <antcall target="undeploy-ear"/>
- <antcall target="unsetup"/>
+ <antcall target="build"/>
+ <antcall target="setup"/>
+ <antcall target="deploy-war"/>
+ <antcall target="run-war"/>
+ <antcall target="undeploy-war"/>
+ <antcall target="deploy-ear"/>
+ <antcall target="run-ear"/>
+ <antcall target="undeploy-ear"/>
+ <antcall target="unsetup"/>
</target>
-->
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<target name="setup" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create_${db.type}.sql"/>
@@ -59,16 +59,16 @@
<antcall target="deploy-jdbc-common">
<param name="jdbc.conpool.name" value="web-bookstore-pool"/>
<param name="jdbc.resource.name" value="jdbc/BookDB"/>
- </antcall>
- </target>
-
+ </antcall>
+ </target>
+
<target name="sql" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/create_${db.type}.sql"/>
</antcall>
-
+
</target>
-
+
<target name="unsetup" depends="init-common">
<antcall target="execute-sql-common">
@@ -80,47 +80,47 @@
<param name="jdbc.resource.name" value="jdbc/BookDB"/>
</antcall>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="src"/>
- </antcall>
+ </antcall>
</target>
<target name="build" depends="compile">
- <property name="hasWebclient" value="yes"/>
- <property name="tlds-exist" value="yes"/>
+ <property name="hasWebclient" value="yes"/>
+ <property name="tlds-exist" value="yes"/>
<antcall target="copy-tlds"/>
<antcall target="copy-tagfiles"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
- <param name="webclient.war.classes" value="**/*.class"/>
- </antcall>
-
+ <param name="webclient.war.classes" value="**/*.class"/>
+ </antcall>
+
<!-- <antcall target="ear-common"/>-->
-
- </target>
-
+
+ </target>
+
<target name="deploy-ear" depends="init-common">
<antcall target="deploy-common"/>
</target>
<target name="deploy-war" depends="init-common">
<antcall target="deploy-war-common"/>
- </target>
-
+ </target>
+
<target name="undeploy-ear" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="undeploy-war" depends="init-common">
<antcall target="undeploy-war-common"/>
- </target>
+ </target>
<target name="run-war" depends="init-common">
<antcall target="runwebclient-common">
- <param name="testsuite.id" value="jstl-servlet (stand-alone war based)"/>
- </antcall>
+ <param name="testsuite.id" value="jstl-servlet (stand-alone war based)"/>
+ </antcall>
</target>
<target name="usage">
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/sql/create_derby.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/sql/create_derby.sql
index a4ec6c9..a02b593 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/sql/create_derby.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/sql/create_derby.sql
@@ -1,13 +1,13 @@
DROP TABLE books;
CREATE TABLE books (
- ID VARCHAR(8),
- SURNAME VARCHAR(24),
- FIRST_NAME VARCHAR(24),
- TITLE VARCHAR(96),
- PRICE FLOAT,
- YEAR1 INTEGER NOT NULL,
+ ID VARCHAR(8),
+ SURNAME VARCHAR(24),
+ FIRST_NAME VARCHAR(24),
+ TITLE VARCHAR(96),
+ PRICE FLOAT,
+ YEAR1 INTEGER NOT NULL,
DESCRIPTION VARCHAR(30),
- INVENTORY INTEGER NOT NULL
+ INVENTORY INTEGER NOT NULL
);
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages.java
index 3b1817e..5f58e73 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages.java
@@ -33,7 +33,7 @@
{ "TitleCashier", "Cashier" },
{ "TitleBookDescription", "Book Description" },
{ "Visitor", "You are visitor number " },
-
+
{ "What", "What We\'re Reading" },
{
"Talk",
@@ -79,14 +79,14 @@
"Your order could not be completed due to insufficient inventory."
},
{ "With", "With" },
-
+
{ "Shipping", "Shipping:" },
{ "QuickShip", "Quick Shipping" },
{ "NormalShip", "Normal Shipping" },
{ "SaverShip", "Saver Shipping" },
{ "ShipDate", "Your order will be shipped on " },
{ "ShipDateLC", "your order will be shipped on " },
-
+
{ "ConfirmAdd", "You just added \"{0}\" to your shopping cart" },
{ "ConfirmRemove", "You just removed \"{0}\" from your shopping cart" },
{
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_de_DE.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_de_DE.java
index e8f7f41..1a8aa13 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_de_DE.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_de_DE.java
@@ -33,7 +33,7 @@
{ "TitleCashier", "Kasse" },
{ "TitleBookDescription", "Buchbeschreibung" },
{ "Visitor", "Sie sind Besucher Nummer " },
-
+
{ "What", "Was wir gerade lesen" },
{
"Talk",
@@ -79,14 +79,14 @@
"Ihre Bestellung konnte aufgrund unzureichenden Inventars nicht ausgefuehrt werden."
},
{ "With", "Mit" },
-
+
{ "Shipping", "Versand:" },
{ "QuickShip", "Schnellversand" },
{ "NormalShip", "Normalversand" },
{ "SaverShip", "Spar-Option Versand" },
{ "ShipDate", "Ihre Sendung wird geliefert am " },
{ "ShipDateLC", "ihre sendung wird geliefert am " },
-
+
{ "ConfirmAdd", "Sie haben gerade \"{0}\" in Ihren Einkaufswagen gelegt" },
{
"ConfirmRemove",
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_en_US.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_en_US.java
index 9d965bd..a543dae 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_en_US.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_en_US.java
@@ -33,7 +33,7 @@
{ "TitleCashier", "Cashier" },
{ "TitleBookDescription", "Book Description" },
{ "Visitor", "You are visitor number " },
-
+
{ "What", "What We\'re Reading" },
{
"Talk",
@@ -79,14 +79,14 @@
"Your order could not be completed due to insufficient inventory."
},
{ "With", "With" },
-
+
{ "Shipping", "Shipping:" },
{ "QuickShip", "Quick Shipping" },
{ "NormalShip", "Normal Shipping" },
{ "SaverShip", "Saver Shipping" },
{ "ShipDate", "Your order will be shipped on " },
{ "ShipDateLC", "your order will be shipped on " },
-
+
{ "ConfirmAdd", "You just added \"{0}\" to your shopping cart" },
{ "ConfirmRemove", "You just removed \"{0}\" from your shopping cart" },
{
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_es_MX.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_es_MX.java
index ac4c61d..83df47a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_es_MX.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/messages/BookstoreMessages_es_MX.java
@@ -80,7 +80,7 @@
{ "Catalog", "Volver al Cat" + "\u00e1" + "logo" },
{ "ThankYou", "Gracias por su compra " },
{ "ThankYouParam", "Gracias, {0} por comprar sus libros aqui" },
-
+
{ "OrderError", "No se pudo completar su pedido debido a escasez de inventario." },
{ "With", "Con" },
{ "Shipping", "Env" + "\u00ed" + "o:" },
@@ -94,46 +94,46 @@
"Acaba de a" + "\u00f1" + "adir \"{0}\" a su cesta de compras"
},
{ "ConfirmRemove", "Acaba de sacar \"{0}\" de su cesta de compras" },
-
+
{
"CartItemCount",
-
+
"Su cesta de compras contiene " + "{0,choice,0#ning" + "\u00fa" +
"n articulo|1#un articulo|1< {0} articulos}"
},
-
+
{
"Newsletters",
"Suscripci" + "\u00f3" + "n gratuita a nuestro bolet" + "\u00ed" +
"n:"
},
-
+
{ "ThanksMsg", "Gracias. Por favor cliquee aqui para comprar sus libros." },
-
+
{
"DukeFanClub",
"Desear" + "\u00ed" +
"a hacerme miembro del Duke Fan Club gratuitamente con mi compra de mas de 100" +
"\u20a0"
},
-
+
{ "UpdateQuantities", "Actualice las cantidades" },
-
+
{
"QuantitiesUpdated",
"Acaba de actualizar las cantidades en su cesta de compras"
},
-
+
{ "Quantities", "Copias del libro en su cesta de compras" },
-
+
{ "ChooseLocale", "Elija su Idioma en el Mapa" },
-
+
{ "English", "ingl" + "\u00e9" + "s" },
-
+
{ "German", "al" + "\u00e9" + "man" },
-
+
{ "Spanish", "espa" + "\u00f1" + "ol" },
-
+
{ "French", "franc" + "\u00e9" + "es" },
{ "CustomerInfo", "Incorpore su informaci" + "\u00f3" +
"n en la forma." },
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/template/InsertTag.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/template/InsertTag.java
index 30c67c6..6139e66 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/template/InsertTag.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/bookstore/src/template/InsertTag.java
@@ -65,7 +65,7 @@
context.getOut()
.print(parameter.getValue());
}
- // if parameter is indirect, include results of dispatching to page
+ // if parameter is indirect, include results of dispatching to page
else {
if ((parameter != null) && (parameter.getValue() != null)) {
context.include(parameter.getValue());
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/web/build.xml
index baf8e9c..0a326f4 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/build.xml
@@ -27,49 +27,49 @@
<param name="web-target" value="all"/>
</antcall>
</target>
-
+
<target name="run-test">
<antcall target="runejbtargets">
<param name="web-target" value="run-test"/>
</antcall>
</target>
-
+
<target name="clean">
<antcall target="runejbtargets">
<param name="web-target" value="clean"/>
</antcall>
</target>
-
+
<target name="build">
<antcall target="runejbtargets">
<param name="web-target" value="build"/>
</antcall>
</target>
-
+
<target name="deploy">
<antcall target="runejbtargets">
<param name="web-target" value="deploy"/>
</antcall>
</target>
-
+
<target name="undeploy">
<antcall target="runejbtargets">
<param name="web-target" value="undeploy"/>
</antcall>
</target>
-
+
<target name="run">
<antcall target="runejbtargets">
<param name="web-target" value="run"/>
</antcall>
</target>
-
+
<target name="setup">
<antcall target="runejbtargets">
<param name="web-target" value="setup"/>
</antcall>
</target>
-
+
<target name="unsetup">
<antcall target="runejbtargets">
<param name="web-target" value="unsetup"/>
@@ -98,7 +98,7 @@
</target>
<target name="usage">
- <echo> Usage:
+ <echo> Usage:
======== Targets by execution granularity =========
ant clean (Cleans all web tests)
@@ -115,11 +115,11 @@
ant all (Executes all the ejb tests)
===== Targets by technoloy and execution granularity ======
- Note: Run the command of the following type:
+ Note: Run the command of the following type:
% ant subclassing -Dweb-target=clean
to run the 'clean' target for 'subclassing' tests
- </echo>
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/build.properties
index bc31c6b..2852042 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/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="web"/>
-<property name="appname" value="${module}-simple-servlet"/>
+<property name="appname" value="${module}-simple-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="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="justservlet"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/build.xml
index 3d06653..0bde4c0 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/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"/>
@@ -42,43 +42,43 @@
</target>
<target name="build" depends="compile">
- <property name="hasWebclient" value="yes"/>
+ <property name="hasWebclient" value="yes"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
- <param name="webclient.war.classes" value="**/*.class"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
</antcall>
-
+
<antcall target="ear-common"/>
-
- </target>
-
+
+ </target>
+
<target name="deploy" depends="init-common">
<antcall target="deploy-common"/>
- <echo message="#########################"/>
- <echo message="use url simpleservlettest/index.html to see if application deployed correctly"/>
- <echo message="use url simpleservlettest/simpleservlettest to see if servlet executes fine"/>
- <echo message="#########################"/>
+ <echo message="#########################"/>
+ <echo message="use url simpleservlettest/index.html to see if application deployed correctly"/>
+ <echo message="use url simpleservlettest/simpleservlettest to see if servlet executes fine"/>
+ <echo message="#########################"/>
</target>
<target name="war-deploy" depends="init-common">
<antcall target="deploy-war-common"/>
- <echo message="#########################"/>
- <echo message="use url justservlet/index.html to see if application deployed correctly"/>
- <echo message="use url justservlet/simpleservlettest to see if servlet executes fine"/>
- <echo message="#########################"/>
+ <echo message="#########################"/>
+ <echo message="use url justservlet/index.html to see if application deployed correctly"/>
+ <echo message="use url justservlet/simpleservlettest to see if servlet executes fine"/>
+ <echo message="#########################"/>
</target>
-
+
<target name="run" depends="init-common">
<antcall target="runwebclient-common"/>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="undeploy-war" depends="init-common">
<antcall target="undeploy-war-common">
- </antcall>
- </target>
+ </antcall>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/servlet/Hello.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/servlet/Hello.java
index c2ba6db..892f20e 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/servlet/Hello.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/justservlet/servlet/Hello.java
@@ -51,43 +51,43 @@
HttpServletResponse response)
throws IOException, ServletException {
- response.setContentType("text/html");
- PrintWriter writer = response.getWriter();
+ response.setContentType("text/html");
+ PrintWriter writer = response.getWriter();
- writer.println("<html>");
- writer.println("<head>");
- writer.println("<title>Sample Application Servlet Page</title>");
- writer.println("</head>");
- writer.println("<body bgcolor=white>");
+ writer.println("<html>");
+ writer.println("<head>");
+ writer.println("<title>Sample Application Servlet Page</title>");
+ writer.println("</head>");
+ writer.println("<body bgcolor=white>");
- writer.println("<table border=\"0\">");
- writer.println("<tr>");
- writer.println("<td>");
- //writer.println("<img src=\"images/tomcat.gif\">");
- writer.println("</td>");
- writer.println("<td>");
- writer.println("<h1>Sample Application Servlet</h1>");
- writer.println("This is the output of a servlet that is part of");
- writer.println("the Hello, World application. It displays the");
- writer.println("request headers from the request we are currently");
- writer.println("processing.");
- writer.println("</td>");
- writer.println("</tr>");
- writer.println("</table>");
+ writer.println("<table border=\"0\">");
+ writer.println("<tr>");
+ writer.println("<td>");
+ //writer.println("<img src=\"images/tomcat.gif\">");
+ writer.println("</td>");
+ writer.println("<td>");
+ writer.println("<h1>Sample Application Servlet</h1>");
+ writer.println("This is the output of a servlet that is part of");
+ writer.println("the Hello, World application. It displays the");
+ writer.println("request headers from the request we are currently");
+ writer.println("processing.");
+ writer.println("</td>");
+ writer.println("</tr>");
+ writer.println("</table>");
- writer.println("<table border=\"0\" width=\"100%\">");
- Enumeration names = request.getHeaderNames();
- while (names.hasMoreElements()) {
- String name = (String) names.nextElement();
- writer.println("<tr>");
- writer.println(" <th align=\"right\">" + name + ":</th>");
- writer.println(" <td>" + request.getHeader(name) + "</td>");
- writer.println("</tr>");
- }
- writer.println("</table>");
+ writer.println("<table border=\"0\" width=\"100%\">");
+ Enumeration names = request.getHeaderNames();
+ while (names.hasMoreElements()) {
+ String name = (String) names.nextElement();
+ writer.println("<tr>");
+ writer.println(" <th align=\"right\">" + name + ":</th>");
+ writer.println(" <td>" + request.getHeader(name) + "</td>");
+ writer.println("</tr>");
+ }
+ writer.println("</table>");
- writer.println("</body>");
- writer.println("</html>");
+ writer.println("</body>");
+ writer.println("</html>");
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/build.properties
index e2cc75d..dc19c9b 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/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="web"/>
-<property name="appname" value="${module}-subclassing"/>
+<property name="appname" value="${module}-subclassing"/> \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="ejb-jar.xml" value="descriptor/ejb-jar.xml"/>
<property name="sun-ejb-jar.xml" value="descriptor/sun-ejb-jar.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="subclassing"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/build.xml
index 36b8a58..f4a8f82 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/build.xml
@@ -30,14 +30,14 @@
&commonBuild;
&commonRun;
&testproperties;
-
+
<target name="all" depends="build,setup,deploy-ear, run-ear, undeploy-ear, unsetup"/>
<target name="run-test" depends="build,deploy-ear, run-ear, undeploy-ear"/>
<target name="clean" depends="init-common">
<antcall target="clean-common"/>
</target>
-
+
<target name="sql" depends="init-common">
<antcall target="execute-sql-common">
<param name="sql.file" value="sql/simpleBank.sql"/>
@@ -49,9 +49,9 @@
<antcall target="deploy-jdbc-common">
<param name="jdbc.conpool.name" value="ejb-subclassing-pool"/>
<param name="jdbc.resource.name" value="jdbc/ejb-subclassing"/>
- </antcall>
+ </antcall>
</target>
-
+
<target name="restart">
<antcall target="restart-server-instance-common"/>
</target>
@@ -66,7 +66,7 @@
<param name="jdbc.resource.name" value="jdbc/ejb-subclassing"/>
</antcall>
</target>
-
+
<target name="compile" depends="clean">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -77,18 +77,18 @@
</target>
<target name="build" depends="compile">
- <property name="hasWebclient" value="yes"/>
+ <property name="hasWebclient" value="yes"/>
<antcall target="webclient-war-common">
<param name="hasWebclient" value="yes"/>
- <param name="webclient.war.classes" value="**/*.class"/>
+ <param name="webclient.war.classes" value="**/*.class"/>
</antcall>
-
+
<antcall target="ejb-jar-common">
<param name="ejbjar.classes" value="**/*.class"/>
</antcall>
<antcall target="ear-common"/>
- </target>
-
+ </target>
+
<target name="deploy-ear" depends="init-common">
<antcall target="deploy-verify-common"/>
</target>
@@ -96,26 +96,26 @@
<target name="deploy-war" depends="init-common">
<antcall target="deploy-war-common"/>
</target>
-
+
<target name="run-war" depends="init-common">
<antcall target="runwebclient-common">
- <param name="testsuite.id" value="web-to-ejb (stand-alone war based)"/>
- </antcall>
+ <param name="testsuite.id" value="web-to-ejb (stand-alone war based)"/>
+ </antcall>
</target>
<target name="run-ear" 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-ear" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="undeploy-war" depends="init-common">
<antcall target="undeploy-war-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/descriptor/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/descriptor/sun-ejb-jar.xml
index 7d86af5..39cba88 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/descriptor/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/descriptor/sun-ejb-jar.xml
@@ -29,20 +29,20 @@
<res-ref-name>jdbc/SimpleBank</res-ref-name>
<jndi-name>jdbc/ejb-subclassing</jndi-name>
</resource-ref>
- <is-read-only-bean>false</is-read-only-bean>
- <commit-option>B</commit-option>
- <bean-pool>
- <steady-pool-size>0</steady-pool-size>
- <resize-quantity>1</resize-quantity>
- <max-pool-size>10</max-pool-size>
- <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
- </bean-pool>
- <bean-cache>
- <max-cache-size>100</max-cache-size>
- <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
- <victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ <is-read-only-bean>false</is-read-only-bean>
+ <commit-option>B</commit-option>
+ <bean-pool>
+ <steady-pool-size>0</steady-pool-size>
+ <resize-quantity>1</resize-quantity>
+ <max-pool-size>10</max-pool-size>
+ <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
+ </bean-pool>
+ <bean-cache>
+ <max-cache-size>100</max-cache-size>
+ <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
+ <victim-selection-policy>LRU</victim-selection-policy>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>CustomerCheckingEJB</ejb-name>
@@ -51,20 +51,20 @@
<res-ref-name>jdbc/SimpleBank</res-ref-name>
<jndi-name>jdbc/ejb-subclassing</jndi-name>
</resource-ref>
- <is-read-only-bean>false</is-read-only-bean>
- <commit-option>B</commit-option>
- <bean-pool>
- <steady-pool-size>0</steady-pool-size>
- <resize-quantity>1</resize-quantity>
- <max-pool-size>10</max-pool-size>
+ <is-read-only-bean>false</is-read-only-bean>
+ <commit-option>B</commit-option>
+ <bean-pool>
+ <steady-pool-size>0</steady-pool-size>
+ <resize-quantity>1</resize-quantity>
+ <max-pool-size>10</max-pool-size>
<pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
- </bean-pool>
- <bean-cache>
+ </bean-pool>
+ <bean-cache>
<max-cache-size>100</max-cache-size>
<cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
<removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ </bean-cache>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/Customer.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/Customer.java
index d190dab..d1fb286 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/Customer.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/Customer.java
@@ -46,4 +46,4 @@
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerChecking.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerChecking.java
index c607812..e3659e5 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerChecking.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerChecking.java
@@ -22,4 +22,4 @@
{
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerCheckingEJB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerCheckingEJB.java
index 4c60179..d93fda4 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerCheckingEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerCheckingEJB.java
@@ -94,5 +94,5 @@
}
}
-
-
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerEJB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerEJB.java
index ec56481..75a8ebf 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerEJB.java
@@ -53,7 +53,7 @@
public String getAddress1()
{
- return address1;
+ return address1;
}
public String getAddress2()
@@ -139,7 +139,7 @@
System.out.println("SQL exception occured in ejbRemove method");
e.printStackTrace();
}
-
+
}
public void ejbStore()
@@ -206,12 +206,12 @@
} catch (SQLException e) {
System.out.println("SQLException occurred in ejbLoad() method");
e.printStackTrace();
- }
+ }
}
public void ejbActivate() {}
public void ejbPassivate() {}
}
-
-
-
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerSavings.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerSavings.java
index eea3192..7c0ae6b 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerSavings.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerSavings.java
@@ -22,4 +22,4 @@
{
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerSavingsEJB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerSavingsEJB.java
index fb87195..691ea4e 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerSavingsEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/ejb/CustomerSavingsEJB.java
@@ -95,6 +95,6 @@
}
}
-
-
-
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/Customer.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/Customer.java
index 0b2bcde..33903e0 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/Customer.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/Customer.java
@@ -40,4 +40,4 @@
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerChecking.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerChecking.java
index 8a1a39d..b8d6fb5 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerChecking.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerChecking.java
@@ -16,4 +16,4 @@
{
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerCheckingEJB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerCheckingEJB.java
index 09816dd..abcc337 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerCheckingEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerCheckingEJB.java
@@ -88,5 +88,5 @@
}
}
-
-
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerEJB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerEJB.java
index 44339d5..6569ccb 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerEJB.java
@@ -47,7 +47,7 @@
public String getAddress1()
{
- return address1;
+ return address1;
}
public String getAddress2()
@@ -133,7 +133,7 @@
System.out.println("SQL exception occured in ejbRemove method");
e.printStackTrace();
}
-
+
}
public void ejbStore()
@@ -200,12 +200,12 @@
} catch (SQLException e) {
System.out.println("SQLException occurred in ejbLoad() method");
e.printStackTrace();
- }
+ }
}
public void ejbActivate() {}
public void ejbPassivate() {}
}
-
-
-
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerSavings.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerSavings.java
index d27d99c..bcc2538 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerSavings.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerSavings.java
@@ -16,4 +16,4 @@
{
}
-
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerSavingsEJB.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerSavingsEJB.java
index f3bcaa8..c23bdd8 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerSavingsEJB.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/ejb/CustomerSavingsEJB.java
@@ -89,6 +89,6 @@
}
}
-
-
-
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/servlet/SimpleBankServlet.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/servlet/SimpleBankServlet.java
index 059943e..7470093 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/servlet/SimpleBankServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/samples/ejb/subclassing/servlet/SimpleBankServlet.java
@@ -11,16 +11,16 @@
package samples.ejb.subclassing.servlet;
import java.io.*;
-import java.util.*;
-import jakarta.servlet.*;
-import javax.naming.*;
-import jakarta.servlet.http.*;
+import java.util.*;
+import jakarta.servlet.*;
+import javax.naming.*;
+import jakarta.servlet.http.*;
import javax.rmi.PortableRemoteObject;
-import jakarta.ejb.*;
+import jakarta.ejb.*;
-import samples.ejb.subclassing.ejb.*;
+import samples.ejb.subclassing.ejb.*;
-public class SimpleBankServlet extends HttpServlet {
+public class SimpleBankServlet extends HttpServlet {
InitialContext initContext = null;
@@ -37,14 +37,14 @@
doLookup();
}
- public void doGet (HttpServletRequest request,HttpServletResponse response)
- throws ServletException, IOException {
+ public void doGet (HttpServletRequest request,HttpServletResponse response)
+ throws ServletException, IOException {
doPost(request, response);
- }
+ }
- /** handles the HTTP POST operation **/
- public void doPost (HttpServletRequest request,HttpServletResponse response)
- throws ServletException, IOException {
+ /** handles the HTTP POST operation **/
+ public void doPost (HttpServletRequest request,HttpServletResponse response)
+ throws ServletException, IOException {
System.out.println("SimpleBankServlet is executing");
String SSN = request.getParameter("SSN");
@@ -59,14 +59,14 @@
String zipCode = "";
long currentSavingsBalance = 0;
long currentCheckingBalance = 0;
-
+
String action = request.getParameter("action");
if (action.equals("Create"))
{
message = "Add Customer";
jsp = "/SimpleBankAdd.jsp";
}
- else if (action.equals("Add Customer"))
+ else if (action.equals("Add Customer"))
{
System.out.println("Add Customer button pressed");
SSN = request.getParameter("SSN");
@@ -121,7 +121,7 @@
}
message = "Customer Deleted.";
jsp = "/SimpleBankMessage.jsp";
- }
+ }
else if (action.equals("Update"))
@@ -198,7 +198,7 @@
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(jsp);
dispatcher.include(request, response);
return;
- }
+ }
public void doLookup()
{
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/servlet/SimpleBankServlet.java b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/servlet/SimpleBankServlet.java
index 0919514..070d5fe 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/servlet/SimpleBankServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/servlet/SimpleBankServlet.java
@@ -17,16 +17,16 @@
package samples.ejb.subclassing.servlet;
import java.io.*;
-import java.util.*;
-import jakarta.servlet.*;
-import javax.naming.*;
-import jakarta.servlet.http.*;
+import java.util.*;
+import jakarta.servlet.*;
+import javax.naming.*;
+import jakarta.servlet.http.*;
import javax.rmi.PortableRemoteObject;
-import jakarta.ejb.*;
+import jakarta.ejb.*;
-import samples.ejb.subclassing.ejb.*;
+import samples.ejb.subclassing.ejb.*;
-public class SimpleBankServlet extends HttpServlet {
+public class SimpleBankServlet extends HttpServlet {
InitialContext initContext = null;
@@ -43,14 +43,14 @@
doLookup();
}
- public void doGet (HttpServletRequest request,HttpServletResponse response)
- throws ServletException, IOException {
+ public void doGet (HttpServletRequest request,HttpServletResponse response)
+ throws ServletException, IOException {
doPost(request, response);
- }
+ }
- /** handles the HTTP POST operation **/
- public void doPost (HttpServletRequest request,HttpServletResponse response)
- throws ServletException, IOException {
+ /** handles the HTTP POST operation **/
+ public void doPost (HttpServletRequest request,HttpServletResponse response)
+ throws ServletException, IOException {
System.out.println("SimpleBankServlet is executing");
String SSN = request.getParameter("SSN");
@@ -65,14 +65,14 @@
String zipCode = "";
long currentSavingsBalance = 0;
long currentCheckingBalance = 0;
-
+
String action = request.getParameter("action");
if (action.equals("Create"))
{
message = "Add Customer";
jsp = "/SimpleBankAdd.jsp";
}
- else if (action.equals("Add Customer"))
+ else if (action.equals("Add Customer"))
{
System.out.println("Add Customer button pressed");
SSN = request.getParameter("SSN");
@@ -127,7 +127,7 @@
}
message = "Customer Deleted.";
jsp = "/SimpleBankMessage.jsp";
- }
+ }
else if (action.equals("Update"))
@@ -204,7 +204,7 @@
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(jsp);
dispatcher.include(request, response);
return;
- }
+ }
public void doLookup()
{
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sql/dropBankTables.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sql/dropBankTables.sql
index df9df34..33a7069 100755
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sql/dropBankTables.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sql/dropBankTables.sql
@@ -1 +1 @@
-drop table customer2;
+drop table customer2;
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sql/simpleBank.sql b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sql/simpleBank.sql
index 1b10a2c..069b5a9 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sql/simpleBank.sql
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sql/simpleBank.sql
@@ -1,21 +1,21 @@
-drop table customer2;
-
-CREATE TABLE customer2 (
- SSN VARCHAR(9),
- lastName VARCHAR(24),
- firstname VARCHAR(20),
- address1 varchar(20),
- address2 varchar(20),
- city varchar(10) ,
- state varchar(10),
- zipcode varchar(5),
- savingsbalance numeric(10),
- checkingbalance numeric(10)
-);
-
-insert into customer2 values ('123456789', 'Smith', 'Rob', '1111', 'First Street', 'San Jose', 'CA', '12345', 5123, 1234);
-
-
-
-
-
+drop table customer2;
+
+CREATE TABLE customer2 (
+ SSN VARCHAR(9),
+ lastName VARCHAR(24),
+ firstname VARCHAR(20),
+ address1 varchar(20),
+ address2 varchar(20),
+ city varchar(10) ,
+ state varchar(10),
+ zipcode varchar(5),
+ savingsbalance numeric(10),
+ checkingbalance numeric(10)
+);
+
+insert into customer2 values ('123456789', 'Smith', 'Rob', '1111', 'First Street', 'San Jose', 'CA', '12345', 5123, 1234);
+
+
+
+
+
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sun-ejb-jar.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sun-ejb-jar.xml
index e0ad088..0d2847a 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sun-ejb-jar.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/subclassing/sun-ejb-jar.xml
@@ -29,20 +29,20 @@
<res-ref-name>jdbc/SimpleBank</res-ref-name>
<jndi-name>jdbc/ejb-subclassing</jndi-name>
</resource-ref>
- <is-read-only-bean>false</is-read-only-bean>
- <commit-option>B</commit-option>
- <bean-pool>
- <steady-pool-size>0</steady-pool-size>
- <resize-quantity>1</resize-quantity>
- <max-pool-size>10</max-pool-size>
- <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
- </bean-pool>
- <bean-cache>
- <max-cache-size>100</max-cache-size>
- <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
- <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
- <victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ <is-read-only-bean>false</is-read-only-bean>
+ <commit-option>B</commit-option>
+ <bean-pool>
+ <steady-pool-size>0</steady-pool-size>
+ <resize-quantity>1</resize-quantity>
+ <max-pool-size>10</max-pool-size>
+ <pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
+ </bean-pool>
+ <bean-cache>
+ <max-cache-size>100</max-cache-size>
+ <cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
+ <removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
+ <victim-selection-policy>LRU</victim-selection-policy>
+ </bean-cache>
</ejb>
<ejb>
<ejb-name>CustomerCheckingEJB</ejb-name>
@@ -51,20 +51,20 @@
<res-ref-name>jdbc/SimpleBank</res-ref-name>
<jndi-name>jdbc/ejb-subclassing</jndi-name>
</resource-ref>
- <is-read-only-bean>false</is-read-only-bean>
- <commit-option>B</commit-option>
- <bean-pool>
- <steady-pool-size>0</steady-pool-size>
- <resize-quantity>1</resize-quantity>
- <max-pool-size>10</max-pool-size>
+ <is-read-only-bean>false</is-read-only-bean>
+ <commit-option>B</commit-option>
+ <bean-pool>
+ <steady-pool-size>0</steady-pool-size>
+ <resize-quantity>1</resize-quantity>
+ <max-pool-size>10</max-pool-size>
<pool-idle-timeout-in-seconds>3600</pool-idle-timeout-in-seconds>
- </bean-pool>
- <bean-cache>
+ </bean-pool>
+ <bean-cache>
<max-cache-size>100</max-cache-size>
<cache-idle-timeout-in-seconds>60</cache-idle-timeout-in-seconds>
<removal-timeout-in-seconds>3600</removal-timeout-in-seconds>
<victim-selection-policy>LRU</victim-selection-policy>
- </bean-cache>
+ </bean-cache>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/web/web-common.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/web/web-common.xml
index 0079d66..fd4ea06 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/web/web-common.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/web/web-common.xml
@@ -21,7 +21,7 @@
<!--
<property file="web-common.properties"/>
-->
-<property name="com.sun.aas.pointbaseRoot"
+<property name="com.sun.aas.pointbaseRoot"
value="${env.S1AS_HOME}/pointbase"/>
<property name="com.sun.aas.webServicesLib" value="${env.S1AS_HOME}"/>
@@ -36,7 +36,7 @@
<property name="earDD" value="application.xml,sun-application.xml"/>
<property name="warDD" value="sun-web.xml,web.xml"/>
<property name="jarDD" value="ejb-jar.xml,sun-ejb-jar.xml"/>
-<property name="clientDD"
+<property name="clientDD"
value="application-client.xml,sun-application-client.xml"/>
<!-- change this property to use a compiler other than javac. -->
@@ -62,7 +62,7 @@
<property name="war" value="${appname}.war"/>
<property name="jar" value="${appname}.jar"/>
<property name="ejbjar" value="${appname}Ejb.jar"/>
-<property name="clientjar" value="${appname}Client.jar"/>
+<property name="clientjar" value="${appname}Client.jar"/>
<property name="verify.file" value="../${ear}"/>
<property name="deploy.file" value="../${ear}"/>
@@ -70,7 +70,7 @@
<property name="apptype" value="application"/>
<!-- classpath jar files location. -->
-<property name="sample.classpath.dir"
+<property name="sample.classpath.dir"
value="${com.sun.aas.installRoot}/lib"/>
<property name="optional.taskdef.jar" value="sun-appserv-ant.jar"/>
@@ -90,7 +90,7 @@
<!-- define these properties if samples dont define -->
<property name="classpath.prefix" value="."/>
<property name="classpath.suffix" value="."/>
- <property name="build.classpath"
+ <property name="build.classpath"
value="${classpath.prefix}:${build.classesdir}:${sunone.cpath}:${classpath.suffix}:${env.APS_HOME}/lib/reporter.jar"/>
</target>
@@ -99,7 +99,7 @@
<fileset dir="${com.sun.aas.installRoot}/lib" includes="*.jar" />
<fileset dir="${com.sun.aas.webServicesLib}" includes="*.jar"/>
</path>
- <pathconvert pathsep=":" property="sunone.cpath"
+ <pathconvert pathsep=":" property="sunone.cpath"
refid="sample_classpath_jars"/>
</target>
@@ -116,9 +116,9 @@
<mkdir dir="${build.classesdir}"/>
<echo message="Compiling source files" />
<javac srcdir="."
- destdir="${build.classesdir}"
+ destdir="${build.classesdir}"
classpath="${build.classpath}"/>
-</target>
+</target>
@@ -173,9 +173,9 @@
<!-- Assemble WAR module. -->
<!-- ======================================================= -->
<target name="check_warfile">
-<available file="${build.classesdir}/${war.pkg}/" type="dir"
+<available file="${build.classesdir}/${war.pkg}/" type="dir"
property="warfiles.present"/>
-<available file="${src}/docroot" type="dir"
+<available file="${src}/docroot" type="dir"
property="docroot.present"/>
</target>
@@ -192,11 +192,11 @@
</target>
<target name="copy_ejbjar_war" if="ejbjar.done">
-<copy file="${assemble.ejbjar}/${ejbjar}"
+<copy file="${assemble.ejbjar}/${ejbjar}"
tofile="${assemble.war}/WEB-INF/lib/${ejbjar}"/>
</target>
-<target name="create_war_common"
+<target name="create_war_common"
depends="clean_war_common,check_warfile,copy_docroot,copy_warfiles,copy_ejbjar_war">
<mkdir dir="${assemble.war}"/>
<copy todir="${assemble.war}/WEB-INF/">
@@ -215,7 +215,7 @@
</target>
<target name="copy_ejbjar" if="ejbjar.done">
-<copy file="${assemble.ejbjar}/${ejbjar}"
+<copy file="${assemble.ejbjar}/${ejbjar}"
tofile="${assemble.ear}/${ejbjar}"/>
</target>
@@ -224,7 +224,7 @@
</target>
<target name="copy_clientjar" if="clientjar.done">
- <copy file="${assemble.clientjar}/${clientjar}"
+ <copy file="${assemble.clientjar}/${clientjar}"
tofile="${assemble.ear}/${clientjar}"/>
</target>
@@ -271,7 +271,7 @@
<target name="clientjar_common" depends="clean_clientjar_common">
<mkdir dir="${assemble.clientjar}"/>
<copy todir="${assemble.clientjar}/${app.pkg}">
- <fileset dir="${build.classesdir}/${app.pkg}/"
+ <fileset dir="${build.classesdir}/${app.pkg}/"
includes="**/*Client.class" excludes="**/servlet/"/>
</copy>
<mkdir dir="${assemble.clientjar}/META-INF"/>
@@ -279,7 +279,7 @@
<fileset dir="." includes="${clientDD}"/>
</copy>
<jar jarfile="../${clientjar}"
- basedir="${assemble.clientjar}"
+ basedir="${assemble.clientjar}"
manifest="MANIFEST.MF"/>
<move file="../${clientjar}" todir="${assemble.clientjar}"/>
<property name="clientjar.done" value="true"/>
@@ -289,7 +289,7 @@
<target name="create_jar_common" depends="clean_jar_common">
<mkdir dir="${assemble.jar}"/>
<copy todir="${assemble.jar}/${app.pkg}">
- <fileset dir="${build.classesdir}/${app.pkg}/"
+ <fileset dir="${build.classesdir}/${app.pkg}/"
includes="**/*.class"/>
</copy>
<jar jarfile="../${jar}"
@@ -298,24 +298,24 @@
<copy file="${assemble.jar}/${jar}" tofile="../${jar}"/>
</target>
- <target name="deploy_common" depends="init-common">
+ <target name="deploy_common" depends="init-common">
<echo message="Deploying ${deploy.file}."/>
-
+
<echo message="Deploying ${appname}."/>
<exec executable="${ASADMIN}">
<arg line="deploy"/>
<arg line="${as.props}"/>
<arg line="--name ${appname} --type ${apptype}"/>
<arg line="--retrieve ${assemble}"/>
- <arg line="--instance ${appserver.instance.name}"/>
+ <arg line="--instance ${appserver.instance.name}"/>
<arg line="${deploy.file}"/>
</exec>
</target>
-
+
<target name="runclient_common" depends="init-common">
<exec executable="${APPCLIENT}">
- <env key="VMARGS"
+ <env key="VMARGS"
value="-Dtest.results=${env.APS_HOME}/test_results.xml"/>
<arg line="-client ${assemble}/${appname}Client.jar"/>
<arg line="-name ${display_name}"/>
@@ -344,7 +344,7 @@
<target name="keydel_common" depends="setup_env,init-common">
<antcall target="delete-user-common">
<param name="user" value="${app.user}"/>
-</antcall>
+</antcall>
</target>
<!-- ======================================================= -->
@@ -361,9 +361,9 @@
<arg line="--precompiledjsp true"/>
<arg line="--upload true"/>
<arg line="--retrieve ${assemble.dir}"/>
- <arg line="--instance ${appserver.instance.name}"/>
+ <arg line="--instance ${appserver.instance.name}"/>
</exec>
- </target>
+ </target>
<!-- ======================================================= -->
<!-- Uninstall targets. -->
@@ -373,9 +373,9 @@
<exec executable="${ASADMIN}">
<arg line="undeploy"/>
<arg line="${as.props}"/>
- <arg line="--type ${apptype}"/>
- <arg line="--instance ${appserver.instance.name}"/>
- <arg line="${appname}"/>
+ <arg line="--type ${apptype}"/>
+ <arg line="--instance ${appserver.instance.name}"/>
+ <arg line="${appname}"/>
</exec>
</target>
@@ -387,13 +387,13 @@
<echo message="Doing admin task ${admin.command}"/>
<echo message="Operand ${operand.props}"/>
<exec executable="${ASADMIN}">
- <arg line="${admin.command} ${as.props} ${operand.props}" />
-</exec>
+ <arg line="${admin.command} ${as.props} ${operand.props}" />
+</exec>
</target>
<target name="reconfig_common" depends="setup_env">
<echo message="Reconfiguring server ${sunone.instance}"/>
-<antcall target="reconfig-common"/>
+<antcall target="reconfig-common"/>
</target>
<target name="javadocs_common" depends="init_common">
@@ -406,17 +406,17 @@
</target>
-<!-- ======================================================= -->
-<!-- CleanUp Pointbase table Targets. -->
<!-- ======================================================= -->
-<target name="sql_common" depends="init-common">
- <java classname="com.pointbase.tools.toolsCommander"
+<!-- CleanUp Pointbase table Targets. -->
+<!-- ======================================================= -->
+<target name="sql_common" depends="init-common">
+ <java classname="com.pointbase.tools.toolsCommander"
classpath="${db.classpath}"
fork="true"
- >
- <arg line="${db.driver} ${db.url} ${db.file} ${db.user} ${db.pwd}" />
+ >
+ <arg line="${db.driver} ${db.url} ${db.file} ${db.user} ${db.pwd}" />
</java>
-
+
<!-- <sql driver="${db.driver}"
url="${db.url}"
userid="${db.user}"
@@ -440,10 +440,10 @@
<property name="ds.class" value="com.pointbase.jdbc.jdbcDataSource" />
<antcall target="admin_command_common">
<param name="admin.command"
- value="create-jdbc-connection-pool
+ value="create-jdbc-connection-pool
--datasourceclassname ${ds.class}
--instance ${sunone.instance}" />
- <param name="operand.props"
+ <param name="operand.props"
value="${conpool.name}" />
</antcall>
<antcall target="admin_command_common">
@@ -469,7 +469,7 @@
<target name="create-jdbc-resource_common">
<antcall target="admin_command_common">
<param name="admin.command"
- value="create-jdbc-resource
+ value="create-jdbc-resource
--connectionpoolid ${conpool.name}
--instance ${sunone.instance}" />
<param name="operand.props"
@@ -480,7 +480,7 @@
<target name="delete-jdbc-connection-pool_common">
<antcall target="admin_command_common">
<param name="admin.command"
- value="delete-jdbc-connection-pool
+ value="delete-jdbc-connection-pool
--instance ${sunone.instance}" />
<param name="operand.props"
value="${conpool.name}" />
@@ -490,7 +490,7 @@
<target name="delete-jdbc-resource_common">
<antcall target="admin_command_common">
<param name="admin.command"
- value="delete-jdbc-resource
+ value="delete-jdbc-resource
--instance ${sunone.instance}" />
<param name="operand.props"
value="${jdbc.resource.name}" />
@@ -519,19 +519,19 @@
<target name="create-persistence-resource_common" depends="setup_env">
<antcall target="admin_command_common">
<param name="admin.command"
- value="create-persistence-resource
+ value="create-persistence-resource
--instance ${sunone.instance}" />
<param name="operand.props"
value="${pm.resource.name}" />
</antcall>
<antcall target="admin_command_common">
<param name="admin.command" value="set" />
- <param name="operand.props"
+ <param name="operand.props"
value="${resources.dottedname.prefix}.persistence-manager-factory-resource.${pm.resource.name}.factory_class=${pm.factory.class}"/>
</antcall>
<antcall target="admin_command_common">
<param name="admin.command" value="set" />
- <param name="operand.props"
+ <param name="operand.props"
value="${resources.dottedname.prefix}.persistence-manager-factory-resource.${pm.resource.name}.jdbc_resource_jndi_name=${jdbc.resource.name}" />
</antcall>
</target>
@@ -539,9 +539,9 @@
<target name="delete-persistence-resource_common" depends="setup_env">
<antcall target="admin_command_common">
<param name="admin.command"
- value="delete-persistence-resource
+ value="delete-persistence-resource
--instance ${sunone.instance}" />
- <param name="operand.props"
+ <param name="operand.props"
value="${pm.resource.name}" />
</antcall>
</target>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/build.xml
index 3f0bb53..fa2b9ca 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/build.xml
@@ -27,49 +27,49 @@
<param name="ws-target" value="all"/>
</antcall>
</target>
-
+
<target name="run-test">
<antcall target="runwstargets">
<param name="ws-target" value="run-test"/>
</antcall>
</target>
-
+
<target name="clean">
<antcall target="runwstargets">
<param name="ws-target" value="clean"/>
</antcall>
</target>
-
+
<target name="build">
<antcall target="runwstargets">
<param name="ws-target" value="build"/>
</antcall>
</target>
-
+
<target name="deploy">
<antcall target="runwstargets">
<param name="ws-target" value="deploy"/>
</antcall>
</target>
-
+
<target name="undeploy">
<antcall target="runwstargets">
<param name="ws-target" value="undeploy"/>
</antcall>
</target>
-
+
<target name="run">
<antcall target="runwstargets">
<param name="ws-target" value="run"/>
</antcall>
</target>
-
+
<target name="setup">
<antcall target="runwstargets">
<param name="ws-target" value="setup"/>
</antcall>
</target>
-
+
<target name="unsetup">
<antcall target="runwstargets">
<param name="ws-target" value="unsetup"/>
@@ -97,7 +97,7 @@
</target>
<target name="usage">
- <echo> Usage:
+ <echo> Usage:
======== Targets by execution granularity =========
ant clean (Cleans all ws tests)
@@ -115,11 +115,11 @@
ant all (Executes all the ws tests)
===== Targets by technoloy and execution granularity ======
- Note: Run the command of the following type:
+ Note: Run the command of the following type:
% ant servletws -Dws-target=clean
to run the 'clean' target for 'servletws' tests
- </echo>
+ </echo>
</target>
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/build.properties
index 4805582..1230981 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/build.properties
@@ -15,22 +15,22 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property name="module" value="ws"/>
-<property name="appname" value="${module}-ejbtaxcal"/>
+<property name="appname" value="${module}-ejbtaxcal"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.s1peqe.webservices.ejb.taxcal.client.TaxCalClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.webservices.ejb.taxcal.client.TaxCalClient"/>
<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/ejb-jar.xml"/>
<property name="sun-ejb-jar.xml" value="descriptor/ejb/sun-ejb-jar.xml"/>
-<property name="application-client.xml"
- value="descriptor/client/application-client.xml"/>
-<property name="sun-application-client.xml"
- value="descriptor/client/sun-application-client.xml"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="application-client.xml"\u0020
+ value="descriptor/client/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/client/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="wsdl-file" value="wsdl/TaxCalEjbService.wsdl"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/build.xml
index 32eeaed..3795040 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/build.xml
@@ -29,7 +29,7 @@
&commonBuild;
&testproperties;
- <target name="all"
+ <target name="all"
depends="clean, build, setup, deploy, run, undeploy, unsetup"/>
<target name="run-test" depends="clean, build, deploy, run, undeploy"/>
@@ -39,7 +39,7 @@
<target name="setup"/>
<target name="unsetup"/>
-
+
<target name="compile" depends="init-common,clean-common, generate-artifacts">
<antcall target="compile-common">
<param name="src" value="ejb"/>
@@ -50,18 +50,18 @@
</target>
<target name="generate-artifacts">
- <antcall target="import-wsdl">
- <param name="mapping.file"
- value="${ejb-mapping.xml}"/>
- <param name="config-wsdl.file"
- value="config/config-ejb.xml"/>
- </antcall>
- <antcall target="import-wsdl">
- <param name="mapping.file"
- value="${client-mapping.xml}"/>
- <param name="config-wsdl.file"
- value="config/config-client.xml"/>
- </antcall>
+ <antcall target="import-wsdl">
+ <param name="mapping.file"
+ value="${ejb-mapping.xml}"/>
+ <param name="config-wsdl.file"
+ value="config/config-ejb.xml"/>
+ </antcall>
+ <antcall target="import-wsdl">
+ <param name="mapping.file"
+ value="${client-mapping.xml}"/>
+ <param name="config-wsdl.file"
+ value="config/config-client.xml"/>
+ </antcall>
</target>
<target name="ws-package-appclientjar-common">
<mkdir dir="${assemble.dir}"/>
@@ -122,13 +122,13 @@
</target>
<target name="build" depends="init-common,compile">
- <antcall target="ws-package-ejb-jar-common">
- <param name="ejbjar.classes"
+ <antcall target="ws-package-ejb-jar-common">
+ <param name="ejbjar.classes"
value="com/sun/s1peqe/webservices/ejb/taxcal/*.class" />
<param name="ejbjar.files" value="${build.classes.dir}"/>
<param name="ejb.jar" value="${assemble.dir}/${appname}-ejb.jar"/>
- </antcall>
- <antcall target="ws-package-appclientjar-common">
+ </antcall>
+ <antcall target="ws-package-appclientjar-common">
<param name="appclientjar.classes"
value="com/sun/s1peqe/webservices/ejb/taxcal/client/*.class" />
<param name="appclientjar.files"
@@ -138,17 +138,17 @@
</antcall>
<antcall target="ear-common"/>
- </target>
+ </target>
<target name="deploy"
depends="init-common, reconfig-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
- <property name="statetax-ejb-endpoint-url"
+ <property name="statetax-ejb-endpoint-url"
value="http://${http.host}:${http.port}/statetaxejb"/>
- <property name="fedtax-ejb-endpoint-url"
+ <property name="fedtax-ejb-endpoint-url"
value="http://${http.host}:${http.port}/fedtaxejb"/>
<echo message="property statetax-ejb-endpoint-url is set to: ${statetax-ejb-endpoint-url}"/>
@@ -159,17 +159,17 @@
value="${statetax-ejb-endpoint-url} ${fedtax-ejb-endpoint-url}"/>
</antcall>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
</target>
- <!--
- =======================================================
+ <!--
+ =======================================================
User Defined specific targets
=======================================================
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/client/TaxCalClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/client/TaxCalClient.java
index 5c201a9..5cb5016 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/client/TaxCalClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/client/TaxCalClient.java
@@ -24,91 +24,91 @@
public class TaxCalClient {
- private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
- private static String stateTaxEndpoint = null;
- private static String fedTaxEndpoint = null;
- private static String testSuite = "TaxCalEjbbasedWS";
- private static String testCase = null;
- private static TaxCalEjbService taxCalService = null;
+ private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
+ private static String stateTaxEndpoint = null;
+ private static String fedTaxEndpoint = null;
+ private static String testSuite = "TaxCalEjbbasedWS";
+ private static String testCase = null;
+ private static TaxCalEjbService taxCalService = null;
- public static void main (String[] args) {
+ public static void main (String[] args) {
- if(args[0] == null || args[1] == null){
- System.out.println("TaxCal client: Argument missing. Please provide target" +
- "endpoint address as argument");
- System.exit(1);
- } else {
- stateTaxEndpoint = args[0];
- fedTaxEndpoint = args[1];
- }
+ if(args[0] == null || args[1] == null){
+ System.out.println("TaxCal client: Argument missing. Please provide target" +
+ "endpoint address as argument");
+ System.exit(1);
+ } else {
+ stateTaxEndpoint = args[0];
+ fedTaxEndpoint = args[1];
+ }
- stat.addDescription("This is to test ejb based webservice");
- try {
- TaxCalClient client = new TaxCalClient();
- Context ic = new InitialContext();
- taxCalService = (TaxCalEjbService)
- ic.lookup("java:comp/env/service/TaxCalEjbService");
+ stat.addDescription("This is to test ejb based webservice");
+ try {
+ TaxCalClient client = new TaxCalClient();
+ Context ic = new InitialContext();
+ taxCalService = (TaxCalEjbService)
+ ic.lookup("java:comp/env/service/TaxCalEjbService");
- client.callStateTaxService();
- client.callFedTaxService();
- }catch(Exception e){
- e.printStackTrace();
- }
+ client.callStateTaxService();
+ client.callFedTaxService();
+ }catch(Exception e){
+ e.printStackTrace();
+ }
- stat.printSummary(testSuite);
+ stat.printSummary(testSuite);
}
-
- public void callStateTaxService() {
- double income = 85000.00;
- double deductions = 5000.00;
- //String targetEndpointAddress =
- // "http://localhost:1024/taxcalculator";
+ public void callStateTaxService() {
+ double income = 85000.00;
+ double deductions = 5000.00;
- try {
+ //String targetEndpointAddress =
+ // "http://localhost:1024/taxcalculator";
- StateTaxIF taxCalIFPort = taxCalService.getStateTaxIFPort();
+ try {
- ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
- stateTaxEndpoint);
+ StateTaxIF taxCalIFPort = taxCalService.getStateTaxIFPort();
- double stateTax = taxCalIFPort.getStateTax(income, deductions);
- System.out.println("State tax from ejb based TaxCalService :" + stateTax);
+ ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ stateTaxEndpoint);
- if(stateTax == 24000.00)
- stat.addStatus(testSuite + " StateTaxPort", stat.PASS);
- else
- stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
+ double stateTax = taxCalIFPort.getStateTax(income, deductions);
+ System.out.println("State tax from ejb based TaxCalService :" + stateTax);
- } catch (Exception ex) {
- System.out.println("TaxCalEjbWebservice client failed");
- stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
- ex.printStackTrace();
- }
- }
+ if(stateTax == 24000.00)
+ stat.addStatus(testSuite + " StateTaxPort", stat.PASS);
+ else
+ stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
- public void callFedTaxService() {
- double income = 97000.00;
- double deductions = 7000.00;
- try {
+ } catch (Exception ex) {
+ System.out.println("TaxCalEjbWebservice client failed");
+ stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
+ ex.printStackTrace();
+ }
+ }
- FedTaxIF taxCalIFPort = taxCalService.getFedTaxIFPort();
- ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
- fedTaxEndpoint);
+ public void callFedTaxService() {
+ double income = 97000.00;
+ double deductions = 7000.00;
+ try {
- double fedTax = taxCalIFPort.getFedTax(income, deductions);
- System.out.println("Fed tax from Ejb based TaxCalService :" + fedTax);
+ FedTaxIF taxCalIFPort = taxCalService.getFedTaxIFPort();
+ ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ fedTaxEndpoint);
- if(fedTax == 18000.00)
- stat.addStatus(testSuite + " FedTaxPort", stat.PASS);
- else
- stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
-
- } catch (Exception ex) {
- System.out.println("TaxCalEjbWebService client failed");
- stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
- ex.printStackTrace();
- }
- }
+ double fedTax = taxCalIFPort.getFedTax(income, deductions);
+ System.out.println("Fed tax from Ejb based TaxCalService :" + fedTax);
+
+ if(fedTax == 18000.00)
+ stat.addStatus(testSuite + " FedTaxPort", stat.PASS);
+ else
+ stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
+
+ } catch (Exception ex) {
+ System.out.println("TaxCalEjbWebService client failed");
+ stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
+ ex.printStackTrace();
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-client.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-client.xml
index 9fcebd8..d0f7520 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-client.xml
@@ -19,7 +19,7 @@
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <wsdl
+ <wsdl
location="wsdl/TaxCalEjbService.wsdl"
packageName="com.sun.s1peqe.webservices.ejb.taxcal.client"/>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-ejb.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-ejb.xml
index 4420ebd..794bd50 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-ejb.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-ejb.xml
@@ -19,7 +19,7 @@
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <wsdl
+ <wsdl
location="wsdl/TaxCalEjbService.wsdl"
packageName="com.sun.s1peqe.webservices.ejb.taxcal"/>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-sei.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-sei.xml
index a888fe6..4e16610 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-sei.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/config/config-sei.xml
@@ -18,16 +18,16 @@
-->
<configuration
- xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <service name="TaxCalEjbService"
- targetNamespace="http://tax.org/wsdl"
- typeNamespace="http://tax.org/types"
- packageName="com.sun.s1peqe.webservices.ejb.taxcal">
- <interface name="com.sun.s1peqe.webservices.ejb.taxcal.FedTaxIF"
- servantName="com.sun.s1peqe.webservices.ejb.taxcal.FedTaxEjb"/>
- <interface name="com.sun.s1peqe.webservices.ejb.taxcal.StateTaxIF"
- servantName="com.sun.s1peqe.webservices.ejb.taxcal.StateTaxEjb">
- </interface>
- </service>
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service name="TaxCalEjbService"
+ targetNamespace="http://tax.org/wsdl"
+ typeNamespace="http://tax.org/types"
+ packageName="com.sun.s1peqe.webservices.ejb.taxcal">
+ <interface name="com.sun.s1peqe.webservices.ejb.taxcal.FedTaxIF"
+ servantName="com.sun.s1peqe.webservices.ejb.taxcal.FedTaxEjb"/>
+ <interface name="com.sun.s1peqe.webservices.ejb.taxcal.StateTaxIF"
+ servantName="com.sun.s1peqe.webservices.ejb.taxcal.StateTaxEjb">
+ </interface>
+ </service>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/FedTaxEjb.java b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/FedTaxEjb.java
index f45cb45..edcf25c 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/FedTaxEjb.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/FedTaxEjb.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.webservices.ejb.taxcal;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import jakarta.ejb.SessionBean;
import jakarta.ejb.SessionContext;
import jakarta.ejb.EJBException;
@@ -26,11 +26,11 @@
public class FedTaxEjb implements SessionBean {
private SessionContext sc;
-
+
public FedTaxEjb(){}
-
+
public void ejbCreate() throws RemoteException {
- System.out.println("In FedTaxEjb::ejbCreate !!");
+ System.out.println("In FedTaxEjb::ejbCreate !!");
}
public double getFedTax(double income, double deductions) {
@@ -38,13 +38,13 @@
}
public void setSessionContext(SessionContext sc) {
-
+
this.sc = sc;
}
-
+
public void ejbRemove() throws RemoteException {}
-
+
public void ejbActivate() {}
-
+
public void ejbPassivate() {}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/FedTaxIF.java b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/FedTaxIF.java
index c37b0cc..4decc47 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/FedTaxIF.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/FedTaxIF.java
@@ -22,6 +22,6 @@
public interface FedTaxIF extends Remote{
- public double getFedTax(double income, double deductions) throws RemoteException;
+ public double getFedTax(double income, double deductions) throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/StateTaxEjb.java b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/StateTaxEjb.java
index 78cea45..3357ecc 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/StateTaxEjb.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/StateTaxEjb.java
@@ -17,7 +17,7 @@
package com.sun.s1peqe.webservices.ejb.taxcal;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import jakarta.ejb.SessionBean;
import jakarta.ejb.SessionContext;
import jakarta.ejb.EJBException;
@@ -26,11 +26,11 @@
public class StateTaxEjb implements SessionBean {
private SessionContext sc;
-
+
public StateTaxEjb(){}
-
+
public void ejbCreate() throws RemoteException {
- System.out.println("In StateTaxEjb::ejbCreate !!");
+ System.out.println("In StateTaxEjb::ejbCreate !!");
}
public double getStateTax(double income, double deductions) {
@@ -38,13 +38,13 @@
}
public void setSessionContext(SessionContext sc) {
-
+
this.sc = sc;
}
-
+
public void ejbRemove() throws RemoteException {}
-
+
public void ejbActivate() {}
-
+
public void ejbPassivate() {}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/StateTaxIF.java b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/StateTaxIF.java
index 2c945f2..26f9463 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/StateTaxIF.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/ejbws/ejb/StateTaxIF.java
@@ -22,6 +22,6 @@
public interface StateTaxIF extends Remote{
- public double getStateTax(double income, double deductions) throws RemoteException;
+ public double getStateTax(double income, double deductions) throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/build.properties b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/build.properties
index edc2829..d3550f2 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/build.properties
@@ -14,20 +14,20 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
--->
+-->\u0020
<property name="module" value="ws"/>
-<property name="appname" value="${module}-taxcal"/>
+<property name="appname" value="${module}-taxcal"/> \u0020
<property name="assemble" value="${build.classes.dir}/archive"/>
-<property name="test.client"
- value="com.sun.s1peqe.webservices.servlet.taxcal.client.TaxCalClient"/>
+<property name="test.client"\u0020
+ value="com.sun.s1peqe.webservices.servlet.taxcal.client.TaxCalClient"/>
<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/client/application-client.xml"/>
-<property name="sun-application-client.xml"
- value="descriptor/client/sun-application-client.xml"/>
-<property name="appclientjar.files" value="${build.classes.dir}"/>
+<property name="application-client.xml"\u0020
+ value="descriptor/client/application-client.xml"/>
+<property name="sun-application-client.xml"\u0020
+ value="descriptor/client/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="wsdl-file" value="wsdl/TaxCalServletService.wsdl"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/build.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/build.xml
index 81677d1..04c9217 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/build.xml
@@ -29,10 +29,10 @@
&commonBuild;
&testproperties;
- <target name="all"
+ <target name="all"
depends="clean, build, setup, deploy, run, undeploy, unsetup"/>
- <target name="run-test"
+ <target name="run-test"
depends="clean, build, deploy, run, undeploy"/>
<target name="clean" depends="init-common">
@@ -41,7 +41,7 @@
<target name="setup"/>
<target name="unsetup"/>
-
+
<target name="compile" depends="init-common,clean-common, generate-artifacts">
<antcall target="compile-common">
<param name="src" value="client"/>
@@ -138,38 +138,38 @@
</target>
<target name="build" depends="init-common,compile">
- <antcall target="ws-package-appclientjar-common">
- <param name="appclientjar.classes"
+ <antcall target="ws-package-appclientjar-common">
+ <param name="appclientjar.classes"
value="com/sun/s1peqe/webservices/servlet/taxcal/client/*.class" />
<param name="appclientjar.files"
value="${build.classes.dir}"/>
<param name="appclient.jar"
value="${assemble.dir}/${appname}-client.jar"/>
- </antcall>
- <!--antcall target="ws-war-common"-->
- <antcall target="ws-package-war-common">
+ </antcall>
+ <!--antcall target="ws-war-common"-->
+ <antcall target="ws-package-war-common">
<param name="war.file" value="${assemble.dir}/${appname}-web.war"/>
- <param name="war.classes"
+ <param name="war.classes"
value="com/sun/s1peqe/webservices/servlet/taxcal/*.class" />
- <param name="mappingfile.name"
+ <param name="mappingfile.name"
value="${web-mapping.xml}" />
- <param name="mappingfile.location"
+ <param name="mappingfile.location"
value="${build.classes.dir}"/>
- <param name="webservices.xml"
+ <param name="webservices.xml"
value="${web-webservices.xml}" />
- </antcall>
+ </antcall>
<antcall target="ear-common"/>
- </target>
+ </target>
<target name="deploy"
depends="init-common, reconfig-common">
<antcall target="deploy-common"/>
</target>
-
+
<target name="run" depends="init-common">
- <property name="statetax-endpoint-url"
+ <property name="statetax-endpoint-url"
value="http://${http.host}:${http.port}/TaxCalWSServlet/statetaxservlet"/>
- <property name="fedtax-endpoint-url"
+ <property name="fedtax-endpoint-url"
value="http://${http.host}:${http.port}/TaxCalWSServlet/fedtaxservlet"/>
<antcall target="runclient-common">
@@ -177,17 +177,17 @@
value="${statetax-endpoint-url} ${fedtax-endpoint-url}"/>
</antcall>
</target>
-
+
<target name="undeploy" depends="init-common">
<antcall target="undeploy-common"/>
- </target>
+ </target>
<target name="usage">
<antcall target="usage-common"/>
</target>
- <!--
- =======================================================
+ <!--
+ =======================================================
User Defined specific targets
=======================================================
-->
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/client/TaxCalClient.java b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/client/TaxCalClient.java
index e853fe6..1ac418d 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/client/TaxCalClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/client/TaxCalClient.java
@@ -24,93 +24,93 @@
public class TaxCalClient {
- private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
- private static String stateTaxEndpoint = null;
- private static String fedTaxEndpoint = null;
- private static String testSuite = "TaxCalServletbasedWS";
- private static String testCase = null;
- private static TaxCalServletService taxCalService = null;
+ private static SimpleReporterAdapter stat = new SimpleReporterAdapter();
+ private static String stateTaxEndpoint = null;
+ private static String fedTaxEndpoint = null;
+ private static String testSuite = "TaxCalServletbasedWS";
+ private static String testCase = null;
+ private static TaxCalServletService taxCalService = null;
- public static void main (String[] args) {
+ public static void main (String[] args) {
- if(args[0] == null || args[1] == null){
- System.out.println("TaxCal client: Argument missing. Please provide target" +
- "endpoint address as argument");
- System.exit(1);
- } else {
- stateTaxEndpoint = args[0];
- fedTaxEndpoint = args[1];
- }
+ if(args[0] == null || args[1] == null){
+ System.out.println("TaxCal client: Argument missing. Please provide target" +
+ "endpoint address as argument");
+ System.exit(1);
+ } else {
+ stateTaxEndpoint = args[0];
+ fedTaxEndpoint = args[1];
+ }
- stat.addDescription("This is to test servlet based webservice");
- try {
- TaxCalClient client = new TaxCalClient();
- Context ic = new InitialContext();
- taxCalService = (TaxCalServletService)
- ic.lookup("java:comp/env/service/TaxCalServletService");
+ stat.addDescription("This is to test servlet based webservice");
+ try {
+ TaxCalClient client = new TaxCalClient();
+ Context ic = new InitialContext();
+ taxCalService = (TaxCalServletService)
+ ic.lookup("java:comp/env/service/TaxCalServletService");
- client.callStateTaxService();
- client.callFedTaxService();
- }catch(Exception e){
- e.printStackTrace();
- }
+ client.callStateTaxService();
+ client.callFedTaxService();
+ }catch(Exception e){
+ e.printStackTrace();
+ }
- stat.printSummary(testSuite);
+ stat.printSummary(testSuite);
}
-
- public void callStateTaxService() {
- double income = 85000.00;
- double deductions = 5000.00;
- //String targetEndpointAddress =
- // "http://localhost:1024/taxcalculator";
+ public void callStateTaxService() {
+ double income = 85000.00;
+ double deductions = 5000.00;
- try {
+ //String targetEndpointAddress =
+ // "http://localhost:1024/taxcalculator";
- StateTaxIF taxCalIFPort = taxCalService.getStateTaxIFPort();
+ try {
- ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
- stateTaxEndpoint);
+ StateTaxIF taxCalIFPort = taxCalService.getStateTaxIFPort();
- double stateTax = taxCalIFPort.getStateTax(income, deductions);
- System.out.println("State tax from servlet based TaxCalService :" + stateTax);
+ ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ stateTaxEndpoint);
- if(stateTax == 24000.00)
- stat.addStatus(testSuite + " StateTaxPort", stat.PASS);
- else
- stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
+ double stateTax = taxCalIFPort.getStateTax(income, deductions);
+ System.out.println("State tax from servlet based TaxCalService :" + stateTax);
- } catch (Exception ex) {
- System.out.println("TaxCalEjbWebservice client failed");
- stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
- ex.printStackTrace();
- }
- }
+ if(stateTax == 24000.00)
+ stat.addStatus(testSuite + " StateTaxPort", stat.PASS);
+ else
+ stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
- public void callFedTaxService() {
- double income = 97000.00;
- double deductions = 7000.00;
- try {
- //String targetEndpointAddress =
- //"http://localhost:1024/FindInterestServlet/FindInterest";
+ } catch (Exception ex) {
+ System.out.println("TaxCalEjbWebservice client failed");
+ stat.addStatus(testSuite + " StateTaxPort", stat.FAIL);
+ ex.printStackTrace();
+ }
+ }
- FedTaxIF taxCalIFPort = taxCalService.getFedTaxIFPort();
- ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
- fedTaxEndpoint);
+ public void callFedTaxService() {
+ double income = 97000.00;
+ double deductions = 7000.00;
+ try {
+ //String targetEndpointAddress =
+ //"http://localhost:1024/FindInterestServlet/FindInterest";
- double fedTax = taxCalIFPort.getFedTax(income, deductions);
- System.out.println("Fed tax from Servlet based TaxCalService :" + fedTax);
+ FedTaxIF taxCalIFPort = taxCalService.getFedTaxIFPort();
+ ((Stub)taxCalIFPort)._setProperty (Stub.ENDPOINT_ADDRESS_PROPERTY,
+ fedTaxEndpoint);
- if(fedTax == 18000.00)
- stat.addStatus(testSuite + " FedTaxPort", stat.PASS);
- else
- stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
-
- } catch (Exception ex) {
- System.out.println("TaxCalServletWebService client failed");
- stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
- ex.printStackTrace();
- }
- }
+ double fedTax = taxCalIFPort.getFedTax(income, deductions);
+ System.out.println("Fed tax from Servlet based TaxCalService :" + fedTax);
+
+ if(fedTax == 18000.00)
+ stat.addStatus(testSuite + " FedTaxPort", stat.PASS);
+ else
+ stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
+
+ } catch (Exception ex) {
+ System.out.println("TaxCalServletWebService client failed");
+ stat.addStatus(testSuite + " FedTaxPort", stat.FAIL);
+ ex.printStackTrace();
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-client.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-client.xml
index fe6833b..efee2f9 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-client.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-client.xml
@@ -19,7 +19,7 @@
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <wsdl
+ <wsdl
location="wsdl/TaxCalServletService.wsdl"
packageName="com.sun.s1peqe.webservices.servlet.taxcal.client"/>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-sei.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-sei.xml
index e7bdf49..265cccd 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-sei.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-sei.xml
@@ -18,16 +18,16 @@
-->
<configuration
- xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <service name="TaxCalServletService"
- targetNamespace="http://tax.org/wsdl"
- typeNamespace="http://tax.org/types"
- packageName="com.sun.s1peqe.webservices.servlet.taxcal">
- <interface name="com.sun.s1peqe.webservices.servlet.taxcal.FedTaxIF"
- servantName="com.sun.s1peqe.webservices.servlet.taxcal.FedTaxServlet"/>
- <interface name="com.sun.s1peqe.webservices.servlet.taxcal.StateTaxIF"
- servantName="com.sun.s1peqe.webservices.servlet.taxcal.StateTaxServlet">
- </interface>
- </service>
+ xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
+ <service name="TaxCalServletService"
+ targetNamespace="http://tax.org/wsdl"
+ typeNamespace="http://tax.org/types"
+ packageName="com.sun.s1peqe.webservices.servlet.taxcal">
+ <interface name="com.sun.s1peqe.webservices.servlet.taxcal.FedTaxIF"
+ servantName="com.sun.s1peqe.webservices.servlet.taxcal.FedTaxServlet"/>
+ <interface name="com.sun.s1peqe.webservices.servlet.taxcal.StateTaxIF"
+ servantName="com.sun.s1peqe.webservices.servlet.taxcal.StateTaxServlet">
+ </interface>
+ </service>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-web.xml b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-web.xml
index cf90ddc..4e33e32 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-web.xml
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/config/config-web.xml
@@ -19,7 +19,7 @@
<configuration
xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
- <wsdl
+ <wsdl
location="wsdl/TaxCalServletService.wsdl"
packageName="com.sun.s1peqe.webservices.servlet.taxcal"/>
</configuration>
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/FedTaxIF.java b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/FedTaxIF.java
index 5c54961..e3dae42 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/FedTaxIF.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/FedTaxIF.java
@@ -22,6 +22,6 @@
public interface FedTaxIF extends Remote{
- public double getFedTax(double income, double deductions) throws RemoteException;
+ public double getFedTax(double income, double deductions) throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/FedTaxServlet.java b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/FedTaxServlet.java
index 2487dea..552f75b 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/FedTaxServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/FedTaxServlet.java
@@ -21,15 +21,15 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.Call;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import javax.naming.*;
import javax.xml.rpc.Service;
import javax.xml.rpc.server.ServiceLifecycle;
import javax.xml.namespace.QName;
import jakarta.servlet.SingleThreadModel;
-public class FedTaxServlet implements
- SingleThreadModel, ServiceLifecycle {
+public class FedTaxServlet implements
+ SingleThreadModel, ServiceLifecycle {
public FedTaxServlet() {
System.out.println("FedTaxServlet() instantiated");
@@ -44,7 +44,7 @@
}
public double getFedTax(double income, double deductions) {
- System.out.println("getStateTax invoked from servlet endpoint");
- return ((income - deductions) * 0.2);
+ System.out.println("getStateTax invoked from servlet endpoint");
+ return ((income - deductions) * 0.2);
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/StateTaxIF.java b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/StateTaxIF.java
index d9e7d85..ebbf710 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/StateTaxIF.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/StateTaxIF.java
@@ -22,6 +22,6 @@
public interface StateTaxIF extends Remote{
- public double getStateTax(double income, double deductions) throws RemoteException;
+ public double getStateTax(double income, double deductions) throws RemoteException;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/StateTaxServlet.java b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/StateTaxServlet.java
index 89a2456..44fc87d 100644
--- a/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/StateTaxServlet.java
+++ b/appserver/tests/v2-tests/appserv-tests/sqetests/webservices/servletws/web/StateTaxServlet.java
@@ -21,15 +21,15 @@
import javax.xml.namespace.QName;
import javax.xml.rpc.Call;
import java.io.Serializable;
-import java.rmi.RemoteException;
+import java.rmi.RemoteException;
import javax.naming.*;
import javax.xml.rpc.Service;
import javax.xml.rpc.server.ServiceLifecycle;
import javax.xml.namespace.QName;
import jakarta.servlet.SingleThreadModel;
-public class StateTaxServlet implements
- SingleThreadModel, ServiceLifecycle {
+public class StateTaxServlet implements
+ SingleThreadModel, ServiceLifecycle {
public StateTaxServlet() {
System.out.println("StateTaxServlet() instantiated");
@@ -44,7 +44,7 @@
}
public double getStateTax(double income, double deductions) {
- System.out.println("getStateTax invoked from servlet endpoint");
- return ((income - deductions) * 0.3);
+ System.out.println("getStateTax invoked from servlet endpoint");
+ return ((income - deductions) * 0.3);
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/start-domain.sh b/appserver/tests/v2-tests/appserv-tests/start-domain.sh
index 787ba64..6460d20 100755
--- a/appserver/tests/v2-tests/appserv-tests/start-domain.sh
+++ b/appserver/tests/v2-tests/appserv-tests/start-domain.sh
@@ -24,7 +24,7 @@
then
AS_ADMIN_USER=`echo $x |cut -d'=' -f2`
fi
-
+
if [ $varval = "admin.password" ];
then
AS_ADMIN_PASSWORD=`echo $x |cut -d'=' -f2`
diff --git a/appserver/tests/v2-tests/appserv-tests/stoppb.bat b/appserver/tests/v2-tests/appserv-tests/stoppb.bat
index f119ab1..941689a 100644
--- a/appserver/tests/v2-tests/appserv-tests/stoppb.bat
+++ b/appserver/tests/v2-tests/appserv-tests/stoppb.bat
@@ -1,4 +1,4 @@
-@echo off
-set JAVA_HOME=%1
-echo %JAVA_HOME%
+@echo off
+set JAVA_HOME=%1
+echo %JAVA_HOME%
"%JAVA_HOME%/bin/java" -classpath %APS_HOME%/lib/isql.jar;%S1AS_HOME%/pointbase/lib/pbclient.jar;%S1AS_HOME%/pointbase/lib/pbembedded.jar isql.ISQL jdbc:pointbase:server://localhost:%2/sqe-samples,new dbuser dbpassword com.pointbase.jdbc.jdbcUniversalDriver shutdownPbs.sql
diff --git a/appserver/tests/v2-tests/appserv-tests/util/filediff/Diff.java b/appserver/tests/v2-tests/appserv-tests/util/filediff/Diff.java
index d98770a..b676688 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/filediff/Diff.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/filediff/Diff.java
@@ -25,35 +25,35 @@
/** This is the info kept per-file. */
class fileInfo {
- static final int MAXLINECOUNT = 20000;
+ static final int MAXLINECOUNT = 20000;
- DataInputStream file; /* File handle that is open for read. */
- public int maxLine; /* After input done, # lines in file. */
- node symbol[]; /* The symtab handle of each line. */
- int other[]; /* Map of line# to line# in other file */
+ DataInputStream file; /* File handle that is open for read. */
+ public int maxLine; /* After input done, # lines in file. */
+ node symbol[]; /* The symtab handle of each line. */
+ int other[]; /* Map of line# to line# in other file */
/* ( -1 means don't-know ). */
- /* Allocated AFTER the lines are read. */
+ /* Allocated AFTER the lines are read. */
- /**
- * Normal constructor with one filename; file is opened and saved.
- */
- fileInfo( String filename ) {
- symbol = new node [ MAXLINECOUNT+2 ];
- other = null; // allocated later!
- try {
- file = new DataInputStream(
- new FileInputStream( filename));
- } catch (IOException e) {
- System.err.println("Diff can't read file " +
- filename );
- System.err.println("Error Exception was:" + e );
- System.exit(1);
- }
- }
- // This is done late, to be same size as # lines in input file.
- void alloc() {
- other = new int[symbol.length + 2];
- }
+ /**
+ * Normal constructor with one filename; file is opened and saved.
+ */
+ fileInfo( String filename ) {
+ symbol = new node [ MAXLINECOUNT+2 ];
+ other = null; // allocated later!
+ try {
+ file = new DataInputStream(
+ new FileInputStream( filename));
+ } catch (IOException e) {
+ System.err.println("Diff can't read file " +
+ filename );
+ System.err.println("Error Exception was:" + e );
+ System.exit(1);
+ }
+ }
+ // This is done late, to be same size as # lines in input file.
+ void alloc() {
+ other = new int[symbol.length + 2];
+ }
};
/**
@@ -95,471 +95,471 @@
*/
public class Diff {
- /** block len > any possible real block len */
- final int UNREAL=Integer.MAX_VALUE;
+ /** block len > any possible real block len */
+ final int UNREAL=Integer.MAX_VALUE;
// private static SimpleReporterAdapter stat=new SimpleReporterAdapter();
- /** Keeps track of information about file1 and file2 */
- fileInfo oldinfo, newinfo;
+ /** Keeps track of information about file1 and file2 */
+ fileInfo oldinfo, newinfo;
- /** blocklen is the info about found blocks. It will be set to 0, except
- * at the line#s where blocks start in the old file. At these places it
- * will be set to the # of lines in the block. During printout ,
- * this # will be reset to -1 if the block is printed as a MOVE block
- * (because the printout phase will encounter the block twice, but
- * must only print it once.)
- * The array declarations are to MAXLINECOUNT+2 so that we can have two
- * extra lines (pseudolines) at line# 0 and line# MAXLINECOUNT+1
- * (or less).
- */
- int blocklen[];
+ /** blocklen is the info about found blocks. It will be set to 0, except
+ * at the line#s where blocks start in the old file. At these places it
+ * will be set to the # of lines in the block. During printout ,
+ * this # will be reset to -1 if the block is printed as a MOVE block
+ * (because the printout phase will encounter the block twice, but
+ * must only print it once.)
+ * The array declarations are to MAXLINECOUNT+2 so that we can have two
+ * extra lines (pseudolines) at line# 0 and line# MAXLINECOUNT+1
+ * (or less).
+ */
+ int blocklen[];
- /**
- * main - entry point when used standalone.
- * NOTE: no routines return error codes or throw any local
- * exceptions. Instead, any routine may complain
- * to stderr and then exit with error to the system.
- */
- public static void main(String argstrings[])
- {
- if ( argstrings.length != 2 ) {
- System.err.println("Usage: diff oldfile newfile" );
- System.exit(1);
- }
- Diff d = new Diff();
- d.doDiff(argstrings[0], argstrings[1]);
- return;
- }
+ /**
+ * main - entry point when used standalone.
+ * NOTE: no routines return error codes or throw any local
+ * exceptions. Instead, any routine may complain
+ * to stderr and then exit with error to the system.
+ */
+ public static void main(String argstrings[])
+ {
+ if ( argstrings.length != 2 ) {
+ System.err.println("Usage: diff oldfile newfile" );
+ System.exit(1);
+ }
+ Diff d = new Diff();
+ d.doDiff(argstrings[0], argstrings[1]);
+ return;
+ }
- /** Construct a Diff object. */
- Diff() {
- }
+ /** Construct a Diff object. */
+ Diff() {
+ }
- /** Do one file comparison. Called with both filenames. */
- public void doDiff(String oldFile, String newFile) {
+ /** Do one file comparison. Called with both filenames. */
+ public void doDiff(String oldFile, String newFile) {
//stat.addDescription("This is test suite for AVK");
- println( ">>>> Difference of file \"" + oldFile +
- "\" and file \"" + newFile + "\".\n");
- oldinfo = new fileInfo(oldFile);
- newinfo = new fileInfo(newFile);
- /* we don't process until we know both files really do exist. */
- try {
- inputscan( oldinfo );
- inputscan( newinfo );
- } catch (IOException e) {
- System.err.println("Read error: " + e);
- }
+ println( ">>>> Difference of file \"" + oldFile +
+ "\" and file \"" + newFile + "\".\n");
+ oldinfo = new fileInfo(oldFile);
+ newinfo = new fileInfo(newFile);
+ /* we don't process until we know both files really do exist. */
+ try {
+ inputscan( oldinfo );
+ inputscan( newinfo );
+ } catch (IOException e) {
+ System.err.println("Read error: " + e);
+ }
- /* Now that we've read all the lines, allocate some arrays.
- */
- blocklen = new int[ (oldinfo.maxLine>newinfo.maxLine?
- oldinfo.maxLine : newinfo.maxLine) + 2 ];
- oldinfo.alloc();
- newinfo.alloc();
+ /* Now that we've read all the lines, allocate some arrays.
+ */
+ blocklen = new int[ (oldinfo.maxLine>newinfo.maxLine?
+ oldinfo.maxLine : newinfo.maxLine) + 2 ];
+ oldinfo.alloc();
+ newinfo.alloc();
- /* Now do the work, and print the results. */
- transform();
- printout();
+ /* Now do the work, and print the results. */
+ transform();
+ printout();
//stat.printSummary("appverificationID");
- }
+ }
- /**
- * inputscan Reads the file specified by pinfo.file.
- * --------- Places the lines of that file in the symbol table.
- * Sets pinfo.maxLine to the number of lines found.
- */
- void inputscan( fileInfo pinfo ) throws IOException
- {
- String linebuffer;
+ /**
+ * inputscan Reads the file specified by pinfo.file.
+ * --------- Places the lines of that file in the symbol table.
+ * Sets pinfo.maxLine to the number of lines found.
+ */
+ void inputscan( fileInfo pinfo ) throws IOException
+ {
+ String linebuffer;
- pinfo.maxLine = 0;
- while ((linebuffer = pinfo.file.readLine()) != null) {
- storeline( linebuffer, pinfo );
- }
- }
+ pinfo.maxLine = 0;
+ while ((linebuffer = pinfo.file.readLine()) != null) {
+ storeline( linebuffer, pinfo );
+ }
+ }
- /**
- * storeline Places line into symbol table.
- * --------- Expects pinfo.maxLine initted: increments.
- * Places symbol table handle in pinfo.ymbol.
- * Expects pinfo is either oldinfo or newinfo.
- */
- void storeline( String linebuffer, fileInfo pinfo )
- {
- int linenum = ++pinfo.maxLine; /* note, no line zero */
- if ( linenum > fileInfo.MAXLINECOUNT ) {
- System.err.println( "MAXLINECOUNT exceeded, must stop." );
- System.exit(1);
- }
- pinfo.symbol[ linenum ] =
- node.addSymbol( linebuffer, pinfo == oldinfo, linenum );
- }
+ /**
+ * storeline Places line into symbol table.
+ * --------- Expects pinfo.maxLine initted: increments.
+ * Places symbol table handle in pinfo.ymbol.
+ * Expects pinfo is either oldinfo or newinfo.
+ */
+ void storeline( String linebuffer, fileInfo pinfo )
+ {
+ int linenum = ++pinfo.maxLine; /* note, no line zero */
+ if ( linenum > fileInfo.MAXLINECOUNT ) {
+ System.err.println( "MAXLINECOUNT exceeded, must stop." );
+ System.exit(1);
+ }
+ pinfo.symbol[ linenum ] =
+ node.addSymbol( linebuffer, pinfo == oldinfo, linenum );
+ }
- /*
- * transform
- * Analyzes the file differences and leaves its findings in
- * the global arrays oldinfo.other, newinfo.other, and blocklen.
- * Expects both files in symtab.
- * Expects valid "maxLine" and "symbol" in oldinfo and newinfo.
- */
- void transform()
- {
- int oldline, newline;
- int oldmax = oldinfo.maxLine + 2; /* Count pseudolines at */
- int newmax = newinfo.maxLine + 2; /* ..front and rear of file */
+ /*
+ * transform
+ * Analyzes the file differences and leaves its findings in
+ * the global arrays oldinfo.other, newinfo.other, and blocklen.
+ * Expects both files in symtab.
+ * Expects valid "maxLine" and "symbol" in oldinfo and newinfo.
+ */
+ void transform()
+ {
+ int oldline, newline;
+ int oldmax = oldinfo.maxLine + 2; /* Count pseudolines at */
+ int newmax = newinfo.maxLine + 2; /* ..front and rear of file */
- for (oldline=0; oldline < oldmax; oldline++ )
- oldinfo.other[oldline]= -1;
- for (newline=0; newline < newmax; newline++ )
- newinfo.other[newline]= -1;
+ for (oldline=0; oldline < oldmax; oldline++ )
+ oldinfo.other[oldline]= -1;
+ for (newline=0; newline < newmax; newline++ )
+ newinfo.other[newline]= -1;
- scanunique(); /* scan for lines used once in both files */
- scanafter(); /* scan past sure-matches for non-unique blocks */
- scanbefore(); /* scan backwards from sure-matches */
- scanblocks(); /* find the fronts and lengths of blocks */
- }
+ scanunique(); /* scan for lines used once in both files */
+ scanafter(); /* scan past sure-matches for non-unique blocks */
+ scanbefore(); /* scan backwards from sure-matches */
+ scanblocks(); /* find the fronts and lengths of blocks */
+ }
- /*
- * scanunique
- * Scans for lines which are used exactly once in each file.
- * Expects both files in symtab, and oldinfo and newinfo valid.
- * The appropriate "other" array entries are set to the line# in
- * the other file.
- * Claims pseudo-lines at 0 and XXXinfo.maxLine+1 are unique.
- */
- void scanunique()
- {
- int oldline, newline;
- node psymbol;
+ /*
+ * scanunique
+ * Scans for lines which are used exactly once in each file.
+ * Expects both files in symtab, and oldinfo and newinfo valid.
+ * The appropriate "other" array entries are set to the line# in
+ * the other file.
+ * Claims pseudo-lines at 0 and XXXinfo.maxLine+1 are unique.
+ */
+ void scanunique()
+ {
+ int oldline, newline;
+ node psymbol;
- for( newline = 1; newline <= newinfo.maxLine; newline++ ) {
- psymbol = newinfo.symbol[ newline ];
- if ( psymbol.symbolIsUnique()) { // 1 use in each file
- oldline = psymbol.linenum;
- newinfo.other[ newline ] = oldline; // record 1-1 map
- oldinfo.other[ oldline ] = newline;
- }
- }
- newinfo.other[ 0 ] = 0;
- oldinfo.other[ 0 ] = 0;
- newinfo.other[ newinfo.maxLine + 1 ] = oldinfo.maxLine + 1;
- oldinfo.other[ oldinfo.maxLine + 1 ] = newinfo.maxLine + 1;
- }
+ for( newline = 1; newline <= newinfo.maxLine; newline++ ) {
+ psymbol = newinfo.symbol[ newline ];
+ if ( psymbol.symbolIsUnique()) { // 1 use in each file
+ oldline = psymbol.linenum;
+ newinfo.other[ newline ] = oldline; // record 1-1 map
+ oldinfo.other[ oldline ] = newline;
+ }
+ }
+ newinfo.other[ 0 ] = 0;
+ oldinfo.other[ 0 ] = 0;
+ newinfo.other[ newinfo.maxLine + 1 ] = oldinfo.maxLine + 1;
+ oldinfo.other[ oldinfo.maxLine + 1 ] = newinfo.maxLine + 1;
+ }
- /*
- * scanafter
- * Expects both files in symtab, and oldinfo and newinfo valid.
- * Expects the "other" arrays contain positive #s to indicate
- * lines that are unique in both files.
- * For each such pair of places, scans past in each file.
- * Contiguous groups of lines that match non-uniquely are
- * taken to be good-enough matches, and so marked in "other".
- * Assumes each other[0] is 0.
- */
- void scanafter()
- {
- int oldline, newline;
+ /*
+ * scanafter
+ * Expects both files in symtab, and oldinfo and newinfo valid.
+ * Expects the "other" arrays contain positive #s to indicate
+ * lines that are unique in both files.
+ * For each such pair of places, scans past in each file.
+ * Contiguous groups of lines that match non-uniquely are
+ * taken to be good-enough matches, and so marked in "other".
+ * Assumes each other[0] is 0.
+ */
+ void scanafter()
+ {
+ int oldline, newline;
- for( newline = 0; newline <= newinfo.maxLine; newline++ ) {
- oldline = newinfo.other[ newline ];
- if ( oldline >= 0 ) { /* is unique in old & new */
- for(;;) { /* scan after there in both files */
- if ( ++oldline > oldinfo.maxLine ) break;
- if ( oldinfo.other[ oldline ] >= 0 ) break;
- if ( ++newline > newinfo.maxLine ) break;
- if ( newinfo.other[ newline ] >= 0 ) break;
+ for( newline = 0; newline <= newinfo.maxLine; newline++ ) {
+ oldline = newinfo.other[ newline ];
+ if ( oldline >= 0 ) { /* is unique in old & new */
+ for(;;) { /* scan after there in both files */
+ if ( ++oldline > oldinfo.maxLine ) break;
+ if ( oldinfo.other[ oldline ] >= 0 ) break;
+ if ( ++newline > newinfo.maxLine ) break;
+ if ( newinfo.other[ newline ] >= 0 ) break;
- /* oldline & newline exist, and
- aren't already matched */
+ /* oldline & newline exist, and
+ aren't already matched */
- if ( newinfo.symbol[ newline ] !=
- oldinfo.symbol[ oldline ] ) break; // not same
+ if ( newinfo.symbol[ newline ] !=
+ oldinfo.symbol[ oldline ] ) break; // not same
- newinfo.other[newline] = oldline; // record a match
- oldinfo.other[oldline] = newline;
- }
- }
- }
- }
+ newinfo.other[newline] = oldline; // record a match
+ oldinfo.other[oldline] = newline;
+ }
+ }
+ }
+ }
- /**
- * scanbefore
- * As scanafter, except scans towards file fronts.
- * Assumes the off-end lines have been marked as a match.
- */
- void scanbefore()
- {
- int oldline, newline;
+ /**
+ * scanbefore
+ * As scanafter, except scans towards file fronts.
+ * Assumes the off-end lines have been marked as a match.
+ */
+ void scanbefore()
+ {
+ int oldline, newline;
- for( newline = newinfo.maxLine + 1; newline > 0; newline-- ) {
- oldline = newinfo.other[ newline ];
- if ( oldline >= 0 ) { /* unique in each */
- for(;;) {
- if ( --oldline <= 0 ) break;
- if ( oldinfo.other[ oldline ] >= 0 ) break;
- if ( --newline <= 0 ) break;
- if ( newinfo.other[ newline ] >= 0 ) break;
+ for( newline = newinfo.maxLine + 1; newline > 0; newline-- ) {
+ oldline = newinfo.other[ newline ];
+ if ( oldline >= 0 ) { /* unique in each */
+ for(;;) {
+ if ( --oldline <= 0 ) break;
+ if ( oldinfo.other[ oldline ] >= 0 ) break;
+ if ( --newline <= 0 ) break;
+ if ( newinfo.other[ newline ] >= 0 ) break;
- /* oldline and newline exist,
- and aren't marked yet */
+ /* oldline and newline exist,
+ and aren't marked yet */
- if ( newinfo.symbol[ newline ] !=
- oldinfo.symbol[ oldline ] ) break; // not same
+ if ( newinfo.symbol[ newline ] !=
+ oldinfo.symbol[ oldline ] ) break; // not same
- newinfo.other[newline] = oldline; // record a match
- oldinfo.other[oldline] = newline;
- }
- }
- }
- }
+ newinfo.other[newline] = oldline; // record a match
+ oldinfo.other[oldline] = newline;
+ }
+ }
+ }
+ }
- /**
- * scanblocks - Finds the beginnings and lengths of blocks of matches.
- * Sets the blocklen array (see definition).
- * Expects oldinfo valid.
- */
- void scanblocks()
- {
- int oldline, newline;
- int oldfront = 0; // line# of front of a block in old, or 0
- int newlast = -1; // newline's value during prev. iteration
+ /**
+ * scanblocks - Finds the beginnings and lengths of blocks of matches.
+ * Sets the blocklen array (see definition).
+ * Expects oldinfo valid.
+ */
+ void scanblocks()
+ {
+ int oldline, newline;
+ int oldfront = 0; // line# of front of a block in old, or 0
+ int newlast = -1; // newline's value during prev. iteration
- for( oldline = 1; oldline <= oldinfo.maxLine; oldline++ )
- blocklen[ oldline ] = 0;
- blocklen[ oldinfo.maxLine + 1 ] = UNREAL; // starts a mythical blk
+ for( oldline = 1; oldline <= oldinfo.maxLine; oldline++ )
+ blocklen[ oldline ] = 0;
+ blocklen[ oldinfo.maxLine + 1 ] = UNREAL; // starts a mythical blk
- for( oldline = 1; oldline <= oldinfo.maxLine; oldline++ ) {
- newline = oldinfo.other[ oldline ];
- if ( newline < 0 ) oldfront = 0; /* no match: not in block */
- else{ /* match. */
- if ( oldfront == 0 ) oldfront = oldline;
- if ( newline != (newlast+1)) oldfront = oldline;
- ++blocklen[ oldfront ];
- }
- newlast = newline;
- }
- }
+ for( oldline = 1; oldline <= oldinfo.maxLine; oldline++ ) {
+ newline = oldinfo.other[ oldline ];
+ if ( newline < 0 ) oldfront = 0; /* no match: not in block */
+ else{ /* match. */
+ if ( oldfront == 0 ) oldfront = oldline;
+ if ( newline != (newlast+1)) oldfront = oldline;
+ ++blocklen[ oldfront ];
+ }
+ newlast = newline;
+ }
+ }
- /* The following are global to printout's subsidiary routines */
- // enum{ idle, delete, insert, movenew, moveold,
- // same, change } printstatus;
- public static final int
- idle = 0, delete = 1, insert = 2, movenew = 3, moveold = 4,
- same = 5, change = 6;
- int printstatus;
- boolean anyprinted;
- int printoldline, printnewline; // line numbers in old & new file
+ /* The following are global to printout's subsidiary routines */
+ // enum{ idle, delete, insert, movenew, moveold,
+ // same, change } printstatus;
+ public static final int
+ idle = 0, delete = 1, insert = 2, movenew = 3, moveold = 4,
+ same = 5, change = 6;
+ int printstatus;
+ boolean anyprinted;
+ int printoldline, printnewline; // line numbers in old & new file
- /**
- * printout - Prints summary to stdout.
- * Expects all data structures have been filled out.
- */
- void printout()
- {
- printstatus = idle;
- anyprinted = false;
- for( printoldline = printnewline = 1; ; ) {
- if ( printoldline > oldinfo.maxLine ) { newconsume(); break;}
- if ( printnewline > newinfo.maxLine ) { oldconsume(); break;}
- if ( newinfo.other[ printnewline ] < 0 ) {
- if ( oldinfo.other[ printoldline ] < 0 )
- showchange();
- else
- showinsert();
- }
- else if ( oldinfo.other[ printoldline ] < 0 )
- showdelete();
- else if ( blocklen[ printoldline ] < 0 )
- skipold();
- else if ( oldinfo.other[ printoldline ] == printnewline )
- showsame();
- else
- showmove();
- }
+ /**
+ * printout - Prints summary to stdout.
+ * Expects all data structures have been filled out.
+ */
+ void printout()
+ {
+ printstatus = idle;
+ anyprinted = false;
+ for( printoldline = printnewline = 1; ; ) {
+ if ( printoldline > oldinfo.maxLine ) { newconsume(); break;}
+ if ( printnewline > newinfo.maxLine ) { oldconsume(); break;}
+ if ( newinfo.other[ printnewline ] < 0 ) {
+ if ( oldinfo.other[ printoldline ] < 0 )
+ showchange();
+ else
+ showinsert();
+ }
+ else if ( oldinfo.other[ printoldline ] < 0 )
+ showdelete();
+ else if ( blocklen[ printoldline ] < 0 )
+ skipold();
+ else if ( oldinfo.other[ printoldline ] == printnewline )
+ showsame();
+ else
+ showmove();
+ }
- if ( anyprinted == true )
+ if ( anyprinted == true )
{
println( ">>>> End of differences." );
//stat.addStatus("appverification bookstore", stat.FAIL);
}
- else
+ else
{
println( ">>>> Files are identical." );
//stat.addStatus("appverification bookstore", stat.PASS);
}
- }
+ }
- /*
- * newconsume Part of printout. Have run out of old file.
- * Print the rest of the new file, as inserts and/or moves.
- */
- void newconsume()
- {
- for(;;) {
- if ( printnewline > newinfo.maxLine )
- break; /* end of file */
- if ( newinfo.other[ printnewline ] < 0 ) showinsert();
- else showmove();
- }
- }
+ /*
+ * newconsume Part of printout. Have run out of old file.
+ * Print the rest of the new file, as inserts and/or moves.
+ */
+ void newconsume()
+ {
+ for(;;) {
+ if ( printnewline > newinfo.maxLine )
+ break; /* end of file */
+ if ( newinfo.other[ printnewline ] < 0 ) showinsert();
+ else showmove();
+ }
+ }
- /**
- * oldconsume Part of printout. Have run out of new file.
- * Process the rest of the old file, printing any
- * parts which were deletes or moves.
- */
- void oldconsume()
- {
- for(;;) {
- if ( printoldline > oldinfo.maxLine )
- break; /* end of file */
- printnewline = oldinfo.other[ printoldline ];
- if ( printnewline < 0 ) showdelete();
- else if ( blocklen[ printoldline ] < 0 ) skipold();
- else showmove();
- }
- }
+ /**
+ * oldconsume Part of printout. Have run out of new file.
+ * Process the rest of the old file, printing any
+ * parts which were deletes or moves.
+ */
+ void oldconsume()
+ {
+ for(;;) {
+ if ( printoldline > oldinfo.maxLine )
+ break; /* end of file */
+ printnewline = oldinfo.other[ printoldline ];
+ if ( printnewline < 0 ) showdelete();
+ else if ( blocklen[ printoldline ] < 0 ) skipold();
+ else showmove();
+ }
+ }
- /**
- * showdelete Part of printout.
- * Expects printoldline is at a deletion.
- */
- void showdelete()
- {
- if ( printstatus != delete )
+ /**
+ * showdelete Part of printout.
+ * Expects printoldline is at a deletion.
+ */
+ void showdelete()
+ {
+ if ( printstatus != delete )
{
println("Following test didn't get run-------->");
//println( ">>>>>>>>>>>>>>>>> DELETE AT " + printoldline);
}
- printstatus = delete;
- oldinfo.symbol[ printoldline ].showSymbol();
- anyprinted = true;
- printoldline++;
- }
+ printstatus = delete;
+ oldinfo.symbol[ printoldline ].showSymbol();
+ anyprinted = true;
+ printoldline++;
+ }
- /*
- * showinsert Part of printout.
- * Expects printnewline is at an insertion.
- */
- void showinsert()
- {
- if ( printstatus == change ) println( ">>>>>>>>>>>>> CHANGED TO" );
- else if ( printstatus != insert )
- println( ">>>>>>>>>>>>>>>> INSERT BEFORE " + printoldline );
- printstatus = insert;
- newinfo.symbol[ printnewline ].showSymbol();
- anyprinted = true;
- printnewline++;
- }
+ /*
+ * showinsert Part of printout.
+ * Expects printnewline is at an insertion.
+ */
+ void showinsert()
+ {
+ if ( printstatus == change ) println( ">>>>>>>>>>>>> CHANGED TO" );
+ else if ( printstatus != insert )
+ println( ">>>>>>>>>>>>>>>> INSERT BEFORE " + printoldline );
+ printstatus = insert;
+ newinfo.symbol[ printnewline ].showSymbol();
+ anyprinted = true;
+ printnewline++;
+ }
- /**
- * showchange Part of printout.
- * Expects printnewline is an insertion.
- * Expects printoldline is a deletion.
- */
- void showchange()
- {
- if ( printstatus != change )
- println( ">>>>>>>>>>>>>>>>>>>>> " + printoldline + " CHANGED FROM");
- printstatus = change;
- oldinfo.symbol[ printoldline ].showSymbol();
- anyprinted = true;
- printoldline++;
- }
+ /**
+ * showchange Part of printout.
+ * Expects printnewline is an insertion.
+ * Expects printoldline is a deletion.
+ */
+ void showchange()
+ {
+ if ( printstatus != change )
+ println( ">>>>>>>>>>>>>>>>>>>>> " + printoldline + " CHANGED FROM");
+ printstatus = change;
+ oldinfo.symbol[ printoldline ].showSymbol();
+ anyprinted = true;
+ printoldline++;
+ }
- /**
- * skipold Part of printout.
- * Expects printoldline at start of an old block that has
- * already been announced as a move.
- * Skips over the old block.
- */
- void skipold()
- {
- printstatus = idle;
- for(;;) {
- if ( ++printoldline > oldinfo.maxLine )
- break; /* end of file */
- if ( oldinfo.other[ printoldline ] < 0 )
- break; /* end of block */
- if ( blocklen[ printoldline ]!=0)
- break; /* start of another */
- }
- }
+ /**
+ * skipold Part of printout.
+ * Expects printoldline at start of an old block that has
+ * already been announced as a move.
+ * Skips over the old block.
+ */
+ void skipold()
+ {
+ printstatus = idle;
+ for(;;) {
+ if ( ++printoldline > oldinfo.maxLine )
+ break; /* end of file */
+ if ( oldinfo.other[ printoldline ] < 0 )
+ break; /* end of block */
+ if ( blocklen[ printoldline ]!=0)
+ break; /* start of another */
+ }
+ }
- /**
- * skipnew Part of printout.
- * Expects printnewline is at start of a new block that has
- * already been announced as a move.
- * Skips over the new block.
- */
- void skipnew()
- {
- int oldline;
- printstatus = idle;
- for(;;) {
- if ( ++printnewline > newinfo.maxLine )
- break; /* end of file */
- oldline = newinfo.other[ printnewline ];
- if ( oldline < 0 )
- break; /* end of block */
- if ( blocklen[ oldline ] != 0)
- break; /* start of another */
- }
- }
+ /**
+ * skipnew Part of printout.
+ * Expects printnewline is at start of a new block that has
+ * already been announced as a move.
+ * Skips over the new block.
+ */
+ void skipnew()
+ {
+ int oldline;
+ printstatus = idle;
+ for(;;) {
+ if ( ++printnewline > newinfo.maxLine )
+ break; /* end of file */
+ oldline = newinfo.other[ printnewline ];
+ if ( oldline < 0 )
+ break; /* end of block */
+ if ( blocklen[ oldline ] != 0)
+ break; /* start of another */
+ }
+ }
- /**
- * showsame Part of printout.
- * Expects printnewline and printoldline at start of
- * two blocks that aren't to be displayed.
- */
- void showsame()
- {
- int count;
- printstatus = idle;
- if ( newinfo.other[ printnewline ] != printoldline ) {
- System.err.println("BUG IN LINE REFERENCING");
- System.exit(1);
- }
- count = blocklen[ printoldline ];
- printoldline += count;
- printnewline += count;
- }
+ /**
+ * showsame Part of printout.
+ * Expects printnewline and printoldline at start of
+ * two blocks that aren't to be displayed.
+ */
+ void showsame()
+ {
+ int count;
+ printstatus = idle;
+ if ( newinfo.other[ printnewline ] != printoldline ) {
+ System.err.println("BUG IN LINE REFERENCING");
+ System.exit(1);
+ }
+ count = blocklen[ printoldline ];
+ printoldline += count;
+ printnewline += count;
+ }
- /**
- * showmove Part of printout.
- * Expects printoldline, printnewline at start of
- * two different blocks ( a move was done).
- */
- void showmove()
- {
- int oldblock = blocklen[ printoldline ];
- int newother = newinfo.other[ printnewline ];
- int newblock = blocklen[ newother ];
+ /**
+ * showmove Part of printout.
+ * Expects printoldline, printnewline at start of
+ * two different blocks ( a move was done).
+ */
+ void showmove()
+ {
+ int oldblock = blocklen[ printoldline ];
+ int newother = newinfo.other[ printnewline ];
+ int newblock = blocklen[ newother ];
- if ( newblock < 0 ) skipnew(); // already printed.
- else if ( oldblock >= newblock ) { // assume new's blk moved.
- blocklen[newother] = -1; // stamp block as "printed".
- println( ">>>> " + newother +
- " THRU " + (newother + newblock - 1) +
- " MOVED TO BEFORE " + printoldline );
- for( ; newblock > 0; newblock--, printnewline++ )
- newinfo.symbol[ printnewline ].showSymbol();
- anyprinted = true;
- printstatus = idle;
+ if ( newblock < 0 ) skipnew(); // already printed.
+ else if ( oldblock >= newblock ) { // assume new's blk moved.
+ blocklen[newother] = -1; // stamp block as "printed".
+ println( ">>>> " + newother +
+ " THRU " + (newother + newblock - 1) +
+ " MOVED TO BEFORE " + printoldline );
+ for( ; newblock > 0; newblock--, printnewline++ )
+ newinfo.symbol[ printnewline ].showSymbol();
+ anyprinted = true;
+ printstatus = idle;
- } else /* assume old's block moved */
- skipold(); /* target line# not known, display later */
- }
+ } else /* assume old's block moved */
+ skipold(); /* target line# not known, display later */
+ }
- /** Convenience wrapper for println */
- public void println(String s) {
- System.out.println(s);
- }
-}; // end of main class!
+ /** Convenience wrapper for println */
+ public void println(String s) {
+ System.out.println(s);
+ }
+}; // end of main class!
/**
* Class "node". The symbol table routines in this class all
@@ -567,98 +567,98 @@
* The methods are: addSymbol, symbolIsUnique, showSymbol.
*/
class node{ /* the tree is made up of these nodes */
- node pleft, pright;
- int linenum;
+ node pleft, pright;
+ int linenum;
- static final int freshnode = 0,
- oldonce = 1, newonce = 2, bothonce = 3, other = 4;
+ static final int freshnode = 0,
+ oldonce = 1, newonce = 2, bothonce = 3, other = 4;
- int /* enum linestates */ linestate;
- String line;
+ int /* enum linestates */ linestate;
+ String line;
- static node panchor = null; /* symtab is a tree hung from this */
+ static node panchor = null; /* symtab is a tree hung from this */
- /**
- * Construct a new symbol table node and fill in its fields.
- * @param string A line of the text file
- */
- node( String pline)
- {
- pleft = pright = null;
- linestate = freshnode;
- /* linenum field is not always valid */
- line = pline;
- }
+ /**
+ * Construct a new symbol table node and fill in its fields.
+ * @param string A line of the text file
+ */
+ node( String pline)
+ {
+ pleft = pright = null;
+ linestate = freshnode;
+ /* linenum field is not always valid */
+ line = pline;
+ }
- /**
- * matchsymbol Searches tree for a match to the line.
- * @param String pline, a line of text
- * If node's linestate == freshnode, then created the node.
- */
- static node matchsymbol( String pline )
- {
- int comparison;
- node pnode = panchor;
- if ( panchor == null ) return panchor = new node( pline);
- for(;;) {
- comparison = pnode.line.compareTo(pline);
- if ( comparison == 0 ) return pnode; /* found */
+ /**
+ * matchsymbol Searches tree for a match to the line.
+ * @param String pline, a line of text
+ * If node's linestate == freshnode, then created the node.
+ */
+ static node matchsymbol( String pline )
+ {
+ int comparison;
+ node pnode = panchor;
+ if ( panchor == null ) return panchor = new node( pline);
+ for(;;) {
+ comparison = pnode.line.compareTo(pline);
+ if ( comparison == 0 ) return pnode; /* found */
- if ( comparison < 0 ) {
- if ( pnode.pleft == null ) {
- pnode.pleft = new node( pline);
- return pnode.pleft;
- }
- pnode = pnode.pleft;
- }
- if ( comparison > 0 ) {
- if ( pnode.pright == null ) {
- pnode.pright = new node( pline);
- return pnode.pright;
- }
- pnode = pnode.pright;
- }
- }
- /* NOTE: There are return stmts, so control does not get here. */
- }
+ if ( comparison < 0 ) {
+ if ( pnode.pleft == null ) {
+ pnode.pleft = new node( pline);
+ return pnode.pleft;
+ }
+ pnode = pnode.pleft;
+ }
+ if ( comparison > 0 ) {
+ if ( pnode.pright == null ) {
+ pnode.pright = new node( pline);
+ return pnode.pright;
+ }
+ pnode = pnode.pright;
+ }
+ }
+ /* NOTE: There are return stmts, so control does not get here. */
+ }
- /**
- * addSymbol(String pline) - Saves line into the symbol table.
- * Returns a handle to the symtab entry for that unique line.
- * If inoldfile nonzero, then linenum is remembered.
- */
- static node addSymbol( String pline, boolean inoldfile, int linenum )
- {
- node pnode;
- pnode = matchsymbol( pline ); /* find the node in the tree */
- if ( pnode.linestate == freshnode ) {
- pnode.linestate = inoldfile ? oldonce : newonce;
- } else {
- if (( pnode.linestate == oldonce && !inoldfile ) ||
- ( pnode.linestate == newonce && inoldfile ))
- pnode.linestate = bothonce;
- else pnode.linestate = other;
- }
- if (inoldfile) pnode.linenum = linenum;
- return pnode;
- }
+ /**
+ * addSymbol(String pline) - Saves line into the symbol table.
+ * Returns a handle to the symtab entry for that unique line.
+ * If inoldfile nonzero, then linenum is remembered.
+ */
+ static node addSymbol( String pline, boolean inoldfile, int linenum )
+ {
+ node pnode;
+ pnode = matchsymbol( pline ); /* find the node in the tree */
+ if ( pnode.linestate == freshnode ) {
+ pnode.linestate = inoldfile ? oldonce : newonce;
+ } else {
+ if (( pnode.linestate == oldonce && !inoldfile ) ||
+ ( pnode.linestate == newonce && inoldfile ))
+ pnode.linestate = bothonce;
+ else pnode.linestate = other;
+ }
+ if (inoldfile) pnode.linenum = linenum;
+ return pnode;
+ }
- /**
- * symbolIsUnique Arg is a ptr previously returned by addSymbol.
- * -------------- Returns true if the line was added to the
- * symbol table exactly once with inoldfile true,
- * and exactly once with inoldfile false.
- */
- boolean symbolIsUnique()
- {
- return (linestate == bothonce );
- }
+ /**
+ * symbolIsUnique Arg is a ptr previously returned by addSymbol.
+ * -------------- Returns true if the line was added to the
+ * symbol table exactly once with inoldfile true,
+ * and exactly once with inoldfile false.
+ */
+ boolean symbolIsUnique()
+ {
+ return (linestate == bothonce );
+ }
- /**
- * showSymbol Prints the line to stdout.
- */
- void showSymbol()
- {
- System.out.println(line);
- }
+ /**
+ * showSymbol Prints the line to stdout.
+ */
+ void showSymbol()
+ {
+ System.out.println(line);
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/filediff/ModifyReport.java b/appserver/tests/v2-tests/appserv-tests/util/filediff/ModifyReport.java
index 40eabf6..87504e2 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/filediff/ModifyReport.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/filediff/ModifyReport.java
@@ -24,8 +24,8 @@
if(args.length != 1){
mf.usage();
System.exit(0);
- }
- String tobeAdded =
+ }
+ String tobeAdded =
"<tr> \n"+
"<td colspan=3 align=center> <font color=RED> <b> Expected Results </b> </font> </td> \n"+
"</tr>\n"+
@@ -88,14 +88,14 @@
"<tr> \n"+
"<td> sqetests/transaction/txglobal </td> \n"+
"<td> </td> \n"+
- "<td> [Total :1]</td>\n"+
+ "<td> [Total :1]</td>\n"+
"</tr>\n"+
"<tr> \n"+
"<td> sqetests/security </td>\n"+
"<td> </td> \n"+
"<td> [Total :1]</td>\n"+
"</tr>\n"+
- */
+ */
mf.modifyFile(args[0], tobeAdded);
}
@@ -106,25 +106,25 @@
String tag = "</TABLE>";
int breakPoint = -1 ;
int c;
- try{
+ try{
File inputfile = new File(filename);
BufferedReader in = new BufferedReader(new FileReader(inputfile));
- //System.out.println("Reading original file...");
- while ((fileline = in.readLine()) != null){
+ //System.out.println("Reading original file...");
+ while ((fileline = in.readLine()) != null){
filedata.append(fileline);
- }
- //System.out.println("Finished Reading file. ");
- //System.out.println("Closing input stream...");
+ }
+ //System.out.println("Finished Reading file. ");
+ //System.out.println("Closing input stream...");
in.close();
- //System.out.println("filedata:\n\n"+filedata);
+ //System.out.println("filedata:\n\n"+filedata);
// find index of first </TABLE> tag
// insert new string at the index.
- //System.out.println("breakPoint:"+breakPoint);
+ //System.out.println("breakPoint:"+breakPoint);
breakPoint=filedata.indexOf(tag);
if(breakPoint != -1){
filedata.insert(breakPoint, tobeAdded);
fileContent = filedata.toString();
- //System.out.println("string inserted");
+ //System.out.println("string inserted");
} else {
System.out.println("specified tag: "+tag+" was not found in the report");
}
@@ -138,7 +138,7 @@
"Please check the file name and try again");
} catch(Exception ex){
ex.printStackTrace();
- }
+ }
//System.out.println("============================================");
}
public void usage(){
diff --git a/appserver/tests/v2-tests/appserv-tests/util/filediff/build.properties b/appserver/tests/v2-tests/appserv-tests/util/filediff/build.properties
index fb4733f..5ee386f 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/filediff/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/util/filediff/build.properties
@@ -15,7 +15,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property environment="env" />
<property name="javapath" value="${JAVA_HOME}/lib/dt.jar:$(JAVA_HOME)/lib/tools.jar"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/util/filediff/build.xml b/appserver/tests/v2-tests/appserv-tests/util/filediff/build.xml
index 0296d86..62a48ce 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/filediff/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/util/filediff/build.xml
@@ -29,25 +29,25 @@
&commonBuild;
<target name="all" depends="clean,init,build,jar"/>
-
+
<target name="init">
<mkdir dir="${build.dest}"/>
-
+
</target>
-
-
+
+
<target name="build" depends="init">
<javac
- destdir="${build.dest}"
- classpath="${classpath}"
+ destdir="${build.dest}"
+ classpath="${classpath}"
srcdir="${basedir}"
debug="on"
- deprecation="on"
+ deprecation="on"
/>
-
+
</target>
-
-
+
+
<target name="jar" depends="init-common,build">
<echo message="outputting jar at ${jarfile}"/>
<property environment="env"/>
@@ -57,41 +57,41 @@
<arg line="cvf ${jarfile} -C ${build.dest} ." />-->
<jar jarfile="${jarfile}" basedir="${build.dest}" update="true"
includes="**/*.class"/>
-
-
+
+
</target>
-
+
<target name="clean">
<delete dir="${build.dest}"/>
-
+
</target>
-
+
<target name="run" depends="init-common">
<java
- fork="on"
- classpath="${classpath}:${jarfile}"
- classname="com.sun.ejte.ccl.filediff.Diff">
- <arg value="${env.APS_HOME}/util/filediff/golden_results.xml"/>
- <arg value="${env.APS_HOME}/test_results.xml"/>
+ fork="on"
+ classpath="${classpath}:${jarfile}"
+ classname="com.sun.ejte.ccl.filediff.Diff">
+ <arg value="${env.APS_HOME}/util/filediff/golden_results.xml"/>
+ <arg value="${env.APS_HOME}/test_results.xml"/>
</java>
<!--<java
- fork="on"
- classpath="${classpath}:${jarfile}:${env.APS_HOME}/lib/reporter.jar:${s1astest.classpath}:${env.ANT_HOME}/lib/xercesImpl.jar:${env.ANT_HOME}/xmlParserAPIs.jar"
- classname="com.sun.ejte.ccl.reporter.ParseML">
- <arg value="${env.APS_HOME}/util/filediff/golden_results.xml"/>
- <arg value="${env.APS_HOME}/test_results.xml"/>
+ fork="on"
+ classpath="${classpath}:${jarfile}:${env.APS_HOME}/lib/reporter.jar:${s1astest.classpath}:${env.ANT_HOME}/lib/xercesImpl.jar:${env.ANT_HOME}/xmlParserAPIs.jar"
+ classname="com.sun.ejte.ccl.reporter.ParseML">
+ <arg value="${env.APS_HOME}/util/filediff/golden_results.xml"/>
+ <arg value="${env.APS_HOME}/test_results.xml"/>
</java>-->
</target>
<target name="modifyReport" depends="init-common">
<java
- fork="on"
- classpath="${classpath}:${jarfile}"
- classname="com.sun.ejte.ccl.filediff.ModifyReport">
- <arg value="${env.APS_HOME}/test_results.html"/>
+ fork="on"
+ classpath="${classpath}:${jarfile}"
+ classname="com.sun.ejte.ccl.filediff.ModifyReport">
+ <arg value="${env.APS_HOME}/test_results.html"/>
</java>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/pom.xml b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/pom.xml
index 5b3e0f4..74ae61c 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/pom.xml
+++ b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/pom.xml
@@ -19,7 +19,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
+
<parent>
<groupId>org.eclipse.ee4j</groupId>
<artifactId>project</artifactId>
@@ -27,12 +27,12 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.glassfish.devtests</groupId>
- <version>4.0-SNAPSHOT</version>
+ <version>4.0-SNAPSHOT</version>
<artifactId>report-builder</artifactId>
<packaging>jar</packaging>
<name>report-builder</name>
<build>
- <finalName>${artifactId}</finalName>
+ <finalName>${artifactId}</finalName>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessManager.java b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessManager.java
index 2172314..be8e6d2 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessManager.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessManager.java
@@ -238,7 +238,7 @@
try {
for (String line = reader.readLine(); line != null; line = reader.readLine()) {
sb.append(line).append('\n');
-
+
if(echo)
System.out.println(line);
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessStreamDrainer.java b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessStreamDrainer.java
index 06cb6bc..75e26ea 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessStreamDrainer.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessStreamDrainer.java
@@ -82,7 +82,7 @@
}
/**
- * Create an instance, drain and redirect the process' stderr and stdout to
+ * Create an instance, drain and redirect the process' stderr and stdout to
* System.err and System.out respectively.
* @param process The Process to drain
* @param processName The name will be used to name the drainer threads
@@ -126,23 +126,23 @@
}
///////////////////////////////////////////////////////////////////////////
-
+
private ProcessStreamDrainer(String processName, Process process, boolean redirect, boolean save)
{
if(process == null)
throw new NullPointerException("Internal Error: null Process object");
-
+
this.process = process;
-
+
if(processName == null || processName.length() <= 0)
this.processName = "UnknownProcessName";
else
this.processName = processName;
-
+
redirectStandardStreams = redirect;
ProcessStreamDrainerWorker worker;
-
+
if(redirectStandardStreams)
outWorker = new ProcessStreamDrainerWorker(process.getInputStream(), System.out, save);
else
@@ -150,19 +150,19 @@
outThread = new Thread(outWorker, processName + "-" + OUT_DRAINER);
outThread.setDaemon(true);
-
+
if(redirectStandardStreams)
errWorker = new ProcessStreamDrainerWorker(process.getErrorStream(), System.err, save);
else
errWorker = new ProcessStreamDrainerWorker(process.getErrorStream(), null, save);
-
+
errThread = new Thread(errWorker, processName + "-" + ERROR_DRAINER);
errThread.setDaemon(true);
}
-
+
/**
* Start the draining.
- * We start them here instead of the constructor so that "this" doesn't
+ * We start them here instead of the constructor so that "this" doesn't
* leak out of the constructor.
*/
private void drain()
@@ -170,9 +170,9 @@
outThread.start();
errThread.start();
}
-
+
///////////////////////////////////////////////////////////////////////////
-
+
private final Process process;
private final ProcessStreamDrainerWorker outWorker;
private final ProcessStreamDrainerWorker errWorker;
@@ -182,7 +182,7 @@
private final boolean redirectStandardStreams;
private final static String ERROR_DRAINER = "StderrDrainer";
private final static String OUT_DRAINER = "StdoutDrainer";
-
+
///////////////////////////////////////////////////////////////////////////
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessStreamDrainerWorker.java b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessStreamDrainerWorker.java
index 6eddd47..09e90cd 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessStreamDrainerWorker.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/process/ProcessStreamDrainerWorker.java
@@ -27,7 +27,7 @@
{
if(in == null)
throw new NullPointerException("InputStream argument was null.");
-
+
reader = new BufferedInputStream(in);
redirect = Redirect;
@@ -35,17 +35,17 @@
sb = new StringBuilder();
}
}
-
+
public void run()
{
if(reader == null)
return;
-
+
try
{
int count = 0;
byte[] buffer = new byte[4096];
-
+
while ((count = reader.read(buffer)) != -1)
{
if(redirect != null)
@@ -54,7 +54,7 @@
if(sb != null)
sb.append(new String(buffer, 0, count));
}
- }
+ }
catch (IOException e)
{
}
@@ -66,7 +66,7 @@
else
return "";
}
-
+
private final BufferedInputStream reader;
private final PrintStream redirect;
private StringBuilder sb;
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/results/TestCase.java b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/results/TestCase.java
index 1651532..9a351d3 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/results/TestCase.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/results/TestCase.java
@@ -81,7 +81,7 @@
", status='" + status + '\'' +
'}';
}
-
+
public String toXml() {
StringBuilder buffer = new StringBuilder();
buffer.append("<testcase>\n");
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/results/TestSuite.java b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/results/TestSuite.java
index 97473a8..41560fe 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/results/TestSuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test/util/results/TestSuite.java
@@ -24,7 +24,7 @@
* @Description: Class holding One TestSuite info.
* @Author : Ramesh Mandava
* @Last Modified : By Ramesh on 10/24/2001
- * @Last Modified : By Ramesh on 1/20/2002 , For preserving order of entry of tests used a separate testIdVector
+ * @Last Modified : By Ramesh on 1/20/2002 , For preserving order of entry of tests used a separate testIdVector
* @Last Modified : By Justin Lee on 10/05/2009
*/
public class TestSuite {
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reporter/EnterpriseBeanLogger.java b/appserver/tests/v2-tests/appserv-tests/util/reporter/EnterpriseBeanLogger.java
index bd7fd19..9853fd0 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reporter/EnterpriseBeanLogger.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reporter/EnterpriseBeanLogger.java
@@ -42,13 +42,13 @@
/*abstract public Collection getLocalContracts();
abstract public Collection getRemoteContracts();
**/
-
+
protected PortableAdapter[] adapterHome;
protected boolean dualMode = false;
protected boolean doPassByValue = true;
-
+
protected int REMOTE_EJB = 0;
protected int LOCAL_EJB = 1;
@@ -68,40 +68,40 @@
String mode = ic.lookup("java:comp/env/toXML").toString().toLowerCase();
if (mode.compareTo("false") == 0){
- outputXML = false;
+ outputXML = false;
}
- toXML("toXML", mode);
+ toXML("toXML", mode);
} catch(java.lang.Exception ex){
- toXML("toXML", "true");
- }
-
+ toXML("toXML", "true");
+ }
+
try{
ic = new InitialContext();
String mode = ic.lookup("java:comp/env/passBy").toString().toLowerCase();
if (mode.compareTo("both") == 0){
- dualMode = true;
+ dualMode = true;
} else if (mode.compareTo("value") != 0){
- doPassByValue = false;
- }
- toXML("passBy", mode);
+ doPassByValue = false;
+ }
+ toXML("passBy", mode);
} catch(java.lang.Exception ex){
toXML("exception",ex.getMessage());
- toXML("passBy", "true");
- }
+ toXML("passBy", "true");
+ }
Object objref = null;
-
+
if ( (dualMode == true || doPassByValue) && remoteRef.compareTo("") != 0){
try{
- toXML("remote interface",remoteRef);
- objref = ic.lookup(remoteRef);
-
- adapterHome[REMOTE_EJB] = (PortableAdapter)PortableRemoteObject.narrow(objref, PortableAdapter.class);
- toXML("Remote interface","Looked up remote interface");
+ toXML("remote interface",remoteRef);
+ objref = ic.lookup(remoteRef);
+
+ adapterHome[REMOTE_EJB] = (PortableAdapter)PortableRemoteObject.narrow(objref, PortableAdapter.class);
+ toXML("Remote interface","Looked up remote interface");
} catch(java.lang.Exception ex){
- logLocalXMLException(ex,"prepareLocalAndRemoteObject - remote");
+ logLocalXMLException(ex,"prepareLocalAndRemoteObject - remote");
}
} else {
REMOTE_EJB = 0;
@@ -109,13 +109,13 @@
if (dualMode == true || !doPassByValue){
if (dualMode == false){
- LOCAL_EJB = 0;
+ LOCAL_EJB = 0;
}
-
+
try{
// Get another object just to be sure <TEST>
ic = new InitialContext();
-
+
toXML("local interface",localRef);
toXML("local interface",ic.lookup(localRef).toString());
adapterHome[LOCAL_EJB] = (PortableAdapter)ic.lookup(localRef);
@@ -163,7 +163,7 @@
if (outputXML){
toXML("exception", msg.toString() + ": " + ex.getMessage());
ex.printStackTrace(System.err);
- toXML("exception","---NOT THROWN TO CLIENT---");
+ toXML("exception","---NOT THROWN TO CLIENT---");
}
}
@@ -177,7 +177,7 @@
public void doPassBy(int mode){
if (mode == EnterpriseBeanLogger.PASS_BY_VALUE)
doPassByValue = true;
- else
+ else
doPassByValue = false;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reporter/ParseML.java b/appserver/tests/v2-tests/appserv-tests/util/reporter/ParseML.java
index d50b41b..bd1c822 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reporter/ParseML.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reporter/ParseML.java
@@ -23,7 +23,7 @@
import java.util.*;
public class ParseML{
- private String vendorParserClass =
+ private String vendorParserClass =
"org.apache.xerces.parsers.SAXParser";
public static boolean debug = false;
boolean inTestcase = false;
@@ -46,7 +46,7 @@
}
Hashtable[] filehash = new Hashtable[no_of_files];
fileDiffs = new Vector[no_of_files];
- for(int i = 0; i<args.length; i++){
+ for(int i = 0; i<args.length; i++){
filehash[i] = new Hashtable();
fileDiffs[i] = new Vector();
fileDiffs[i].add("</u><b>File:"+args[i]+"</b></u><br>\n"); // add the filename to the vector
@@ -59,7 +59,7 @@
System.out.println("Displaying hashtable # "+i);
pml.displayHash(filehash[i]);
}
- }
+ }
pml.diffHash(filehash);
pml.displayVectorArr(fileDiffs);
System.out.print("writing diffs to file...");
@@ -70,14 +70,14 @@
//hash = null;
try{
//Initialize a reader
- XMLReader reader =
+ XMLReader reader =
XMLReaderFactory.createXMLReader(vendorParserClass);
//Register Content Handler
ContentHandler myContentHandler = new MyContentHandler();
reader.setContentHandler(myContentHandler);
//Parse
- InputSource inputSource =
+ InputSource inputSource =
new InputSource(new java.io.FileInputStream(new java.io.File(xmlURI)));
reader.parse(inputSource);
@@ -105,7 +105,7 @@
}
public void endPrefixMapping(String prefix){
}
- public void startElement(String namespaceURI, String localName,
+ public void startElement(String namespaceURI, String localName,
String qName, Attributes atts)
throws SAXException{
// add the local name into vector
@@ -118,29 +118,29 @@
System.out.println("inside testcase id.");
}
}
- // assuming that when its time to get the status, the value for the keys would have been obtained.
+ // assuming that when its time to get the status, the value for the keys would have been obtained.
if(localName.equals("status") && (inTestcase)){
//get attributes: pass/fail
if(debug){
- System.out.println("getting testcase status...");
+ System.out.println("getting testcase status...");
}
value = atts.getValue(0).trim();
if((key!=null) && (!(key.equals(""))) && (value!=null) && (!value.equals(""))){
if(debug){
- System.out.println("Key["+key+"] has value["+value+"]");
+ System.out.println("Key["+key+"] has value["+value+"]");
}
hash.put(key,value);
gotStatus = true;
- key = "";
+ key = "";
value = "";
- }
+ }
else{
if(key == null || key.equals("")){
System.out.println("invalid key!");
}
if(value== null || value.equals("")){
System.out.println("invalid value!");
- }
+ }
}
}
}
@@ -149,17 +149,17 @@
if(localName.equals("testcase")){
inTestcase = false;
if(debug){
- System.out.println("Outside testcase tag");
+ System.out.println("Outside testcase tag");
}
}
if(localName.equals("id") && (inTestcase)){
inTestcaseID = false;
if(debug){
- System.out.println("Outside testcase-ID tag");
+ System.out.println("Outside testcase-ID tag");
} /*
key = key.trim();
value = value.trim();
- if((key!=null) && (value!=null) &&
+ if((key!=null) && (value!=null) &&
(!(value.equals(""))) && (!(key.equals("")))){
} */
@@ -187,16 +187,16 @@
}
public void skippedEntity(String name) throws SAXException{
System.out.println("Skipped entity is:"+name);
- }
+ }
}
/*======= End of Inner Class Definition ================*/
- public void displayHash(Hashtable hashtable){
+ public void displayHash(Hashtable hashtable){
for (Enumeration e = hashtable.keys() ; e.hasMoreElements() ;) {
String keyval = (String)e.nextElement();
System.out.println(keyval +":"+hashtable.get(keyval));
}
- }
+ }
public void displayVector(Vector v){
for(int i=0; i<v.size(); i++){
@@ -214,8 +214,8 @@
try{
File inputfile = new File("fileDiffs.html");
FileWriter fw = new FileWriter(inputfile);
- String filecontent = "<h3>File Diff Output</h3><hr>\n";
- for(int i = 0; i<v.length ; i++){
+ String filecontent = "<h3>File Diff Output</h3><hr>\n";
+ for(int i = 0; i<v.length ; i++){
for(int j = 0; j<v[i].size(); j++){
filecontent += v[i].get(j)+"<br>\n";
}
@@ -228,14 +228,14 @@
"Please check the file name and try again");
} catch(Exception ex){
ex.printStackTrace();
- }
+ }
}
public Vector getKeyList(Hashtable[] hashes){
int hashtables = hashes.length;
Vector allkeys= new Vector();
Vector[] hashVecs = new Vector[hashtables];
- for(int i=0; i<hashtables; i++){
+ for(int i=0; i<hashtables; i++){
hashVecs[i] = new Vector((Collection)hashes[i].keySet());
}
allkeys = getUnion(hashVecs);
@@ -260,7 +260,7 @@
System.out.println("total hashtables to diff:"+hashtables);
}
int bigHash = 0; // take the first hashtable as the golden file.
- /*Get a list of most keys*/
+ /*Get a list of most keys*/
Vector keylist = new Vector();
keylist = getKeyList(hashes);
/*Start comparing all other hashtable elements to this golden list of testcases*/
@@ -269,7 +269,7 @@
if(debug){
System.out.println("Total number of testcases gathered: "+totalkeys);
}
- for(int keyno=0; keyno<totalkeys; keyno++){
+ for(int keyno=0; keyno<totalkeys; keyno++){
String keyObj = (String)keylist.get(keyno);
Object val = null;
Object bigHashVal = null;
@@ -277,8 +277,8 @@
if(debug){
System.out.println("checking out key:"+keyObj);
}
- for(int i = 0; i<hashtables ; i++){
- if(i==bigHash){
+ for(int i = 0; i<hashtables ; i++){
+ if(i==bigHash){
continue;
}
// key exists
@@ -289,10 +289,10 @@
continue;
} else {
// key exists but the values are different
- // add it into both the vectors, if not already there.
+ // add it into both the vectors, if not already there.
String diffObj = "<font color=blue>"+keyObj+
" has an inconsistent status:"+(String)val+
- "</font>";
+ "</font>";
String bigdiffObj = "<font color=blue>"+keyObj+
" has an inconsistent status:"+(String)bigHashVal+
"</font>";
@@ -302,10 +302,10 @@
if(!fileDiffs[bigHash].contains(bigdiffObj)){
fileDiffs[bigHash].add(bigdiffObj);
}
- }
+ }
} else {
// key doesn't exist
- /*add it into the vector for smaller tables, if not already there.*/
+ /*add it into the vector for smaller tables, if not already there.*/
String diffObj = "<font color=red>"+keyObj+
" testcase is missing </font>";
if(!fileDiffs[i].contains(diffObj)){
@@ -319,13 +319,13 @@
" testcase is missing </font>";
if(!fileDiffs[bigHash].contains(bigdiffObj)){
fileDiffs[bigHash].add(bigdiffObj);
- }// end missing-key if
+ }// end missing-key if
}
} // end for-loop for going through the hashtable array
} // end for-loop for keys in the bigHash hashtable
- } // end diff-hash method
+ } // end diff-hash method
- public void usage(){
+ public void usage(){
String usageStr = "Usage:\n java ParseML <xml_file_1> <xml_file_2> <xml_file_3>..."+
"\n\tThis Utility will let you 'diff' multiple xml"+
"\n\t files and produce a fileDiff.html file in the "+
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reporter/Reporter.java b/appserver/tests/v2-tests/appserv-tests/util/reporter/Reporter.java
index 398a07d..a7ab958 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reporter/Reporter.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reporter/Reporter.java
@@ -17,18 +17,18 @@
package com.sun.ejte.ccl.reporter;
/**
- * @Class : Reporter
+ * @Class : Reporter
@Description : Main class used for Uniform reporting of results
@Author : Ramesh Mandava
- @Last Modified : Initial Creation by Ramesh Mandava after taking input from
- Jeanfrancois and other Team members
- @Last Modified : By Ramesh on 1/20/2002 , Added code to use new testIdVector and
- testCaseIdVector for preserving order of entry of them and now <tests>
- element is added around multiple tests
+ @Last Modified : Initial Creation by Ramesh Mandava after taking input from
+ Jeanfrancois and other Team members
+ @Last Modified : By Ramesh on 1/20/2002 , Added code to use new testIdVector and
+ testCaseIdVector for preserving order of entry of them and now <tests>
+ element is added around multiple tests
@Last Modified : By Ramesh on 4/5/2002, Taken care of machine name unavailability
- under J2EE. And allowed having . in the path of result file
+ under J2EE. And allowed having . in the path of result file
- *
+ *
*/
@@ -53,111 +53,111 @@
private String resultFile="default.xml";
private FileOutputStream fout;
- private static String ws_home="sqe-pe";
+ private static String ws_home="sqe-pe";
transient public PrintWriter out = new PrintWriter(System.out);
private boolean hasBeenPrinted = false;
/** testSuiteHash is a Hashtable holding info about different testsuites. */
private static Hashtable testSuiteHash = new Hashtable();
-
- /**
- This method is used for setting the TestSuite Info
+
+ /**
+ This method is used for setting the TestSuite Info
*/
public void setTestSuite( String id, String name, String description )
{
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( id.trim() );
- if ( myTestSuite == null )
- {
- myTestSuite = new TestSuite( id, name,description);
- testSuiteHash.put( id.trim(), myTestSuite );
- }
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( id.trim() );
+ if ( myTestSuite == null )
+ {
+ myTestSuite = new TestSuite( id, name,description);
+ testSuiteHash.put( id.trim(), myTestSuite );
+ }
}
- /**
- This method is used for setting the TestSuite Info
+ /**
+ This method is used for setting the TestSuite Info
*/
public void setTestSuite( String id, String name)
{
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( id.trim() );
- if ( myTestSuite == null )
- {
- myTestSuite = new TestSuite( id.trim(), name);
- testSuiteHash.put( id.trim(), myTestSuite );
- }
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( id.trim() );
+ if ( myTestSuite == null )
+ {
+ myTestSuite = new TestSuite( id.trim(), name);
+ testSuiteHash.put( id.trim(), myTestSuite );
+ }
}
- /**
- This method is used for setting the TestSuite Info
+ /**
+ This method is used for setting the TestSuite Info
*/
public void setTestSuite( String id)
{
- System.err.println("setTestSuite with id -> " + id );
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( id.trim() );
- if ( myTestSuite == null )
- {
- myTestSuite = new TestSuite( id.trim());
- testSuiteHash.put( id.trim(), myTestSuite );
- }
+ System.err.println("setTestSuite with id -> " + id );
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( id.trim() );
+ if ( myTestSuite == null )
+ {
+ myTestSuite = new TestSuite( id.trim());
+ testSuiteHash.put( id.trim(), myTestSuite );
+ }
}
- /**
- After setting Test Suite info. suing setTestSuite, We need to use this addTest method
+ /**
+ After setting Test Suite info. suing setTestSuite, We need to use this addTest method
for adding information about particular Test. We need to pass both TestSuiteId and
TestId along with othe info of Test
*/
public void addTest( String testSuiteId, String testId, String testName, String testDescription )
{
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
- if ( myTestSuite== null )
- {
- System.err.println("ERROR:addTest might have called without setTestSuite. PENDING : Shall we throw Exception?");
- System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
- return;
- }
-
- Test myTest = new Test( testId, testName, testDescription );
- myTestSuite.addTest( myTest );
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
+ if ( myTestSuite== null )
+ {
+ System.err.println("ERROR:addTest might have called without setTestSuite. PENDING : Shall we throw Exception?");
+ System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
+ return;
}
- /**
- After setting Test Suite info. suing setTestSuite, We need to use this addTest method
+ Test myTest = new Test( testId, testName, testDescription );
+ myTestSuite.addTest( myTest );
+ }
+
+ /**
+ After setting Test Suite info. suing setTestSuite, We need to use this addTest method
for adding information about particular Test. We need to pass both TestSuiteId and
TestId along with othe info of Test
*/
public void addTest( String testSuiteId, String testId, String testName )
{
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
- if ( myTestSuite== null )
- {
- System.err.println("ERROR:addTest might have called without setTestSuite. PENDING : Shall we throw Exception?");
- System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
- return;
- }
-
- Test myTest = new Test( testId, testName );
- myTestSuite.addTest( myTest );
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
+ if ( myTestSuite== null )
+ {
+ System.err.println("ERROR:addTest might have called without setTestSuite. PENDING : Shall we throw Exception?");
+ System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
+ return;
}
- /**
- After using setthing Test Suite info. We need to use this addTest method
+ Test myTest = new Test( testId, testName );
+ myTestSuite.addTest( myTest );
+ }
+
+ /**
+ After using setthing Test Suite info. We need to use this addTest method
for adding information about particular Test. We need to pass both TestSuiteId and
- TestId
+ TestId
*/
public void addTest( String testSuiteId, String testId )
{
- System.out.println("addTest with testSuiteId:: testId -> " + testSuiteId + "::" + testId );
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
- if ( myTestSuite== null )
- {
- System.err.println("ERROR:addTest might have called without setTestSuite. PENDING : Shall we throw Exception?");
- System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
- return;
- }
+ System.out.println("addTest with testSuiteId:: testId -> " + testSuiteId + "::" + testId );
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
+ if ( myTestSuite== null )
+ {
+ System.err.println("ERROR:addTest might have called without setTestSuite. PENDING : Shall we throw Exception?");
+ System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
+ return;
+ }
- Test myTest = new Test( testId );
- myTestSuite.addTest( myTest );
+ Test myTest = new Test( testId );
+ myTestSuite.addTest( myTest );
}
@@ -192,134 +192,134 @@
}
- /**
- After adding a Test using addTest , We need to use this setTestStatus method
+ /**
+ After adding a Test using addTest , We need to use this setTestStatus method
for setting Test status(pass/fail) information about particular Test. We need to pass both TestSuiteId and TestId along with status information. This is optional as in some case
only TestCases will have status
*/
public void setTestStatus ( String testSuiteId, String testId, String status, String statusDescription )
{
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
-
- if ( myTestSuite== null )
- {
- System.err.println("ERROR:setTestStatus might have called without setTestSuite. PENDING : Shall we throw Exception?");
- System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
- return;
- }
- Test myTest = (Test)myTestSuite.getTestHash().get( testId.trim() );
- if ( myTest == null )
- {
- System.err.println("ERROR:setTestStatus might have called without addTest. PENDING : Shall we throw Exception?");
- System.err.println("Given TestSuite Id::Test Id -> " + testSuiteId.trim() + "::" + testId.trim() );
- return;
- }
- myTest.setStatus( status);
- myTest.setStatusDescription( statusDescription);
+ if ( myTestSuite== null )
+ {
+ System.err.println("ERROR:setTestStatus might have called without setTestSuite. PENDING : Shall we throw Exception?");
+ System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
+ return;
+ }
+
+ Test myTest = (Test)myTestSuite.getTestHash().get( testId.trim() );
+ if ( myTest == null )
+ {
+ System.err.println("ERROR:setTestStatus might have called without addTest. PENDING : Shall we throw Exception?");
+ System.err.println("Given TestSuite Id::Test Id -> " + testSuiteId.trim() + "::" + testId.trim() );
+ return;
+ }
+ myTest.setStatus( status);
+ myTest.setStatusDescription( statusDescription);
}
- /**
- After adding a Test using addTest , We need to use this setTestStatus method
+ /**
+ After adding a Test using addTest , We need to use this setTestStatus method
for setting Test status(pass/fail) information about particular Test. We need to pass both TestSuiteId and TestId along with status information. This is optional as in some case
only TestCases will have status
*/
public void setTestStatus ( String testSuiteId, String testId, String status )
{
- System.out.println("setTestStatus testSuiteId::testId::status -> " + testSuiteId + "::" + testId + "::" + status );
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
- if ( myTestSuite== null )
- {
- System.err.println("ERROR:setTestStatus might have called without setTestSuite. PENDING : Shall we throw Exception?");
- System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
- return;
- }
+ System.out.println("setTestStatus testSuiteId::testId::status -> " + testSuiteId + "::" + testId + "::" + status );
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
+ if ( myTestSuite== null )
+ {
+ System.err.println("ERROR:setTestStatus might have called without setTestSuite. PENDING : Shall we throw Exception?");
+ System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
+ return;
+ }
- Test myTest =(Test) myTestSuite.getTestHash().get( testId.trim() );
- if ( myTest == null )
- {
- System.err.println("ERROR:setTestStatus might have called without addTest. PENDING : Shall we throw Exception?");
- System.err.println("Given TestSuite Id::Test Id -> " + testSuiteId.trim() + "::" + testId.trim() );
- return;
- }
- myTest.setStatus( status);
+ Test myTest =(Test) myTestSuite.getTestHash().get( testId.trim() );
+ if ( myTest == null )
+ {
+ System.err.println("ERROR:setTestStatus might have called without addTest. PENDING : Shall we throw Exception?");
+ System.err.println("Given TestSuite Id::Test Id -> " + testSuiteId.trim() + "::" + testId.trim() );
+ return;
+ }
+ myTest.setStatus( status);
}
- /**
- After adding a Test using addTest, We need to use this addTestCase method
+ /**
+ After adding a Test using addTest, We need to use this addTestCase method
for adding information about particular TestCase corresponding to that Test. We need to pass TestSuiteId, TestId and TestCaseId along with othe info of TestCase
*/
public void addTestCase( String testSuiteId, String testId , String testCaseId)
{
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
- if ( myTestSuite== null )
- {
- System.err.println("ERROR:addTestCase might have called without setTestSuite. PENDING : Shall we throw Exception?");
- System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
- return;
- }
- Test myTest = (Test)myTestSuite.getTestHash().get( testId.trim() );
- if ( myTest == null )
- {
- System.err.println("ERROR:addTestCase might have called without addTest. PENDING : Shall we throw Exception?");
- System.err.println("Given TestSuite Id::Test Id -> " + testSuiteId.trim() + "::" + testId.trim() );
- return;
- }
-
- TestCase myTestCase = new TestCase( testCaseId.trim() );
- myTest.addTestCase ( myTestCase );
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
+ if ( myTestSuite== null )
+ {
+ System.err.println("ERROR:addTestCase might have called without setTestSuite. PENDING : Shall we throw Exception?");
+ System.err.println("Given TestSuite Id -> " + testSuiteId.trim() );
+ return;
+ }
+ Test myTest = (Test)myTestSuite.getTestHash().get( testId.trim() );
+ if ( myTest == null )
+ {
+ System.err.println("ERROR:addTestCase might have called without addTest. PENDING : Shall we throw Exception?");
+ System.err.println("Given TestSuite Id::Test Id -> " + testSuiteId.trim() + "::" + testId.trim() );
+ return;
}
- /**
- After adding a Test using addTest, We need to use this addTestCase method
+ TestCase myTestCase = new TestCase( testCaseId.trim() );
+ myTest.addTestCase ( myTestCase );
+ }
+
+ /**
+ After adding a Test using addTest, We need to use this addTestCase method
for adding information about particular TestCase corresponding to that Test. We need to pass TestSuiteId, TestId and TestCaseId along with othe info of TestCase
*/
public void addTestCase( String testSuiteId, String testId , String testCaseId, String testCaseName )
{
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
- if ( myTestSuite== null )
- {
- System.err.println("ERROR:addTestCase might have called without setTestSuite. PENDING : Shall we throw Exception?");
- return;
- }
- Test myTest = (Test)myTestSuite.getTestHash().get( testId.trim() );
- if ( myTest == null )
- {
- System.err.println("ERROR:addTestCase might have called without addTest. PENDING : Shall we throw Exception?");
- System.err.println("Given TestSuite Id::Test Id -> " + testSuiteId.trim() + "::" + testId.trim() );
- return;
- }
-
- TestCase myTestCase = new TestCase( testCaseId.trim(), testCaseName );
- myTest.addTestCase ( myTestCase );
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
+ if ( myTestSuite== null )
+ {
+ System.err.println("ERROR:addTestCase might have called without setTestSuite. PENDING : Shall we throw Exception?");
+ return;
+ }
+ Test myTest = (Test)myTestSuite.getTestHash().get( testId.trim() );
+ if ( myTest == null )
+ {
+ System.err.println("ERROR:addTestCase might have called without addTest. PENDING : Shall we throw Exception?");
+ System.err.println("Given TestSuite Id::Test Id -> " + testSuiteId.trim() + "::" + testId.trim() );
+ return;
}
- /**
- After adding a Test using addTest, We need to use this addTestCase method
+ TestCase myTestCase = new TestCase( testCaseId.trim(), testCaseName );
+ myTest.addTestCase ( myTestCase );
+ }
+
+ /**
+ After adding a Test using addTest, We need to use this addTestCase method
for adding information about particular TestCase corresponding to that Test. We need to pass TestSuiteId, TestId and TestCaseId along with othe info of TestCase
*/
public void addTestCase( String testSuiteId, String testId , String testCaseId, String testCaseName , String testCaseDescription )
{
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
- if ( myTestSuite== null )
- {
- System.err.println("ERROR:addTestCase might have called without setTestSuite. PENDING : Shall we throw Exception?");
- return;
- }
- Test myTest = (Test)myTestSuite.getTestHash().get( testId.trim() );
- if ( myTest == null )
- {
- System.err.println("ERROR:addTestCase might have called without addTest. PENDING : Shall we throw Exception?");
- return;
- }
-
- TestCase myTestCase = new TestCase( testCaseId.trim(), testCaseName, testCaseDescription );
- myTest.addTestCase ( myTestCase );
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
+ if ( myTestSuite== null )
+ {
+ System.err.println("ERROR:addTestCase might have called without setTestSuite. PENDING : Shall we throw Exception?");
+ return;
+ }
+ Test myTest = (Test)myTestSuite.getTestHash().get( testId.trim() );
+ if ( myTest == null )
+ {
+ System.err.println("ERROR:addTestCase might have called without addTest. PENDING : Shall we throw Exception?");
+ return;
}
-
+ TestCase myTestCase = new TestCase( testCaseId.trim(), testCaseName, testCaseDescription );
+ myTest.addTestCase ( myTestCase );
+ }
+
+
/**
After adding a TestCase using addTestCase , We need to use this setTestCaseStatus method
@@ -354,94 +354,94 @@
}
- /**
- After adding a TestCase using addTestCase , We need to use this setTestCaseStatus method
+ /**
+ After adding a TestCase using addTestCase , We need to use this setTestCaseStatus method
for setting TestCase status(pass/fail) information about particular TestCase. We need to pass TestSuiteId, TestId and TestCaseId along with status information.
Each TestCase will have status
*/
public void setTestCaseStatus ( String testSuiteId, String testId, String testCaseId, String status, String statusDescription )
{
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
- if ( myTestSuite== null )
- {
- System.err.println("ERROR:setTestCaseStatus might have called without setTestSuite. PENDING : Shall we throw Exception?");
- return;
- }
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
+ if ( myTestSuite== null )
+ {
+ System.err.println("ERROR:setTestCaseStatus might have called without setTestSuite. PENDING : Shall we throw Exception?");
+ return;
+ }
- Test myTest = (Test)myTestSuite.getTestHash().get( testId.trim() );
- if ( myTest == null )
- {
- System.err.println("ERROR:setTestCaseStatus might have called without addTest. PENDING : Shall we throw Exception?");
- return;
- }
- TestCase myTestCase =(TestCase) myTest.getTestCaseHash().get( testCaseId.trim() );
- if ( myTestCase == null )
- {
- System.err.println("ERROR:setTestCaseStatus might have called without addTestCase. PENDING : Shall we throw Exception?");
- return;
- }
- myTestCase.setStatus( status);
- myTestCase.setStatusDescription( statusDescription);
+ Test myTest = (Test)myTestSuite.getTestHash().get( testId.trim() );
+ if ( myTest == null )
+ {
+ System.err.println("ERROR:setTestCaseStatus might have called without addTest. PENDING : Shall we throw Exception?");
+ return;
+ }
+ TestCase myTestCase =(TestCase) myTest.getTestCaseHash().get( testCaseId.trim() );
+ if ( myTestCase == null )
+ {
+ System.err.println("ERROR:setTestCaseStatus might have called without addTestCase. PENDING : Shall we throw Exception?");
+ return;
+ }
+ myTestCase.setStatus( status);
+ myTestCase.setStatusDescription( statusDescription);
}
- /**
- After adding a TestCase using addTestCase , We need to use this setTestCaseStatus method
+ /**
+ After adding a TestCase using addTestCase , We need to use this setTestCaseStatus method
for setting TestCase status(pass/fail) information about particular TestCase. We need to pass TestSuiteId, TestId and TestCaseId along with status information.
only TestCases will have status
*/
public void setTestCaseStatus ( String testSuiteId, String testId, String testCaseId, String status )
{
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
- if ( myTestSuite== null )
- {
- System.err.println("ERROR:setTestCaseStatus might have called without setTestSuite. PENDING : Shall we throw Exception?");
- return;
- }
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId.trim() );
+ if ( myTestSuite== null )
+ {
+ System.err.println("ERROR:setTestCaseStatus might have called without setTestSuite. PENDING : Shall we throw Exception?");
+ return;
+ }
- Test myTest =(Test) myTestSuite.getTestHash().get( testId.trim() );
- if ( myTest == null )
- {
- System.err.println("ERROR:setTestCaseStatus might have called without addTest. PENDING : Shall we throw Exception?");
- return;
- }
- TestCase myTestCase = (TestCase)myTest.getTestCaseHash().get( testCaseId.trim() );
- if ( myTestCase == null )
- {
- System.err.println("ERROR:setTestCaseStatus might have called without addTestCase. PENDING : Shall we throw Exception?");
- return;
- }
- myTestCase.setStatus( status);
+ Test myTest =(Test) myTestSuite.getTestHash().get( testId.trim() );
+ if ( myTest == null )
+ {
+ System.err.println("ERROR:setTestCaseStatus might have called without addTest. PENDING : Shall we throw Exception?");
+ return;
+ }
+ TestCase myTestCase = (TestCase)myTest.getTestCaseHash().get( testCaseId.trim() );
+ if ( myTestCase == null )
+ {
+ System.err.println("ERROR:setTestCaseStatus might have called without addTestCase. PENDING : Shall we throw Exception?");
+ return;
+ }
+ myTestCase.setStatus( status);
}
-
-
+
+
/**
* Change done on 7/10/02 by Deepa Singh
* Now Reporter will by default create results file in $EJTE_HOME if no results file is specified
* So no need to pass the environment variable.
* Reporter.getInstance should create test_results.xml at j2ee-test/
- *
+ *
*/
-
+
public static Reporter getInstance( )
{
- if ( reporterInstance == null )
- {
- //reporterInstance = new Reporter( );
- String rootpath=new File(".").getAbsolutePath();
- String ejte_home=rootpath.substring(0,rootpath.indexOf(ws_home));
- //ejte_home contains OS dependent path separator character without j2ee-test
- String outputDir=ejte_home+ws_home;
- reporterInstance = Reporter.getInstance( outputDir + File.separatorChar + "test_results.xml" );
- }
+ if ( reporterInstance == null )
+ {
+ //reporterInstance = new Reporter( );
+ String rootpath=new File(".").getAbsolutePath();
+ String ejte_home=rootpath.substring(0,rootpath.indexOf(ws_home));
+ //ejte_home contains OS dependent path separator character without j2ee-test
+ String outputDir=ejte_home+ws_home;
+ reporterInstance = Reporter.getInstance( outputDir + File.separatorChar + "test_results.xml" );
+ }
- return reporterInstance;
+ return reporterInstance;
}
-
+
public static Reporter getInstance(String wshome)
{
if(reporterInstance == null)
@@ -456,16 +456,16 @@
public static Reporter getInstance( String resultFilePath,boolean pathSpecified )
{
- if ( reporterInstance == null )
- {
- reporterInstance = new Reporter(resultFilePath );
-
- }
- return reporterInstance;
+ if ( reporterInstance == null )
+ {
+ reporterInstance = new Reporter(resultFilePath );
+
}
-
+ return reporterInstance;
+ }
+
//done only for the webtests.
-
+
/*public static Reporter getInstance(String wshome) {
if ( reporterInstance == null ) {
String rootpath=new File(".").getAbsolutePath();
@@ -477,7 +477,7 @@
reporterInstance = new Reporter(outputDir + File.separatorChar + "test_results.xml");
//reporterInstance = Reporter.getInstance( outputDir + File.separatorChar + "test_results.xml" );
//reporterInstance = new Reporter(resultFilePath );
-
+
}
return reporterInstance;
}*/
@@ -485,24 +485,24 @@
public static Reporter getInstance( OutputStream outStream )
{
- if ( reporterInstance == null )
- {
- reporterInstance = new Reporter(outStream );
-
- }
- return reporterInstance;
- }
+ if ( reporterInstance == null )
+ {
+ reporterInstance = new Reporter(outStream );
+
+ }
+ return reporterInstance;
+ }
public static Reporter getInstance( Writer writer )
{
- if ( reporterInstance == null )
- {
-
- reporterInstance = new Reporter(writer );
-
- }
- return reporterInstance;
- }
+ if ( reporterInstance == null )
+ {
+
+ reporterInstance = new Reporter(writer );
+
+ }
+ return reporterInstance;
+ }
/* CONSTRUCTORS */
private Reporter( )
@@ -518,19 +518,19 @@
private Reporter( String resultFilePath )
{
try{
- resultFile= resultFilePath;
+ resultFile= resultFilePath;
Runtime.getRuntime().addShutdownHook(this);
} catch (java.lang.Exception ex){
//System.out.println("WARNING: Reporter hook thread not created. No XML file will be produced.");
}
}
-
-
+
+
private Reporter (OutputStream o) {
- this();
- out = new PrintWriter(o);
+ this();
+ out = new PrintWriter(o);
}
@@ -539,8 +539,8 @@
* which extends PrintWriter. */
private Reporter (Writer w) {
- this();
- out = new PrintWriter(w);
+ this();
+ out = new PrintWriter(w);
}
@@ -554,61 +554,61 @@
try
{
- //Now flush all the TestSuite info
+ //Now flush all the TestSuite info
- //System.out.println("REPORTER\t generateValidReport.flushAll");
+ //System.out.println("REPORTER\t generateValidReport.flushAll");
flushAll();
- String oFileName =null;
- if ( resultFile.lastIndexOf(".") > 0 )
- {
- oFileName = resultFile.substring(0, resultFile.lastIndexOf(".") ) + "Valid.xml";
- }
- else
- {
- oFileName = resultFile + "Valid.xml";
- }
+ String oFileName =null;
+ if ( resultFile.lastIndexOf(".") > 0 )
+ {
+ oFileName = resultFile.substring(0, resultFile.lastIndexOf(".") ) + "Valid.xml";
+ }
+ else
+ {
+ oFileName = resultFile + "Valid.xml";
+ }
wChannel = new FileOutputStream(oFileName).getChannel();
- String osName = System.getProperty("os.name");
- String osVersion = System.getProperty("os.version");
- String currentDate = (new Date()).toString();
-
- String extraXML = "<report> <date> " + currentDate + "</date><configuration>";
- extraXML += "<os>" + osName + osVersion + "</os>";
- extraXML += "<jdkVersion>" + System.getProperty("java.version") + "</jdkVersion>";
+ String osName = System.getProperty("os.name");
+ String osVersion = System.getProperty("os.version");
+ String currentDate = (new Date()).toString();
- String machineName = "unavailable";
+ String extraXML = "<report> <date> " + currentDate + "</date><configuration>";
+ extraXML += "<os>" + osName + osVersion + "</os>";
+ extraXML += "<jdkVersion>" + System.getProperty("java.version") + "</jdkVersion>";
+
+ String machineName = "unavailable";
InputStream in = null;
- try {
+ try {
- in = Runtime.getRuntime().exec("uname -n").getInputStream();
- byte[] myBytes = new byte[200];
- in.read(myBytes);
- machineName = new String( myBytes ).trim();
- }
- catch ( Exception me ) {
- } finally {
+ in = Runtime.getRuntime().exec("uname -n").getInputStream();
+ byte[] myBytes = new byte[200];
+ in.read(myBytes);
+ machineName = new String( myBytes ).trim();
+ }
+ catch ( Exception me ) {
+ } finally {
close(in);
}
-
- extraXML += "<machineName>" + machineName + "</machineName>";
- extraXML += "</configuration> <testsuites>";
- wChannel.write(ByteBuffer.wrap(extraXML.getBytes()));
+ extraXML += "<machineName>" + machineName + "</machineName>";
+ extraXML += "</configuration> <testsuites>";
+
+ wChannel.write(ByteBuffer.wrap(extraXML.getBytes()));
rChannel = new FileInputStream(resultFile).getChannel();
wChannel.transferFrom(rChannel, wChannel.position(), rChannel.size());
wChannel.position(wChannel.position() + rChannel.size());
- wChannel.write(ByteBuffer.wrap("</testsuites>\n</report>\n".getBytes()));
+ wChannel.write(ByteBuffer.wrap("</testsuites>\n</report>\n".getBytes()));
//System.out.println("REPORTER\t File validation complete");
- }
- catch ( Exception e )
- {
- System.out.println("ERROR : " + e );
- } finally {
+ }
+ catch ( Exception e )
+ {
+ System.out.println("ERROR : " + e );
+ } finally {
close(rChannel);
close(wChannel);
}
@@ -616,46 +616,46 @@
public void flushAll ( )
{
-// System.out.println("REPORTER\t inside flushAll") ;
+// System.out.println("REPORTER\t inside flushAll") ;
InputStream in = null;
FileOutputStream foutput = null;
try
- {
- Enumeration testSuiteEnum = testSuiteHash.keys();
+ {
+ Enumeration testSuiteEnum = testSuiteHash.keys();
- if ( resultFile.equals("default.xml") )
- {
- in = Runtime.getRuntime().exec("uname -n").getInputStream();
- byte[] myBytes = new byte[200];
- in.read(myBytes);
- String myResultFile = "result_";
- String machineName = new String( myBytes ).trim();
- myResultFile += machineName;
+ if ( resultFile.equals("default.xml") )
+ {
+ in = Runtime.getRuntime().exec("uname -n").getInputStream();
+ byte[] myBytes = new byte[200];
+ in.read(myBytes);
+ String myResultFile = "result_";
+ String machineName = new String( myBytes ).trim();
+ myResultFile += machineName;
- Calendar myCalendar = Calendar.getInstance();
- String month = new Integer( myCalendar.get ( Calendar.MONTH)).toString();
- String day = new Integer(myCalendar.get ( Calendar.DAY_OF_MONTH)).toString();
- String year = new Integer(myCalendar.get ( Calendar.YEAR)).toString();
- myResultFile += "_" + month + day + year + ".xml";
- resultFile= myResultFile;
+ Calendar myCalendar = Calendar.getInstance();
+ String month = new Integer( myCalendar.get ( Calendar.MONTH)).toString();
+ String day = new Integer(myCalendar.get ( Calendar.DAY_OF_MONTH)).toString();
+ String year = new Integer(myCalendar.get ( Calendar.YEAR)).toString();
+ myResultFile += "_" + month + day + year + ".xml";
+ resultFile= myResultFile;
- }
+ }
- foutput = new FileOutputStream( resultFile, true );
- while ( testSuiteEnum.hasMoreElements( ) )
- {
- String testSuiteId = (String) testSuiteEnum.nextElement();
- flush( testSuiteId, foutput );
- }
+ foutput = new FileOutputStream( resultFile, true );
+ while ( testSuiteEnum.hasMoreElements( ) )
+ {
+ String testSuiteId = (String) testSuiteEnum.nextElement();
+ flush( testSuiteId, foutput );
+ }
- System.out.println("in flushAll , creating new testSuiteHash");
- // Now take out the TestSuite info from memory
- testSuiteHash = new Hashtable();
- }
- catch ( Exception e )
- {
- System.err.println("ERROR: " + e );
- } finally {
+ System.out.println("in flushAll , creating new testSuiteHash");
+ // Now take out the TestSuite info from memory
+ testSuiteHash = new Hashtable();
+ }
+ catch ( Exception e )
+ {
+ System.err.println("ERROR: " + e );
+ } finally {
close(in);
close(foutput);
}
@@ -664,22 +664,22 @@
}
/**
- * This method prepares and output an XML representation of the Reporter class' content for the given testSuite.
+ * This method prepares and output an XML representation of the Reporter class' content for the given testSuite.
* @param testSuiteName the test suite's name.
* @return returns true if the file is succesfully created
*/
-
+
public boolean flush(String testSuiteId)
{
//System.out.println("REPORTER\t flush(testsuiteID");
- boolean returnVal=false;
+ boolean returnVal=false;
InputStream in = null;
FileOutputStream foutput = null;
- try
+ try
{
- if ( resultFile.equals("default.xml") )
+ if ( resultFile.equals("default.xml") )
{
in = Runtime.getRuntime().exec("uname -n").getInputStream();
byte[] myBytes = new byte[200];
@@ -688,30 +688,30 @@
String machineName = new String( myBytes ).trim();
myResultFile += machineName;
- Calendar myCalendar = Calendar.getInstance();
- String month = new Integer( myCalendar.get ( Calendar.MONTH)).toString();
- String day = new Integer(myCalendar.get ( Calendar.DAY_OF_MONTH)).toString();
- String year = new Integer(myCalendar.get ( Calendar.YEAR)).toString();
- myResultFile += "_" + month + day + year + ".xml";
- resultFile= myResultFile;
+ Calendar myCalendar = Calendar.getInstance();
+ String month = new Integer( myCalendar.get ( Calendar.MONTH)).toString();
+ String day = new Integer(myCalendar.get ( Calendar.DAY_OF_MONTH)).toString();
+ String year = new Integer(myCalendar.get ( Calendar.YEAR)).toString();
+ myResultFile += "_" + month + day + year + ".xml";
+ resultFile= myResultFile;
}
- foutput = new FileOutputStream( resultFile, true );
- returnVal= flush( testSuiteId, foutput);
- }
- catch ( Exception e )
- {
- System.err.println("ERROR : " + e );
- } finally {
+ foutput = new FileOutputStream( resultFile, true );
+ returnVal= flush( testSuiteId, foutput);
+ }
+ catch ( Exception e )
+ {
+ System.err.println("ERROR : " + e );
+ } finally {
close(in);
close(foutput);
}
- return returnVal;
+ return returnVal;
}
/**
- * This method prepares and output an XML representation of the Reporter class' content for the given testSuite.
+ * This method prepares and output an XML representation of the Reporter class' content for the given testSuite.
* @param testSuiteName the test suite's name.
* @param foutput the FileOutputStream in which we need to write.
* @return returns true if the file is succesfully created
@@ -721,154 +721,154 @@
try{
StringBuffer xmlRepresentation = new StringBuffer();
- /*
+ /*
xmlRepresentation.append("<?xml version=\"1.0\"?>\n");
xmlRepresentation.append("<!DOCTYPE testsuite SYSTEM \"test_suite.dtd\">\n");
-
- xmlRepresentation.append("<!-- ID are defined as: test suite: test case : local id-->\n");
- */
- TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId );
- if ( myTestSuite == null )
- {
- System.err.println("ERROR: Information for TestSuite Id : " + testSuiteId + " doesn't exist");
- return false;
- }
- String testSuiteName = myTestSuite.getName();
- String testSuiteDescription = myTestSuite.getDescription();
+ xmlRepresentation.append("<!-- ID are defined as: test suite: test case : local id-->\n");
+ */
+
+ TestSuite myTestSuite = (TestSuite)testSuiteHash.get( testSuiteId );
+ if ( myTestSuite == null )
+ {
+ System.err.println("ERROR: Information for TestSuite Id : " + testSuiteId + " doesn't exist");
+ return false;
+ }
+ String testSuiteName = myTestSuite.getName();
+ String testSuiteDescription = myTestSuite.getDescription();
xmlRepresentation.append("<testsuite>\n" );
xmlRepresentation.append(" <id> " + testSuiteId + " </id>\n");
- if (!testSuiteName.equals( ReporterConstants.NA ) )
- {
- xmlRepresentation.append("<name>" + testSuiteName.trim() + "</name>\n");
- }
- if (!testSuiteDescription.equals( ReporterConstants.NA ) )
- {
- xmlRepresentation.append("<description><![CDATA[" + testSuiteDescription + "]]></description>\n");
- }
+ if (!testSuiteName.equals( ReporterConstants.NA ) )
+ {
+ xmlRepresentation.append("<name>" + testSuiteName.trim() + "</name>\n");
+ }
+ if (!testSuiteDescription.equals( ReporterConstants.NA ) )
+ {
+ xmlRepresentation.append("<description><![CDATA[" + testSuiteDescription + "]]></description>\n");
+ }
- Hashtable testHash = myTestSuite.getTestHash( );
-
- Vector testIdVector = myTestSuite.getTestIdVector( );
+ Hashtable testHash = myTestSuite.getTestHash( );
- xmlRepresentation.append("<tests>\n");
- for ( int ti=0; ti< testIdVector.size(); ti++ )
- {
+ Vector testIdVector = myTestSuite.getTestIdVector( );
- String testId = (String)testIdVector.elementAt(ti );
- Test myTest = (Test)testHash.get( testId.trim() );
- String testName = myTest.getName();
- String testDescription = myTest.getDescription();
- String testStatus = myTest.getStatus();
- String testStatusDescription = myTest.getStatusDescription();
+ xmlRepresentation.append("<tests>\n");
+ for ( int ti=0; ti< testIdVector.size(); ti++ )
+ {
- String testExpected= myTest.getExpected( );
- String testActual= myTest.getActual( );
+ String testId = (String)testIdVector.elementAt(ti );
+ Test myTest = (Test)testHash.get( testId.trim() );
+ String testName = myTest.getName();
+ String testDescription = myTest.getDescription();
+ String testStatus = myTest.getStatus();
+ String testStatusDescription = myTest.getStatusDescription();
- xmlRepresentation.append("<test>\n");
+ String testExpected= myTest.getExpected( );
+ String testActual= myTest.getActual( );
+
+ xmlRepresentation.append("<test>\n");
xmlRepresentation.append("<id>" + testId + "</id>\n");
-
- if (!testName.equals( ReporterConstants.NA ) )
- {
- xmlRepresentation.append("<name>" + testName + "</name>\n");
- }
- if (!testDescription.equals( ReporterConstants.NA ) )
- {
- xmlRepresentation.append("<description><![CDATA[" + testDescription + "]]></description>\n");
- }
- if (!testStatus.equals( ReporterConstants.OPTIONAL ) )
- {
- if (!testStatusDescription.equals( ReporterConstants.OPTIONAL ) )
- {
- xmlRepresentation.append("<status value=\"" + testStatus + "\"><![CDATA[" + testStatusDescription + "]]></status>\n");
- }
- else if ( ( testExpected != null ) && ( testActual != null ) )
- {
- xmlRepresentation.append("<status value=\"" + testStatus + "\"> <expected><![CDATA[" + testExpected + "]]></expected><actual><![CDATA[" + testActual + "]]></actual></status>\n");
- }
- else {
- xmlRepresentation.append("<status value=\"" + testStatus + "\">" + "</status>\n");
- }
- }
+ if (!testName.equals( ReporterConstants.NA ) )
+ {
+ xmlRepresentation.append("<name>" + testName + "</name>\n");
+ }
- Hashtable testCaseHash = myTest.getTestCaseHash();
- Vector testCaseIdVector = myTest.getTestCaseIdVector( );
-
- /*
- if ( testCaseIdVector.size( ) < 1 )
- {
- // This means there are no test cases and Test has the status info
- xmlRepresentation.append("</test>\n");
+ if (!testDescription.equals( ReporterConstants.NA ) )
+ {
+ xmlRepresentation.append("<description><![CDATA[" + testDescription + "]]></description>\n");
+ }
+ if (!testStatus.equals( ReporterConstants.OPTIONAL ) )
+ {
+ if (!testStatusDescription.equals( ReporterConstants.OPTIONAL ) )
+ {
+ xmlRepresentation.append("<status value=\"" + testStatus + "\"><![CDATA[" + testStatusDescription + "]]></status>\n");
+ }
+ else if ( ( testExpected != null ) && ( testActual != null ) )
+ {
+ xmlRepresentation.append("<status value=\"" + testStatus + "\"> <expected><![CDATA[" + testExpected + "]]></expected><actual><![CDATA[" + testActual + "]]></actual></status>\n");
+ }
+ else {
+ xmlRepresentation.append("<status value=\"" + testStatus + "\">" + "</status>\n");
+ }
+ }
- }
- */
- if ( testCaseIdVector.size() >= 1 )
- {
- xmlRepresentation.append("<testcases>\n");
-
- for ( int tc=0; tc< testCaseIdVector.size(); tc++ )
- {
- String testCaseId = (String)testCaseIdVector.elementAt( tc );
- TestCase myTestCase = (TestCase)testCaseHash.get( testCaseId.trim() );
+ Hashtable testCaseHash = myTest.getTestCaseHash();
+ Vector testCaseIdVector = myTest.getTestCaseIdVector( );
- String testCaseName = myTestCase.getName();
- String testCaseDescription = myTestCase.getDescription();
- String testCaseStatus = myTestCase.getStatus();
- String testCaseStatusDescription = myTestCase.getStatusDescription();
- String testCaseExpected = myTestCase.getExpected();
- String testCaseActual = myTestCase.getActual();
+ /*
+ if ( testCaseIdVector.size( ) < 1 )
+ {
+ // This means there are no test cases and Test has the status info
+ xmlRepresentation.append("</test>\n");
- xmlRepresentation.append("<testcase>\n");
- xmlRepresentation.append("<id> " + testCaseId + "</id>\n");
- if (!testCaseName.equals( ReporterConstants.NA ) )
- {
- xmlRepresentation.append("<name>" + testCaseName + "</name>\n");
- }
+ }
+ */
+ if ( testCaseIdVector.size() >= 1 )
+ {
+ xmlRepresentation.append("<testcases>\n");
- if (!testCaseDescription.equals( ReporterConstants.NA ) )
- {
- xmlRepresentation.append("<description><![CDATA[" + testCaseDescription + "]]></description>\n");
- }
- if (!testCaseStatusDescription.equals( ReporterConstants.NA ) )
- {
- xmlRepresentation.append("<status value=\"" + testCaseStatus + "\"><![CDATA[" + testCaseStatusDescription + "]]></status>\n");
- }
- else if ( ( testCaseExpected != null ) && ( testCaseActual != null ) )
- {
- xmlRepresentation.append("<status value=\"" + testCaseStatus + "\"> <expected><![CDATA[" + testCaseExpected + "]]></expected><actual><![CDATA[" + testCaseActual + "]]></actual></status>\n");
- }
- else
- {
- xmlRepresentation.append("<status value=\"" + testCaseStatus + "\">" + "</status>\n");
- }
- xmlRepresentation.append("</testcase>\n");
+ for ( int tc=0; tc< testCaseIdVector.size(); tc++ )
+ {
+ String testCaseId = (String)testCaseIdVector.elementAt( tc );
+ TestCase myTestCase = (TestCase)testCaseHash.get( testCaseId.trim() );
+
+ String testCaseName = myTestCase.getName();
+ String testCaseDescription = myTestCase.getDescription();
+ String testCaseStatus = myTestCase.getStatus();
+ String testCaseStatusDescription = myTestCase.getStatusDescription();
+ String testCaseExpected = myTestCase.getExpected();
+ String testCaseActual = myTestCase.getActual();
+
+ xmlRepresentation.append("<testcase>\n");
+ xmlRepresentation.append("<id> " + testCaseId + "</id>\n");
+ if (!testCaseName.equals( ReporterConstants.NA ) )
+ {
+ xmlRepresentation.append("<name>" + testCaseName + "</name>\n");
+ }
+
+ if (!testCaseDescription.equals( ReporterConstants.NA ) )
+ {
+ xmlRepresentation.append("<description><![CDATA[" + testCaseDescription + "]]></description>\n");
+ }
+ if (!testCaseStatusDescription.equals( ReporterConstants.NA ) )
+ {
+ xmlRepresentation.append("<status value=\"" + testCaseStatus + "\"><![CDATA[" + testCaseStatusDescription + "]]></status>\n");
+ }
+ else if ( ( testCaseExpected != null ) && ( testCaseActual != null ) )
+ {
+ xmlRepresentation.append("<status value=\"" + testCaseStatus + "\"> <expected><![CDATA[" + testCaseExpected + "]]></expected><actual><![CDATA[" + testCaseActual + "]]></actual></status>\n");
+ }
+ else
+ {
+ xmlRepresentation.append("<status value=\"" + testCaseStatus + "\">" + "</status>\n");
+ }
+ xmlRepresentation.append("</testcase>\n");
}
xmlRepresentation.append("</testcases>\n");
- }
+ }
xmlRepresentation.append("</test>\n");
- }
-
+ }
+
xmlRepresentation.append("</tests>\n" );
xmlRepresentation.append("</testsuite>\n" );
boolean writeResult = writeXMLFile(xmlRepresentation, foutput);
- // Now remove TestSuite from Hashtable: PENDING
- if ( writeResult==true )
- {
- // If we could write teh content properly then remove the TestSuite from Hashtable
- testSuiteHash.remove( testSuiteId.trim() );
- }
- return writeResult;
+ // Now remove TestSuite from Hashtable: PENDING
+ if ( writeResult==true )
+ {
+ // If we could write teh content properly then remove the TestSuite from Hashtable
+ testSuiteHash.remove( testSuiteId.trim() );
+ }
+ return writeResult;
} catch (java.lang.Exception ex){
return false;
}
}
-
+
private boolean writeXMLFile(StringBuffer xmlStringBuffer){
PrintWriter writer = null;
try{
@@ -880,21 +880,21 @@
return false;
} finally {
close(writer);
- }
- return true;
+ }
+ return true;
}
private boolean writeXMLFile(StringBuffer xmlStringBuffer, FileOutputStream fout){
try{
- fout.write( xmlStringBuffer.toString().getBytes() );
- fout.flush( );
+ fout.write( xmlStringBuffer.toString().getBytes() );
+ fout.flush( );
} catch(java.io.IOException ex){
ex.printStackTrace();
return false;
- }
- return true;
+ }
+ return true;
}
-
+
public void run(){
//System.out.println("REPORTER\t Inside run");
generateValidReport();
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reporter/ReporterClient.java b/appserver/tests/v2-tests/appserv-tests/util/reporter/ReporterClient.java
index 5edb696..f3322b3 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/reporter/ReporterClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reporter/ReporterClient.java
@@ -20,7 +20,7 @@
public class ReporterClient{
- private static SimpleReporterAdapter stat =
+ private static SimpleReporterAdapter stat =
new SimpleReporterAdapter("appserv-tests");
public static void main(String args[]){
@@ -34,22 +34,22 @@
echo(args[1]+" is the test description");
default_desc = args[1];
}
- int numTests = 1;
- if (args.length>=3) {
- numTests = Integer.parseInt(args[2]);
- }
+ int numTests = 1;
+ if (args.length>=3) {
+ numTests = Integer.parseInt(args[2]);
+ }
echo("adding description...");
stat.addDescription(default_desc);
echo("adding status...");
- if (numTests==1) {
- stat.addStatus(args[0], stat.DID_NOT_RUN);
- } else {
- for (int i=0;i<numTests; i++) {
- stat.addStatus(args[0]+"-"+(i+1), stat.DID_NOT_RUN);
- }
- }
+ if (numTests==1) {
+ stat.addStatus(args[0], stat.DID_NOT_RUN);
+ } else {
+ for (int i=0;i<numTests; i++) {
+ stat.addStatus(args[0]+"-"+(i+1), stat.DID_NOT_RUN);
+ }
+ }
echo("printing summary...");
stat.printSummary();
@@ -57,7 +57,7 @@
public static void usage(){
String usg="Usage:"+
"\tReporterClient <test name> [<test description>]"+
- "\tNote:Test description is not required but recommended";
+ "\tNote:Test description is not required but recommended";
echo(usg);
}
public static void echo(String msg){
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reporter/ReporterConstants.java b/appserver/tests/v2-tests/appserv-tests/util/reporter/ReporterConstants.java
index d14872d..8528eff 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reporter/ReporterConstants.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reporter/ReporterConstants.java
@@ -18,10 +18,10 @@
public interface ReporterConstants
{
- public static final String NA="NA";
- public static final String DID_NOT_RUN="did_not_run";
- public static final String PASS="pass";
- public static final String FAIL="fail";
- public static final String OPTIONAL="";
+ public static final String NA="NA";
+ public static final String DID_NOT_RUN="did_not_run";
+ public static final String PASS="pass";
+ public static final String FAIL="fail";
+ public static final String OPTIONAL="";
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reporter/SimpleReporterAdapter.java b/appserver/tests/v2-tests/appserv-tests/util/reporter/SimpleReporterAdapter.java
index 693d770..701a28c 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reporter/SimpleReporterAdapter.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reporter/SimpleReporterAdapter.java
@@ -38,7 +38,7 @@
private String resultFile="test_results";
private boolean isFileSet=false;
-
+
public SimpleReporterAdapter() {
testSuiteName = "undefined";
testSuiteID = null;
@@ -50,8 +50,8 @@
}
catch(Exception ex) { }
}
-
-
+
+
public SimpleReporterAdapter(String ws_root) {
testSuiteName = "undefined";
testSuiteID = null;
@@ -64,7 +64,7 @@
}
catch(Exception ex) { }
}
-
+
//used by webrunner
public SimpleReporterAdapter(String resultFilePath,boolean isResultFileSet){
try{
@@ -72,8 +72,8 @@
this.resultFile=resultFilePath;
}catch( Exception ex ){ }
}
-
-
+
+
public synchronized void addStatus(String s, String status) {
if( testSuiteName.compareTo("undefined") == 0 ) {
@@ -90,11 +90,11 @@
testCaseStatus = new HashMap(5);
}
- int blankIndex = s.indexOf(" ");
+ int blankIndex = s.indexOf(" ");
String key = s;
if (blankIndex!=-1){
key = s.substring(s.indexOf( " " ));
- }
+ }
if(debug)
System.out.println("Value of key is:"+key);
@@ -121,14 +121,14 @@
outputDir = ejte_home + ws_home;
reporter = Reporter.getInstance(ws_home);
if(debug)
- System.out.println("Generating report at \t" + outputDir +
+ System.out.println("Generating report at \t" + outputDir +
File.separatorChar + "test_results.xml");
reporter.setTestSuite(testSuiteID, testSuiteName, testSuiteDescription);
reporter.addTest(testSuiteID, testSuiteID, testSuiteName);
keySets = testCaseStatus.keySet();
keySetsIT = keySets.iterator();
String tcName;
-
+
int pass= 0;
int fail = 0;
int d_n_r = 0;
@@ -137,7 +137,7 @@
while( keySetsIT.hasNext() ){
tcName = keySetsIT.next().toString();
status = testCaseStatus.get( tcName ).toString();
-
+
if (status.equalsIgnoreCase(PASS)){
pass++;
} else if(status.equalsIgnoreCase(DID_NOT_RUN)){
@@ -145,7 +145,7 @@
} else {
fail++;
}
-
+
System.out.println("-\t " + tcName + ": " + status.toUpperCase() + "\t-");
reporter.addTestCase( testSuiteID, testSuiteID, tcName + "ID", tcName );
reporter.setTestCaseStatus( testSuiteID, testSuiteID, tcName + "ID", status );
@@ -202,12 +202,12 @@
testCaseStatus.clear();
testSuiteName = "undefined";
}
-
+
/**
*A dead function.
* J2EE server security contraints don't allow use of exec
*/
-
+
public Properties getEnvVars() throws Throwable {
Process p = null;
Properties envVars = new Properties();
@@ -220,10 +220,10 @@
else if ( (OS.indexOf("nt") > -1) || (OS.indexOf("windows 2000") > -1) ) {
p = r.exec( "cmd.exe /c set" );
}
- else {
+ else {
p = r.exec( "env" );
}
- BufferedReader br =
+ BufferedReader br =
new BufferedReader(new InputStreamReader(p.getInputStream()));
String line;
while( (line = br.readLine()) != null ) {
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reporter/Test.java b/appserver/tests/v2-tests/appserv-tests/util/reporter/Test.java
index a5811ef..0e18160 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reporter/Test.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reporter/Test.java
@@ -17,12 +17,12 @@
package com.sun.ejte.ccl.reporter;
/**
- @Class: Test
- @Description: Class holding One Test info.
- @Author : Ramesh Mandava
- @Last Modified :Initial creation By Ramesh on 10/24/2001
- @Last Modified : By Ramesh on 1/20/2002 , For preserving order of entry of
- testcases used a separate testCaseIdVector
+ @Class: Test
+ @Description: Class holding One Test info.
+ @Author : Ramesh Mandava
+ @Last Modified :Initial creation By Ramesh on 10/24/2001
+ @Last Modified : By Ramesh on 1/20/2002 , For preserving order of entry of
+ testcases used a separate testCaseIdVector
*/
@@ -32,136 +32,136 @@
public class Test
{
- private String id;
- private String name;
- private String description;
+ private String id;
+ private String name;
+ private String description;
- private String status;
- private String statusDescription;
+ private String status;
+ private String statusDescription;
- private String expected;
- private String actual;
+ private String expected;
+ private String actual;
- Hashtable testCaseHash;
- Vector testCaseIdVector; // Added to preserve order of entry
+ Hashtable testCaseHash;
+ Vector testCaseIdVector; // Added to preserve order of entry
- public Test( String id, String name, String description )
- {
- this.id = id;
- this.name= name;
- this.description = description;
- this.status = ReporterConstants.OPTIONAL;
- this.statusDescription=ReporterConstants.OPTIONAL;
- this.expected = null;
- this.actual= null;
- testCaseHash = new Hashtable();
- testCaseIdVector= new Vector();
- }
- public Test( String id, String name )
- {
- this.id = id;
- this.name= name;
- this.description =ReporterConstants.NA ;
- this.status = ReporterConstants.OPTIONAL;
- this.statusDescription=ReporterConstants.OPTIONAL;
- this.expected = null;
- this.actual= null;
- testCaseHash = new Hashtable();
- testCaseIdVector= new Vector();
- }
+ public Test( String id, String name, String description )
+ {
+ this.id = id;
+ this.name= name;
+ this.description = description;
+ this.status = ReporterConstants.OPTIONAL;
+ this.statusDescription=ReporterConstants.OPTIONAL;
+ this.expected = null;
+ this.actual= null;
+ testCaseHash = new Hashtable();
+ testCaseIdVector= new Vector();
+ }
+ public Test( String id, String name )
+ {
+ this.id = id;
+ this.name= name;
+ this.description =ReporterConstants.NA ;
+ this.status = ReporterConstants.OPTIONAL;
+ this.statusDescription=ReporterConstants.OPTIONAL;
+ this.expected = null;
+ this.actual= null;
+ testCaseHash = new Hashtable();
+ testCaseIdVector= new Vector();
+ }
- public Test( String id )
- {
- this.id = id;
- this.name= ReporterConstants.NA;
- this.description =ReporterConstants.NA ;
- this.status = ReporterConstants.OPTIONAL;
- this.statusDescription=ReporterConstants.OPTIONAL;
- this.expected = null;
- this.actual= null;
- testCaseHash = new Hashtable();
- testCaseIdVector= new Vector();
- }
+ public Test( String id )
+ {
+ this.id = id;
+ this.name= ReporterConstants.NA;
+ this.description =ReporterConstants.NA ;
+ this.status = ReporterConstants.OPTIONAL;
+ this.statusDescription=ReporterConstants.OPTIONAL;
+ this.expected = null;
+ this.actual= null;
+ testCaseHash = new Hashtable();
+ testCaseIdVector= new Vector();
+ }
- public void setStatus ( String status )
- {
- this.status = status;
- }
- public void setStatusDescription ( String statusDescription )
- {
- this.statusDescription = statusDescription;
- this.expected=null;
- this.actual =null;
- }
+ public void setStatus ( String status )
+ {
+ this.status = status;
+ }
+ public void setStatusDescription ( String statusDescription )
+ {
+ this.statusDescription = statusDescription;
+ this.expected=null;
+ this.actual =null;
+ }
- public void setExpected( String expected )
- {
- this.expected = expected;
- }
+ public void setExpected( String expected )
+ {
+ this.expected = expected;
+ }
- public void setActual( String actual )
- {
- this.actual = actual;
- }
+ public void setActual( String actual )
+ {
+ this.actual = actual;
+ }
- public String getId( )
- {
- return id;
- }
+ public String getId( )
+ {
+ return id;
+ }
- public String getName( )
- {
- return name;
- }
+ public String getName( )
+ {
+ return name;
+ }
- public String getDescription( )
- {
- return description;
- }
+ public String getDescription( )
+ {
+ return description;
+ }
- public String getStatus( )
- {
- return status;
- }
- public String getStatusDescription( )
- {
- return statusDescription;
- }
+ public String getStatus( )
+ {
+ return status;
+ }
+ public String getStatusDescription( )
+ {
+ return statusDescription;
+ }
- public String getExpected( )
- {
- return expected;
- }
+ public String getExpected( )
+ {
+ return expected;
+ }
- public String getActual( )
- {
- return actual;
- }
+ public String getActual( )
+ {
+ return actual;
+ }
- public Vector getTestCaseIdVector( )
- {
- return testCaseIdVector;
- }
- public void setTestCaseIdVector( Vector tidVector)
- {
- testCaseIdVector = tidVector;
- }
- public Hashtable getTestCaseHash( )
- {
- return testCaseHash;
- }
- public void setTestCaseHash( Hashtable testCaseHash )
- {
- this.testCaseHash= testCaseHash;
- }
+ public Vector getTestCaseIdVector( )
+ {
+ return testCaseIdVector;
+ }
+ public void setTestCaseIdVector( Vector tidVector)
+ {
+ testCaseIdVector = tidVector;
+ }
+ public Hashtable getTestCaseHash( )
+ {
+ return testCaseHash;
+ }
+ public void setTestCaseHash( Hashtable testCaseHash )
+ {
+ this.testCaseHash= testCaseHash;
+ }
- public void addTestCase( TestCase testCase )
- {
- if ( testCaseHash.put( testCase.getId().trim(), testCase ) != null )
- {
- System.err.println(" Error? Test Case : " + testCase.getId().trim() + " already added. Overwriting the previous test case" );
- }
- testCaseIdVector.addElement( testCase.getId().trim() );
- }
+ public void addTestCase( TestCase testCase )
+ {
+ if ( testCaseHash.put( testCase.getId().trim(), testCase ) != null )
+ {
+ System.err.println(" Error? Test Case : " + testCase.getId().trim() + " already added. Overwriting the previous test case" );
+ }
+ testCaseIdVector.addElement( testCase.getId().trim() );
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reporter/TestCase.java b/appserver/tests/v2-tests/appserv-tests/util/reporter/TestCase.java
index a570861..0260d67 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reporter/TestCase.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reporter/TestCase.java
@@ -17,10 +17,10 @@
package com.sun.ejte.ccl.reporter;
/**
- @Class: TestCase
- @Description: Class holding One TestCase info.
- @Author : Ramesh Mandava
- @Last Modified :Initial creation By Ramesh on 10/24/2001
+ @Class: TestCase
+ @Description: Class holding One TestCase info.
+ @Author : Ramesh Mandava
+ @Last Modified :Initial creation By Ramesh on 10/24/2001
*/
@@ -28,66 +28,66 @@
public class TestCase
{
- private String id;
- private String name;
- private String description;
+ private String id;
+ private String name;
+ private String description;
- private String status;
- private String statusDescription;
+ private String status;
+ private String statusDescription;
- private String expected;
- private String actual;
+ private String expected;
+ private String actual;
- public TestCase( String id, String name, String description )
- {
- this.id = id;
- this.name= name;
- this.description = description;
- this.status = ReporterConstants.DID_NOT_RUN;
- this.statusDescription=ReporterConstants.NA;
- this.expected = null;
+ public TestCase( String id, String name, String description )
+ {
+ this.id = id;
+ this.name= name;
+ this.description = description;
+ this.status = ReporterConstants.DID_NOT_RUN;
+ this.statusDescription=ReporterConstants.NA;
+ this.expected = null;
this.actual= null;
- }
- public TestCase( String id, String name )
- {
- this.id = id;
- this.name= name;
- this.description =ReporterConstants.NA ;
- this.status = ReporterConstants.DID_NOT_RUN;
- this.statusDescription=ReporterConstants.NA;
- this.expected = null;
+ }
+ public TestCase( String id, String name )
+ {
+ this.id = id;
+ this.name= name;
+ this.description =ReporterConstants.NA ;
+ this.status = ReporterConstants.DID_NOT_RUN;
+ this.statusDescription=ReporterConstants.NA;
+ this.expected = null;
this.actual= null;
- }
+ }
- public TestCase( String id )
- {
- this.id = id;
- this.name= ReporterConstants.NA;
- this.description =ReporterConstants.NA ;
- this.status = ReporterConstants.DID_NOT_RUN;
- this.statusDescription=ReporterConstants.NA;
- this.expected = null;
+ public TestCase( String id )
+ {
+ this.id = id;
+ this.name= ReporterConstants.NA;
+ this.description =ReporterConstants.NA ;
+ this.status = ReporterConstants.DID_NOT_RUN;
+ this.statusDescription=ReporterConstants.NA;
+ this.expected = null;
this.actual= null;
- }
+ }
- public void setStatus ( String status )
- {
- this.status = status;
- }
- public void setStatusDescription ( String statusDescription )
- {
- this.statusDescription = statusDescription;
- this.expected = null;
+ public void setStatus ( String status )
+ {
+ this.status = status;
+ }
+ public void setStatusDescription ( String statusDescription )
+ {
+ this.statusDescription = statusDescription;
+ this.expected = null;
this.actual= null;
- }
+ }
- public void setExpected( String expected )
+ public void setExpected( String expected )
{
this.expected = expected;
}
@@ -98,31 +98,31 @@
}
- public String getId( )
- {
- return id;
- }
+ public String getId( )
+ {
+ return id;
+ }
- public String getName( )
- {
- return name;
- }
+ public String getName( )
+ {
+ return name;
+ }
- public String getDescription( )
- {
- return description;
- }
+ public String getDescription( )
+ {
+ return description;
+ }
- public String getStatus( )
- {
- return status;
- }
- public String getStatusDescription( )
- {
- return statusDescription;
- }
+ public String getStatus( )
+ {
+ return status;
+ }
+ public String getStatusDescription( )
+ {
+ return statusDescription;
+ }
- public String getExpected( )
+ public String getExpected( )
{
return expected;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reporter/TestSuite.java b/appserver/tests/v2-tests/appserv-tests/util/reporter/TestSuite.java
index d88bec0..4249dcc 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reporter/TestSuite.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/reporter/TestSuite.java
@@ -17,94 +17,94 @@
package com.sun.ejte.ccl.reporter;
/**
- @Class: TestSuite
- @Description: Class holding One TestSuite info.
- @Author : Ramesh Mandava
- @Last Modified : By Ramesh on 10/24/2001
- @Last Modified : By Ramesh on 1/20/2002 , For preserving order of entry of tests used a separate testIdVector
+ @Class: TestSuite
+ @Description: Class holding One TestSuite info.
+ @Author : Ramesh Mandava
+ @Last Modified : By Ramesh on 10/24/2001
+ @Last Modified : By Ramesh on 1/20/2002 , For preserving order of entry of tests used a separate testIdVector
*/
import java.util.Hashtable;
import java.util.Vector;
-public class TestSuite
+public class TestSuite
{
- private String id;
- private String name;
- private String description;
+ private String id;
+ private String name;
+ private String description;
- Hashtable testHash;
- Vector testIdVector;
+ Hashtable testHash;
+ Vector testIdVector;
- public TestSuite( String id, String name, String description )
- {
- this.id = id;
- this.name= name;
- this.description = description;
- testHash = new Hashtable();
- testIdVector = new Vector();
- }
+ public TestSuite( String id, String name, String description )
+ {
+ this.id = id;
+ this.name= name;
+ this.description = description;
+ testHash = new Hashtable();
+ testIdVector = new Vector();
+ }
- public TestSuite (String id, String name )
- {
- this.id = id;
- this.name = name;
- this.description=ReporterConstants.NA;
- testHash = new Hashtable();
- testIdVector = new Vector();
- }
+ public TestSuite (String id, String name )
+ {
+ this.id = id;
+ this.name = name;
+ this.description=ReporterConstants.NA;
+ testHash = new Hashtable();
+ testIdVector = new Vector();
+ }
- public TestSuite (String id )
- {
- this.id = id;
- this.name = ReporterConstants.NA;
- this.description=ReporterConstants.NA;
- testHash = new Hashtable();
- testIdVector = new Vector();
- }
+ public TestSuite (String id )
+ {
+ this.id = id;
+ this.name = ReporterConstants.NA;
+ this.description=ReporterConstants.NA;
+ testHash = new Hashtable();
+ testIdVector = new Vector();
+ }
- public String getId( )
- {
- return id;
- }
+ public String getId( )
+ {
+ return id;
+ }
- public String getName( )
- {
- return name;
- }
+ public String getName( )
+ {
+ return name;
+ }
- public String getDescription( )
- {
- return description;
- }
+ public String getDescription( )
+ {
+ return description;
+ }
- public Vector getTestIdVector( )
- {
- return testIdVector;
- }
- public void setTestIdVector( Vector tidVector)
- {
- testIdVector= tidVector;
- }
+ public Vector getTestIdVector( )
+ {
+ return testIdVector;
+ }
+ public void setTestIdVector( Vector tidVector)
+ {
+ testIdVector= tidVector;
+ }
- public Hashtable getTestHash( )
- {
- return testHash;
- }
- public void setTestHash( Hashtable testHash )
- {
- this.testHash= testHash;
- }
+ public Hashtable getTestHash( )
+ {
+ return testHash;
+ }
+ public void setTestHash( Hashtable testHash )
+ {
+ this.testHash= testHash;
+ }
- public void addTest( Test myTest )
- {
- if ( testHash.put( myTest.getId().trim(), myTest) != null )
- {
- System.err.println("Error : Test was added before only. Still allowing. Old value of the test will be overridden" );
- }
-
- testIdVector.addElement( myTest.getId().trim() );
- }
+ public void addTest( Test myTest )
+ {
+ if ( testHash.put( myTest.getId().trim(), myTest) != null )
+ {
+ System.err.println("Error : Test was added before only. Still allowing. Old value of the test will be overridden" );
+ }
+
+ testIdVector.addElement( myTest.getId().trim() );
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reporter/build.properties b/appserver/tests/v2-tests/appserv-tests/util/reporter/build.properties
index c9cdeec..41cb727 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reporter/build.properties
+++ b/appserver/tests/v2-tests/appserv-tests/util/reporter/build.properties
@@ -15,7 +15,7 @@
SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
-->
-
+
<property environment="myenv" />
<property name="javapath" value="${myenv.JAVA_HOME}/lib/dt.jar:$(myenv.JAVA_HOME)/lib/tools.jar:${myenv.S1AS_HOME}/modules/jakarta.ejb.jar"/>
diff --git a/appserver/tests/v2-tests/appserv-tests/util/reporter/build.xml b/appserver/tests/v2-tests/appserv-tests/util/reporter/build.xml
index d7444bb..fdb7251 100755
--- a/appserver/tests/v2-tests/appserv-tests/util/reporter/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/util/reporter/build.xml
@@ -25,28 +25,28 @@
&setup-props;
<target name="all" depends="clean,init,jar"/>
-
+
<target name="init">
<tstamp/>
<mkdir dir="${build.dest}"/>
-
+
</target>
-
-
+
+
<target name="build" depends="init">
<javac
- destdir="${build.dest}"
- classpath="${classpath}"
+ destdir="${build.dest}"
+ classpath="${classpath}"
srcdir="${basedir}"
debug="on"
/>
-
+
</target>
-
-
+
+
<target name="jar" depends="build">
<jar destfile="${reporter.jar}">
- <fileset dir="${build.dest}"/>
+ <fileset dir="${build.dest}"/>
</jar>
</target>
@@ -55,7 +55,7 @@
<arg line="cvf ${reporter.jar} -C ${build.dest} ." />
</exec>
-->
-
+
<target name="clean">
<delete dir="${build.dest}"/>
</target>
@@ -66,6 +66,6 @@
<echo message="ant jar will compile and put reporter.jar at $APS_HOME/lib"/>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/util/results/ResultsProducer.java b/appserver/tests/v2-tests/appserv-tests/util/results/ResultsProducer.java
index 2537452..11e9b52 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/results/ResultsProducer.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/results/ResultsProducer.java
@@ -44,7 +44,7 @@
System.err.println("Usage: java ResultProducer file");
return;
}
-
+
FileOutputStream outputStream = new FileOutputStream(args[2]);
FileChannel channel = outputStream.getChannel();
CharBuffer buffer = CharBuffer.allocate(8192);
@@ -56,7 +56,7 @@
int pass = 0;
int fail = 0;
while( tokens.hasMoreElements() ){
- token = tokens.nextToken();
+ token = tokens.nextToken();
compile(token);
count = countOccurance(charBuffer);
@@ -67,8 +67,8 @@
} else {
fail = count;
}
- }
- buffer.put("DID NOT RUN= "
+ }
+ buffer.put("DID NOT RUN= "
+ (new Integer(args[1]).intValue() - (pass + fail))+ "\n");
buffer.put("------------ =========\n");
buffer.put("Total Expected=" + args[1]);
@@ -86,7 +86,7 @@
ex.printStackTrace();
}
}
-
+
private static void compile(String pat) {
try {
@@ -100,10 +100,10 @@
private static int countOccurance(CharBuffer cb) {
Matcher lm = linePattern.matcher(cb);
- Matcher pm = null;
+ Matcher pm = null;
int count = 0;
while (lm.find()) {
- CharSequence cs = lm.group();
+ CharSequence cs = lm.group();
if (pm == null)
pm = pattern.matcher(cs);
else
@@ -118,7 +118,7 @@
return count;
}
-
+
private static CharBuffer loadFile(File f) throws IOException {
FileInputStream fis = new FileInputStream(f);
FileChannel fc = fis.getChannel();
diff --git a/appserver/tests/v2-tests/appserv-tests/util/webrunner/build.xml b/appserver/tests/v2-tests/appserv-tests/util/webrunner/build.xml
index 0c43362..0a1da2c 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/webrunner/build.xml
+++ b/appserver/tests/v2-tests/appserv-tests/util/webrunner/build.xml
@@ -24,7 +24,7 @@
<project name="webrunner" basedir="." default="jar">
&setup-props;
-
+
<property name="proxy.src" value="proxy"/>
<property environment="myenv" />
<property name="webtest.src" value="webtest"/>
@@ -33,48 +33,48 @@
<property name="build.dest" value="build"/>
<property name="java.classpath" value="${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar:${build.dest}:${myenv.APS_HOME}/lib/reporter.jar"/>
<property name="server.host" value="dsingh"/>
-
+
<target name="all" depends="compile-webtest,run-webtest">
<!-- WRITEME -->
</target>
-
-
+
+
<target name="compile-proxy" depends="init-common">
<!-- Compile the java code from ${src} into ${build} -->
<echo message="Compiling Proxy Server source files (${name}) ..."/>
<mkdir dir="${build.dest}"/>
<javac
- srcdir="${proxy.src}"
- destdir="${build.dest}"
- classpath="${java.classpath}"
+ srcdir="${proxy.src}"
+ destdir="${build.dest}"
+ classpath="${java.classpath}"
debug="on"
-
+
/>
</target>
-
+
<target name="compile-webtest" depends="init-common">
<!-- Compile the java code from ${src} into ${build} -->
<echo message="Compiling Proxy Server source files (${name}) ..."/>
<mkdir dir="${build.dest}"/>
<javac
- srcdir="${webtest.src}"
- destdir="${build.dest}"
- classpath="${java.classpath}"
+ srcdir="${webtest.src}"
+ destdir="${build.dest}"
+ classpath="${java.classpath}"
debug="on"
-
+
/>
</target>
-
+
<target name="compile-tomcattest" depends="init-common">
<!-- Compile the java code from ${src} into ${build} -->
<echo message="Compiling Tomcat test util source files ..."/>
<mkdir dir="${build.dest}"/>
<javac
- srcdir="${tomcattest.src}"
- destdir="${build.dest}"
- classpath="${java.classpath}"
+ srcdir="${tomcattest.src}"
+ destdir="${build.dest}"
+ classpath="${java.classpath}"
debug="on"
-
+
/>
</target>
@@ -83,11 +83,11 @@
<echo message="Compiling Grizzly test source files (${name}) ..."/>
<mkdir dir="${build.dest}"/>
<javac
- srcdir="${http2test.src}"
- destdir="${build.dest}"
- classpath="${java.classpath}:${myenv.S1AS_HOME}/modules/nucleus-grizzly-all.jar"
+ srcdir="${http2test.src}"
+ destdir="${build.dest}"
+ classpath="${java.classpath}:${myenv.S1AS_HOME}/modules/nucleus-grizzly-all.jar"
debug="on"
-
+
/>
</target>
@@ -96,34 +96,34 @@
<!-- Compile the java code from ${src} into ${build} -->
<echo message="Running Web Test"/>
<java
- fork="on"
- classpath="${java.classpath}:${build.dest}"
- classname="com.sun.ejte.ccl.webrunner.webtest.WebTest">
+ fork="on"
+ classpath="${java.classpath}:${build.dest}"
+ classname="com.sun.ejte.ccl.webrunner.webtest.WebTest">
<arg value="script.txt"/>
<arg value="${server.host}"/>
-
+
</java>
</target>
-
+
<target name="run-proxy" depends="compile-proxy">
<!-- Compile the java code from ${src} into ${build} -->
<echo message="Starting webserver at port 1235"/>
<java
- fork="on"
- classpath="${java.classpath}:${build.dest}"
- classname="com.sun.ejte.ccl.webrunner.proxy.httpd">
-
-
+ fork="on"
+ classpath="${java.classpath}:${build.dest}"
+ classname="com.sun.ejte.ccl.webrunner.proxy.httpd">
+
+
</java>
</target>
-
+
<target name="clean" depends="init-common">
<delete dir="${build.dest}"/>
</target>
<target name="jar" depends="compile-proxy,compile-webtest,compile-tomcattest,compile-http2test">
<jar destfile="${myenv.APS_HOME}/lib/webtest.jar">
- <fileset dir="${build.dest}"/>
+ <fileset dir="${build.dest}"/>
</jar>
</target>
@@ -138,5 +138,5 @@
</echo>
</target>
-
+
</project>
diff --git a/appserver/tests/v2-tests/appserv-tests/util/webrunner/http2test/org/glassfish/grizzly/test/http2/HttpClient.java b/appserver/tests/v2-tests/appserv-tests/util/webrunner/http2test/org/glassfish/grizzly/test/http2/HttpClient.java
index 56f650c..1bc0054 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/webrunner/http2test/org/glassfish/grizzly/test/http2/HttpClient.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/webrunner/http2test/org/glassfish/grizzly/test/http2/HttpClient.java
@@ -72,7 +72,7 @@
private HttpClient() {
}
-
+
private void setHost(String host) {
this.host = host;
}
@@ -101,7 +101,7 @@
final FilterChainBuilder filterChainBuilder =
createClientFilterChainAsBuilder(secure);
filterChainBuilder.add(new ClientAggregatorFilter(resultQueue));
-
+
final TCPNIOTransport clientTransport = TCPNIOTransportBuilder.newInstance().build();
final FilterChain clientFilterChain = filterChainBuilder.build();
clientTransport.setProcessor(clientFilterChain);
@@ -141,16 +141,16 @@
private FilterChainBuilder createClientFilterChainAsBuilder(
final boolean isSecure,
final Filter... clientFilters) throws MalformedURLException {
-
+
final FilterChainBuilder builder = FilterChainBuilder.stateless()
.add(new TransportFilter());
if (isSecure) {
builder.add(new SSLFilter(null, getClientSSLEngineConfigurator()));
}
-
+
builder.add(new HttpClientFilter());
builder.add(new Http2ClientFilter(Http2Configuration.builder().build()));
-
+
if (clientFilters != null) {
for (Filter clientFilter : clientFilters) {
if (clientFilter != null) {
@@ -158,7 +158,7 @@
}
}
}
-
+
return builder;
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/HttpResponse.java b/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/HttpResponse.java
index 4b5df9a..73afc33 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/HttpResponse.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/HttpResponse.java
@@ -20,69 +20,69 @@
/*
*
-* This class is a wrapper around everything associated with a reply from an HTTP server.This is used by
+* This class is a wrapper around everything associated with a reply from an HTTP server.This is used by
*the proxy part of htppd class.
*
*/
public class HttpResponse
{
- int statusCode;
- String reasonPhrase;
- MimeHeader mh;
- static String CRLF="\r\n";
-
- /*
+ int statusCode;
+ String reasonPhrase;
+ MimeHeader mh;
+ static String CRLF="\r\n";
+
+ /*
*When a request is sent to HTTP server, it responds with a status code, which is stored in statusCode,
*and a textual equivalent,which is stored in reasonPhrase.This single line response is followed by a MIME header.MimeHeader class is used
*to parse this string.This method is called by constructor of HttpResponse.
- * @author Deepa Singh(deepa.singh@sun.com)
+ * @author Deepa Singh(deepa.singh@sun.com)
*@Company Sun Microsystems Inc.
- @param request String request
- */
- public void parse(String request)
- {
- int fsp=request.indexOf(' ');
- int nsp=request.indexOf(' ',fsp+1);
- int eol=request.indexOf('\n');
- String protocol=request.substring(0,fsp);
- statusCode=Integer.parseInt(request.substring(fsp+1,nsp));
- reasonPhrase=request.substring(nsp+1,eol);
- String raw_mime_header=request.substring(eol+1);
- mh=new MimeHeader(raw_mime_header);
- }
+ @param request String request
+ */
+ public void parse(String request)
+ {
+ int fsp=request.indexOf(' ');
+ int nsp=request.indexOf(' ',fsp+1);
+ int eol=request.indexOf('\n');
+ String protocol=request.substring(0,fsp);
+ statusCode=Integer.parseInt(request.substring(fsp+1,nsp));
+ reasonPhrase=request.substring(nsp+1,eol);
+ String raw_mime_header=request.substring(eol+1);
+ mh=new MimeHeader(raw_mime_header);
+ }
- /**
- * Default Constructor.Takes a raw request as parameter and calls parse to create MimeHeader.
- * @author Deepa Singh(deepa.singh@sun.com)
- *
- */
- HttpResponse(String request)
- {
- parse(request);
- }
+ /**
+ * Default Constructor.Takes a raw request as parameter and calls parse to create MimeHeader.
+ * @author Deepa Singh(deepa.singh@sun.com)
+ *
+ */
+ HttpResponse(String request)
+ {
+ parse(request);
+ }
- /**
- * Constructor with three parameters
- * @author Deepa Singh(deepa.singh@sun.com)
- *
- * @param code Integer
- * @param reason The reason String
- * @param m Mimeheader
- */
- HttpResponse(int code,String reason,MimeHeader m)
- {
- statusCode=code;
- reasonPhrase=reason;
- mh=m;
- }
-
- /**
- *
- * @author Deepa Singh(deepa.singh@sun.com)
- * @return String
- */
- public String toString()
- {
- return "HTTP/1.0 "+ statusCode +" " + reasonPhrase + CRLF + mh + CRLF;
+ /**
+ * Constructor with three parameters
+ * @author Deepa Singh(deepa.singh@sun.com)
+ *
+ * @param code Integer
+ * @param reason The reason String
+ * @param m Mimeheader
+ */
+ HttpResponse(int code,String reason,MimeHeader m)
+ {
+ statusCode=code;
+ reasonPhrase=reason;
+ mh=m;
+ }
+
+ /**
+ *
+ * @author Deepa Singh(deepa.singh@sun.com)
+ * @return String
+ */
+ public String toString()
+ {
+ return "HTTP/1.0 "+ statusCode +" " + reasonPhrase + CRLF + mh + CRLF;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/LogMessage.java b/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/LogMessage.java
index 3bca165..4f905dc 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/LogMessage.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/LogMessage.java
@@ -23,5 +23,5 @@
*
*/
public interface LogMessage{
- public void log(String msg);
+ public void log(String msg);
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/MimeHeader.java b/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/MimeHeader.java
index 9527a87..0b77f08 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/MimeHeader.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/MimeHeader.java
@@ -22,114 +22,114 @@
* MIME is an internet standard for communicating multimedia content over e-mail systems.MimeHeader extends HashTable so that it can store key value pairs.
* @author Deepa Singh(deepa.singh@sun.com)
*Company: Sun Microsystems Inc
-*
+*
*/
public class MimeHeader extends Hashtable
{
- /**
- * Takes a String as a parameter and parses it.Takes a raw MIME-formatted String and enter its key/value pairs into a given instance of MimeHeader.Uses
+ /**
+ * Takes a String as a parameter and parses it.Takes a raw MIME-formatted String and enter its key/value pairs into a given instance of MimeHeader.Uses
*StringTokenizer to split the input data into individual lines marked by CRLF(\r\n) sequence.
- * @author Deepa Singh(deepa.singh@sun.com)
- * @return void
- * @param data The string to be parsed
- */
- void parse(String data)
- {
- StringTokenizer st=new StringTokenizer(data,"\r\n");
- while(st.hasMoreTokens())
- {
- String s=st.nextToken();
- int colon=s.indexOf(':');
- String key=s.substring(0,colon);
- String val=s.substring(colon+2);
- put(key,val);
- }
- }
-
- /**
- * Default Constructor
+ * @author Deepa Singh(deepa.singh@sun.com)
+ * @return void
+ * @param data The string to be parsed
+ */
+ void parse(String data)
+ {
+ StringTokenizer st=new StringTokenizer(data,"\r\n");
+ while(st.hasMoreTokens())
+ {
+ String s=st.nextToken();
+ int colon=s.indexOf(':');
+ String key=s.substring(0,colon);
+ String val=s.substring(colon+2);
+ put(key,val);
+ }
+ }
+
+ /**
+ * Default Constructor
*Class is a subclass of HashTable so that it can conveneintly store and retreive the key/value pairs
*associated with a MIME header.It creates a blank MimeHeader with no keys.
- * @author Deepa Singh(deepa.singh@sun.com)
- *
- * @param None
- */
- MimeHeader(){}
-
- /**
- * This constructor takes strng formatted as MIME header and parses it for the initial contents of the objects.
- * @author Deepa Singh(deepa.singh@sun.com)
- *
- * @param d The string to be parsed
- */
- MimeHeader(String d)
- {
- parse(d);
- }
-
- /**
- * Converts to String .It takes current key/value pairs stored in the MimeHeader and returns a string representation of them in
+ * @author Deepa Singh(deepa.singh@sun.com)
+ *
+ * @param None
+ */
+ MimeHeader(){}
+
+ /**
+ * This constructor takes strng formatted as MIME header and parses it for the initial contents of the objects.
+ * @author Deepa Singh(deepa.singh@sun.com)
+ *
+ * @param d The string to be parsed
+ */
+ MimeHeader(String d)
+ {
+ parse(d);
+ }
+
+ /**
+ * Converts to String .It takes current key/value pairs stored in the MimeHeader and returns a string representation of them in
*MIME format, where keys are printed followed by colon and a space, and then value followed by CRLF.
- * @author Deepa Singh(deepa.singh@sun.com)
- * @return String
- */
- public String toString()
- {
- String ret="";
- Enumeration e=keys();
- while(e.hasMoreElements())
- {
- String key=(String)e.nextElement();
- String val=(String)get(key);
- ret+=key + ": " + val + "\r\n";
- }
- return ret;
- }
+ * @author Deepa Singh(deepa.singh@sun.com)
+ * @return String
+ */
+ public String toString()
+ {
+ String ret="";
+ Enumeration e=keys();
+ while(e.hasMoreElements())
+ {
+ String key=(String)e.nextElement();
+ String val=(String)get(key);
+ ret+=key + ": " + val + "\r\n";
+ }
+ return ret;
+ }
- /**
- *To remove the discrepancy in MIME specification for "Content-Type" and "content-type" and "Content-Length" to "content-length"
- *To avoid problems, all incoming and outgoing MimeHeader keys are converted to canonical form.
- * @author Deepa Singh(deepa.singh@sun.com)
- * @return String
- * @param ms String to be operated upon
- */
- private String fix(String ms)
- {
- char chars[]=ms.toLowerCase().toCharArray();
- boolean upcaseNext=true;
- for(int i=0;i<chars.length-1;i++)
- {
- char ch=chars[i];
- if(upcaseNext && 'a' <=ch && ch <='z')
- {
- chars[i]=(char)(ch-('a'-'A'));
- }
- upcaseNext=ch=='-';
- }
- return new String(chars);
- }
+ /**
+ *To remove the discrepancy in MIME specification for "Content-Type" and "content-type" and "Content-Length" to "content-length"
+ *To avoid problems, all incoming and outgoing MimeHeader keys are converted to canonical form.
+ * @author Deepa Singh(deepa.singh@sun.com)
+ * @return String
+ * @param ms String to be operated upon
+ */
+ private String fix(String ms)
+ {
+ char chars[]=ms.toLowerCase().toCharArray();
+ boolean upcaseNext=true;
+ for(int i=0;i<chars.length-1;i++)
+ {
+ char ch=chars[i];
+ if(upcaseNext && 'a' <=ch && ch <='z')
+ {
+ chars[i]=(char)(ch-('a'-'A'));
+ }
+ upcaseNext=ch=='-';
+ }
+ return new String(chars);
+ }
- /**
- * @author Deepa Singh(deepa.singh@sun.com)
- * @return String
- * @param key String to be fetched
- */
- public String get(String key)
- {
- return (String)super.get(fix(key));
- }
+ /**
+ * @author Deepa Singh(deepa.singh@sun.com)
+ * @return String
+ * @param key String to be fetched
+ */
+ public String get(String key)
+ {
+ return (String)super.get(fix(key));
+ }
- /**
- *
- * @author Deepa Singh(deepa.singh@sun.com)
- * @return void
- * @param key The Key String
- * @param val The value String
- */
- public void put(String key,String val)
- {
- super.put(fix(key),val);
- }
-
-
+ /**
+ *
+ * @author Deepa Singh(deepa.singh@sun.com)
+ * @return void
+ * @param key The Key String
+ * @param val The value String
+ */
+ public void put(String key,String val)
+ {
+ super.put(fix(key),val);
+ }
+
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/TempStore.java b/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/TempStore.java
index d2d4ec0..46a9e84 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/TempStore.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/TempStore.java
@@ -19,67 +19,67 @@
import java.io.*;
- /**
- * This class is for copying array of bytes.
- * @author Deepa Singh(deepa.singh@sun.com)
+ /**
+ * This class is for copying array of bytes.
+ * @author Deepa Singh(deepa.singh@sun.com)
*Company: Sun Microsystems Inc
- *
- *
- */
+ *
+ *
+ */
public class TempStore
{
- String url;
- MimeHeader mh;
- byte data[];
- int length=0;
+ String url;
+ MimeHeader mh;
+ byte data[];
+ int length=0;
- /**
- * Constructor that Takes two Stringa as parameter
- * @author Deepa Singh(deepa.singh@sun.com)
- *
- * @param u The string URL
- * @param m mimeheader
- */
- public TempStore(String u,MimeHeader m)
- {
- url=u;
- mh=m;
- String cl=mh.get((String)"Content-Length");
- if(cl!=null)
- {
- data=new byte[Integer.parseInt(cl)];
- }
- }
+ /**
+ * Constructor that Takes two Stringa as parameter
+ * @author Deepa Singh(deepa.singh@sun.com)
+ *
+ * @param u The string URL
+ * @param m mimeheader
+ */
+ public TempStore(String u,MimeHeader m)
+ {
+ url=u;
+ mh=m;
+ String cl=mh.get((String)"Content-Length");
+ if(cl!=null)
+ {
+ data=new byte[Integer.parseInt(cl)];
+ }
+ }
- /**
- *
- * @author Deepa Singh(deepa.singh@sun.com)
- *
- * @param d[] Byte array
- * @param n Integer
- */
- void append(byte d[],int n)
- {
- if(data==null)
- {
- data=new byte[n];
- System.arraycopy(d,0,data,0,n);
- length+=n;
- } else if(length+n>data.length)
- {
- byte old[]=data;
- data=new byte[old.length+n];
- System.arraycopy(old,0,data,0,old.length);
- System.arraycopy(d,0,data,old.length,n);
- length+=n;
- }else
- {
- System.arraycopy(d,0,data,length,n);
- length+=n;
- }
- }
+ /**
+ *
+ * @author Deepa Singh(deepa.singh@sun.com)
+ *
+ * @param d[] Byte array
+ * @param n Integer
+ */
+ void append(byte d[],int n)
+ {
+ if(data==null)
+ {
+ data=new byte[n];
+ System.arraycopy(d,0,data,0,n);
+ length+=n;
+ } else if(length+n>data.length)
+ {
+ byte old[]=data;
+ data=new byte[old.length+n];
+ System.arraycopy(old,0,data,0,old.length);
+ System.arraycopy(d,0,data,old.length,n);
+ length+=n;
+ }else
+ {
+ System.arraycopy(d,0,data,length,n);
+ length+=n;
+ }
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/httpd.java b/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/httpd.java
index edfa75d..f266d0a 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/httpd.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/webrunner/proxy/httpd.java
@@ -47,8 +47,8 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @param s The string to be converted
- * @return byte[]
+ * @param s The string to be converted
+ * @return byte[]
*/
private final byte[] toBytes(String s)
{
@@ -61,9 +61,9 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @param out The output stream
- * @param s The string
- * @return void
+ * @param out The output stream
+ * @param s The string
+ * @return void
*/
private void writeString(OutputStream out,String s)
throws IOException
@@ -75,10 +75,10 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @param in The InputStream
- * @param url The string URL
- * @param mh Mimeheader
- * @return TempStore
+ * @param in The InputStream
+ * @param url The string URL
+ * @param mh Mimeheader
+ * @return TempStore
*/
private TempStore loadFile(InputStream in,String url,MimeHeader mh)
throws IOException
@@ -104,11 +104,11 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @param cmd String
- * @param url The string URL
- * @param code integer
+ * @param cmd String
+ * @param url The string URL
+ * @param code integer
* @param size Integer
- * @return void
+ * @return void
*/
private void logEntry(String cmd,String url,int code,int size)
{
@@ -124,10 +124,10 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @param in The InputStream
- * @param url The string URL
- * @param mh Mimeheader
- * @return TempStore
+ * @param in The InputStream
+ * @param url The string URL
+ * @param mh Mimeheader
+ * @return TempStore
*/
private String getRawRequest(InputStream in)
throws IOException
@@ -169,28 +169,28 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @param out The OutputStream
- * @param url The string URL
- * @param inmh Mimeheader
- * @param in The input stream
- * @return void
+ * @param out The OutputStream
+ * @param url The string URL
+ * @param inmh Mimeheader
+ * @param in The input stream
+ * @return void
*/
private void handleProxy(OutputStream out,String url,MimeHeader inmh,InputStream in) {
try {
int start=url.indexOf("://") +3;
-
+
int path=url.indexOf('/',start);
-
+
String site=url.substring(start,path).toLowerCase();
-
+
String server_url=url.substring(path);
-
+
int colon=site.indexOf(':');
if(colon > 0) {
port=Integer.parseInt(site.substring(colon+1));
site=site.substring(0,colon);
}
-
+
FileOutputStream fileout=new FileOutputStream("script.txt",true);
//System.out.print("\n Server at port" + port + "\n");
Socket server=new Socket(site,port);
@@ -203,13 +203,13 @@
byte postbuf[]=new byte[content_length];
for (i =0; i < content_length; i++)
postbuf[i]=(byte)in.read();
-
+
String postdata=new String(postbuf,0,i);
// System.out.print("\n POST data without mime header is " + postdata + "\n");
-
+
String post="POST" + " " + server_url+ " " + "HTTP/1.0" + CRLF + inmh
+ CRLF + postdata+ CRLF+CRLF;
-
+
System.out.print("\nPOST request sent is " + post);
byte filebuf[]=post.getBytes();
for( i=0;i<filebuf.length;i++)
@@ -225,7 +225,7 @@
first=System.currentTimeMillis();
writeString(server_out,post);
-
+
String raw_request=getRawRequest(server_in);
System.out.print("\n Server Response Header is--------------------------\n " + raw_request + "\n");
@@ -233,24 +233,24 @@
writeString(out,server_response.toString());
end=System.currentTimeMillis();
//System.out.print("\n Server Response Header is--------------------------\n " + server_response.statusCode + "\n");
-
+
if(server_response.statusCode==200) {
-
+
TempStore uce=loadFile(server_in,url,server_response.mh);
out.write(uce.data,0,uce.length);
-
+
/* byte filebuf[]=post.getBytes();
for( i=0;i<filebuf.length;i++)
fileout.write(filebuf[i]);
-
-
+
+
String token="!"+"\n"+"!";
byte tokenbytes[]=token.getBytes();
for(i=0;i<tokenbytes.length;i++)
fileout.write(tokenbytes[i]);
-
+
fileout.close();*/
-
+
logEntry("POST",site + server_url,200,uce.length);
}
else if(server_response.statusCode==302 || server_response.statusCode==307) {
@@ -274,59 +274,59 @@
// System.out.println("Chking redirected request response code"+"*******************");
TempStore uce1=loadFile(re_in,Host,re_response.mh);
out.write(uce1.data,0,uce1.length);
-
+
logEntry("GET",Host,200,uce1.length);
-
+
/*byte filebuf[]=redirectreq.getBytes();
for( i=0;i<filebuf.length;i++)
fileout.write(filebuf[i]);
-
+
String token="!"+"\n"+"!";
byte tokenbytes[]=token.getBytes();
for(i=0;i<tokenbytes.length;i++)
fileout.write(tokenbytes[i]);
-
+
fileout.close();*/
}
}
else if (server_response.statusCode==304) {
System.out.println("*************304 status code************************");
-
+
}
}
else {
String req=methodSupported + " " + server_url + " " +"HTTP/1.0" + CRLF + inmh + CRLF + CRLF;
-
+
System.out.print("\n Request string sent to server\n" + req );
byte filebuf2[]=req.getBytes();
for(int i=0;i<filebuf2.length;i++)
fileout.write(filebuf2[i]);
-
+
String newtoken="!"+"\n"+"!";
byte tokenbytes1[]=newtoken.getBytes();
-
+
for(int i=0;i<tokenbytes1.length;i++)
fileout.write(tokenbytes1[i]);
-
+
fileout.close();
-
+
writeString(server_out,req);
String raw_request=getRawRequest(server_in);
System.out.print("\n Server Response is " + raw_request + "\n");
HttpResponse server_response=new HttpResponse(raw_request);
writeString(out,server_response.toString());
//System.out.print("\n Server Response is " + server_response.statusCode + "\n");
-
+
if(server_response.statusCode==200) {
TempStore uce=loadFile(server_in,url,server_response.mh);
out.write(uce.data,0,uce.length);
}
-
+
if(server_response.statusCode==302 || server_response.statusCode==307) {
//System.out.println("******Inside Redirection*********");
String Host=server_response.mh.get("Location");
//System.out.println("New host is"+Host);
-
+
URL newurl=new URL(Host);
String actualhost=newurl.getHost();
Socket serversocket=new Socket(actualhost,80);
@@ -352,12 +352,12 @@
byte filebuf[]=redirectreq.getBytes();
for(int i=0;i<filebuf.length;i++)
fileout.write(filebuf[i]);
-
+
String token="!"+"\n"+"!";
byte tokenbytes[]=token.getBytes();
for(int i=0;i<tokenbytes.length;i++)
fileout.write(tokenbytes[i]);
-
+
fileout.close();
}
}
@@ -365,9 +365,9 @@
System.out.println("*******************************304 status code****************************");
}
}
-
+
server_out.close();
-
+
}
catch(IOException e) {
log.log("Exception" + e);
@@ -386,9 +386,9 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @param s Socket
- * @return void
- * @throws IOException
+ * @param s Socket
+ * @return void
+ * @throws IOException
*/
private void doRequest(Socket s) throws IOException
{
@@ -430,7 +430,7 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @return void
+ * @return void
*
*/
public void run()
@@ -465,7 +465,7 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @return void
+ * @return void
*
*/
public synchronized void start()
@@ -483,7 +483,7 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @return void
+ * @return void
*
*/
public synchronized void stop()
@@ -498,7 +498,7 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @return void
+ * @return void
*
*/
public httpd(int p, LogMessage lm)
@@ -513,7 +513,7 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @return void
+ * @return void
*
*/
public static void main(String args[])
@@ -536,7 +536,7 @@
*
* @author Deepa Singh(deepa.singh@sun.com)
*
- * @return void
+ * @return void
*
*/
public void log(String m)
diff --git a/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/HttpResponse.java b/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/HttpResponse.java
index 9baa6ec..5fc2a6b 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/HttpResponse.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/HttpResponse.java
@@ -18,37 +18,37 @@
public class HttpResponse
{
- int statusCode;
- String reasonPhrase;
- MimeHeader mh;
- static String CRLF="\r\n";
+ int statusCode;
+ String reasonPhrase;
+ MimeHeader mh;
+ static String CRLF="\r\n";
- void parse(String request)
- {
- int fsp=request.indexOf(' ');
- int nsp=request.indexOf(' ',fsp+1);
- int eol=request.indexOf('\n');
- String protocol=request.substring(0,fsp);
- statusCode=Integer.parseInt(request.substring(fsp+1,nsp));
- reasonPhrase=request.substring(nsp+1,eol);
- String raw_mime_header=request.substring(eol+1);
- mh=new MimeHeader(raw_mime_header);
- }
+ void parse(String request)
+ {
+ int fsp=request.indexOf(' ');
+ int nsp=request.indexOf(' ',fsp+1);
+ int eol=request.indexOf('\n');
+ String protocol=request.substring(0,fsp);
+ statusCode=Integer.parseInt(request.substring(fsp+1,nsp));
+ reasonPhrase=request.substring(nsp+1,eol);
+ String raw_mime_header=request.substring(eol+1);
+ mh=new MimeHeader(raw_mime_header);
+ }
- HttpResponse(String request)
- {
- parse(request);
- }
+ HttpResponse(String request)
+ {
+ parse(request);
+ }
- HttpResponse(int code,String reason,MimeHeader m)
- {
- statusCode=code;
- reasonPhrase=reason;
- mh=m;
- }
+ HttpResponse(int code,String reason,MimeHeader m)
+ {
+ statusCode=code;
+ reasonPhrase=reason;
+ mh=m;
+ }
- public String toString()
- {
- return "HTTP/1.0 "+ statusCode +" " + reasonPhrase + CRLF + mh + CRLF;
+ public String toString()
+ {
+ return "HTTP/1.0 "+ statusCode +" " + reasonPhrase + CRLF + mh + CRLF;
}
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/MimeHeader.java b/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/MimeHeader.java
index 4d42757..c65dbba 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/MimeHeader.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/MimeHeader.java
@@ -25,7 +25,7 @@
* @author Deepa Singh(deepa.singh@sun.com)
*Company: Sun Microsystems Inc
*@see com.sun.ejte.ccl.webrunner.proxy.MimeHeader
-*
+*
*/
public class MimeHeader extends Hashtable
@@ -35,8 +35,8 @@
private boolean requestPOST=false;
private boolean cookieSet=false;
private String postdata=new String();
-
-
+
+
/**
* Takes a String as a parameter and parses it.Takes a raw MIME-formatted String and enter its key/value pairs into a given instance of MimeHeader.Uses
*StringTokenizer to split the input data into individual lines marked by CRLF(\r\n) sequence.
@@ -44,16 +44,16 @@
*If it is POST then stores the post data to be sent to external web server.
* @author Deepa Singh(deepa.singh@sun.com)
* @return void
- * @param data The string to be parsed
+ * @param data The string to be parsed
**@see com.sun.ejte.ccl.webrunner.proxy.MimeHeader
*/
void parse(String data)
{
- StringTokenizer st=new StringTokenizer(data,"\r\n");
- while(st.hasMoreTokens())
- {
+ StringTokenizer st=new StringTokenizer(data,"\r\n");
+ while(st.hasMoreTokens())
+ {
String s=st.nextToken();
-
+
//first check for Cookie as they are contained in script file.This needs to be stripped from the new request string sent to server
if(s.startsWith("Cookie"))
{
@@ -92,10 +92,10 @@
else if((RequestHeader.indexOf("POST"))!=-1)
requestPOST=true;
}
- }
+ }
}
- MimeHeader(){}
+ MimeHeader(){}
public boolean ifGETRequest()
{
return this.requestGET;
@@ -108,78 +108,78 @@
{
return this.RequestHeader;
}
- MimeHeader(String d)
- {
- parse(d);
- }
+ MimeHeader(String d)
+ {
+ parse(d);
+ }
- public String toString()
- {
- String ret="";
- Enumeration e=keys();
- while(e.hasMoreElements())
- {
- String key=(String)e.nextElement();
- String val=(String)get(key);
- ret+=key + ": " + val + "\r\n";
- }
- return ret;
- }
-
+ public String toString()
+ {
+ String ret="";
+ Enumeration e=keys();
+ while(e.hasMoreElements())
+ {
+ String key=(String)e.nextElement();
+ String val=(String)get(key);
+ ret+=key + ": " + val + "\r\n";
+ }
+ return ret;
+ }
+
public String getPostData()
{
return postdata.trim();
-
+
}
-
- /**
- *To remove the discrepancy in MIME specification for "Content-Type" and "content-type" and "Content-Length" to "content-length"
- *To avoid problems, all incoming and outgoing MimeHeader keys are converted to canonical form.
- * @author Deepa Singh(deepa.singh@sun.com)
- * @return String
- * @param ms String to be operated upon
- */
+
+ /**
+ *To remove the discrepancy in MIME specification for "Content-Type" and "content-type" and "Content-Length" to "content-length"
+ *To avoid problems, all incoming and outgoing MimeHeader keys are converted to canonical form.
+ * @author Deepa Singh(deepa.singh@sun.com)
+ * @return String
+ * @param ms String to be operated upon
+ */
private String fix(String ms)
- {
- char chars[]=ms.toLowerCase().toCharArray();
- boolean upcaseNext=true;
- for(int i=0;i<chars.length-1;i++)
- {
- char ch=chars[i];
- if(upcaseNext && 'a' <=ch && ch <='z')
- {
- chars[i]=(char)(ch-('a'-'A'));
- }
- upcaseNext=ch=='-';
- }
- return new String(chars);
- }
+ {
+ char chars[]=ms.toLowerCase().toCharArray();
+ boolean upcaseNext=true;
+ for(int i=0;i<chars.length-1;i++)
+ {
+ char ch=chars[i];
+ if(upcaseNext && 'a' <=ch && ch <='z')
+ {
+ chars[i]=(char)(ch-('a'-'A'));
+ }
+ upcaseNext=ch=='-';
+ }
+ return new String(chars);
+ }
- /*
+ /*
* @author Deepa Singh(deepa.singh@sun.com)
* @return String
- * @param String key MIME header e.g Content-Type
-
+ * @param String key MIME header e.g Content-Type
+
**@see com.sun.ejte.ccl.webrunner.proxy.MimeHeader
*/
public String get(String key)
- {
- return (String)super.get(fix(key));
- }
+ {
+ return (String)super.get(fix(key));
+ }
-
+
/*
* @author Deepa Singh(deepa.singh@sun.com)
* @return void
- * @param String key MIME header e.g Content-Type
+ * @param String key MIME header e.g Content-Type
*@param String value value of MIME header
**@see com.sun.ejte.ccl.webrunner.proxy.MimeHeader
*/
public void put(String key,String val)
- {
- super.put(fix(key),val);
- }
+ {
+ super.put(fix(key),val);
+ }
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/SendRequest.java b/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/SendRequest.java
index ffe1fe9..6f0c913 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/SendRequest.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/SendRequest.java
@@ -31,7 +31,7 @@
*
*/
public class SendRequest {
-
+
private int nThreads;
private int id ;
private byte[] filebuf;
@@ -40,11 +40,11 @@
private String cookie_value;
private String cookie_path;
Logger logger = Logger.getLogger("bank.admin");
- ConsoleHandler ch = new ConsoleHandler();
+ ConsoleHandler ch = new ConsoleHandler();
private String TEST_SUITE_ID = "WEBCLIENT";
-
+
private static String CRLF="\r\n";
-
+
int status,OK=0;
int notOK=0;
int url_size;
@@ -57,20 +57,20 @@
private int m_port=80;
int port;
private String m_host=new String("local");
- boolean serverSet=false;
+ boolean serverSet=false;
private static int buffer_size=8192;
private String ws_root;
Reporter reporter=null;
-
-
+
+
public SendRequest(String ws_root,String testsuite_id)
{
this.ws_root=ws_root;
this.TEST_SUITE_ID=testsuite_id;
reporter = Reporter.getInstance(ws_root);
}
-
-
+
+
@@ -79,9 +79,9 @@
this.m_port=port;
serverSet=true;
}
-
-
-
+
+
+
/**This is a thread safe method so that multiple session of web application can be generated simulataneosly.
*It parses the byte array and extract individual requests.Uses MimeHeader class for parsing MIME headers.Handles session management by checking if server has set "Set-Cookie" in it's response header.
*@param host String host name of the web server where web application is to be run e.g. dsingh.sfbay.sun.com
@@ -89,160 +89,160 @@
*@return int Status Code of web server response.
*
*/
- public synchronized int processUrl(byte[] filebuf) {
- int responseCode=0;
- int nRequest=0;
- int code=0;
- reporter.setTestSuite(TEST_SUITE_ID, "J2EE Web Client","This test suite integrates web and ejb");
+ public synchronized int processUrl(byte[] filebuf) {
+ int responseCode=0;
+ int nRequest=0;
+ int code=0;
+ reporter.setTestSuite(TEST_SUITE_ID, "J2EE Web Client","This test suite integrates web and ejb");
- try {
- Socket server=null;
- InetAddress serverAddress=null;
- BufferedReader bufferedStream=null;
- DataOutputStream server_out= null;
+ try {
+ Socket server=null;
+ InetAddress serverAddress=null;
+ BufferedReader bufferedStream=null;
+ DataOutputStream server_out= null;
- int pos=0;
- int retVal=0;
- double currentstart,currentstop;
- double temp=0;
- double time=0;
- char c;
- String hostName = new String("");
+ int pos=0;
+ int retVal=0;
+ double currentstart,currentstop;
+ double temp=0;
+ double time=0;
+ char c;
+ String hostName = new String("");
- int i=0,j=0;
- MimeHeader mh;
- while(i<filebuf.length) {
- c=(char)filebuf[i];
+ int i=0,j=0;
+ MimeHeader mh;
+ while(i<filebuf.length) {
+ c=(char)filebuf[i];
- switch(c) {
- case '!':
+ switch(c) {
+ case '!':
- if(filebuf[i+1] =='\n' && filebuf[i+2]=='!') {
- nRequest=nRequest+1;
- String temp1=new String(filebuf,j,i-1-j);
- mh=new MimeHeader(temp1);
- if(setCookie) {
- //Cookie: JSESSIONID=4659B62637AC12324972EA5072064469
- //String full_cookie_value="JSESSIONID="+cookie_value+";Path="+cookie_path;
- //String full_cookie_value="JSESSIONID="+cookie_value;
- String full_cookie_value=cookie_name+"="+cookie_value;
- full_cookie_value=full_cookie_value.trim();
- String oldcookie=mh.get("Cookie");
- // System.out.println("Old Cookie value"+oldcookie);
- mh.put("Cookie",full_cookie_value);
- }
+ if(filebuf[i+1] =='\n' && filebuf[i+2]=='!') {
+ nRequest=nRequest+1;
+ String temp1=new String(filebuf,j,i-1-j);
+ mh=new MimeHeader(temp1);
+ if(setCookie) {
+ //Cookie: JSESSIONID=4659B62637AC12324972EA5072064469
+ //String full_cookie_value="JSESSIONID="+cookie_value+";Path="+cookie_path;
+ //String full_cookie_value="JSESSIONID="+cookie_value;
+ String full_cookie_value=cookie_name+"="+cookie_value;
+ full_cookie_value=full_cookie_value.trim();
+ String oldcookie=mh.get("Cookie");
+ // System.out.println("Old Cookie value"+oldcookie);
+ mh.put("Cookie",full_cookie_value);
+ }
- int stIdx = temp1.indexOf("Host: ");
- stIdx+=5;
- String tp = temp1.substring(stIdx);
+ int stIdx = temp1.indexOf("Host: ");
+ stIdx+=5;
+ String tp = temp1.substring(stIdx);
- int endIdx = tp.indexOf('\n');
- endIdx+=stIdx;
- hostName = temp1.substring(stIdx, endIdx);
+ int endIdx = tp.indexOf('\n');
+ endIdx+=stIdx;
+ hostName = temp1.substring(stIdx, endIdx);
- int portIdx=hostName.indexOf(':');
- String strport=new String();
- if(portIdx > 0){
- strport=hostName.substring(portIdx+1).trim();
- hostName=hostName.substring(0,portIdx);
- //System.out.println("port is"+strport);
+ int portIdx=hostName.indexOf(':');
+ String strport=new String();
+ if(portIdx > 0){
+ strport=hostName.substring(portIdx+1).trim();
+ hostName=hostName.substring(0,portIdx);
+ //System.out.println("port is"+strport);
}
- hostName = hostName.trim();
- port=new Integer(strport).intValue();
+ hostName = hostName.trim();
+ port=new Integer(strport).intValue();
// if serverSet is true,then use m_host and m_port from the commandline
//otherwise read host and port from the script.txt
if(serverSet){
- System.out.println("HTTP port :"+m_port);
- System.out.println("HTTP hostname :"+m_host);
- server=new Socket(m_host,m_port);
+ System.out.println("HTTP port :"+m_port);
+ System.out.println("HTTP hostname :"+m_host);
+ server=new Socket(m_host,m_port);
}
- else
+ else
server=new Socket(hostName,port);
- serverAddress=server.getInetAddress();
- bufferedStream=new BufferedReader(new InputStreamReader(server.getInputStream()));
- server_out= new DataOutputStream(server.getOutputStream());
- String req=new String();
- if(mh.ifPOSTRequest()) {
- //System.out.println("POST REQUEST");
- req=mh.getRequestHeader()+ CRLF + mh+CRLF+ mh.getPostData()+CRLF+CRLF;
- //String post="POST" + " " + server_url+ " " + "HTTP/1.0" + CRLF + inmh
- //+ CRLF + postdata+ CRLF+CRLF;
+ serverAddress=server.getInetAddress();
+ bufferedStream=new BufferedReader(new InputStreamReader(server.getInputStream()));
+ server_out= new DataOutputStream(server.getOutputStream());
+ String req=new String();
+ if(mh.ifPOSTRequest()) {
+ //System.out.println("POST REQUEST");
+ req=mh.getRequestHeader()+ CRLF + mh+CRLF+ mh.getPostData()+CRLF+CRLF;
+ //String post="POST" + " " + server_url+ " " + "HTTP/1.0" + CRLF + inmh
+ //+ CRLF + postdata+ CRLF+CRLF;
- }
- else
- req=mh.getRequestHeader()+ CRLF + mh + CRLF + CRLF;
+ }
+ else
+ req=mh.getRequestHeader()+ CRLF + mh + CRLF + CRLF;
- String requestLine=mh.getRequestHeader();
- int fsp=requestLine.indexOf(' ');
- int nsp=requestLine.indexOf(' ',fsp+1);
- int eol=requestLine.indexOf('\n');
- requestLine=requestLine.substring(fsp+1,nsp);
+ String requestLine=mh.getRequestHeader();
+ int fsp=requestLine.indexOf(' ');
+ int nsp=requestLine.indexOf(' ',fsp+1);
+ int eol=requestLine.indexOf('\n');
+ requestLine=requestLine.substring(fsp+1,nsp);
- //Following are debug output statements
- //System.out.println("%%%%%%%%%%%%%%%%%%%%%%Request String Sent to Server%%%%%%%%%%%%%%%%%%%");
- //System.out.println(mh.getRequestHeader());
- //System.out.println(mh);
+ //Following are debug output statements
+ //System.out.println("%%%%%%%%%%%%%%%%%%%%%%Request String Sent to Server%%%%%%%%%%%%%%%%%%%");
+ //System.out.println(mh.getRequestHeader());
+ //System.out.println(mh);
- try {
- if(server_out!=null)
- server_out.write(req.getBytes());
- else System.out.println("Server_out is null");
- }
- catch(IOException e) {
- String errMsg=e.getMessage();
- System.out.println(e.getMessage());
- }
+ try {
+ if(server_out!=null)
+ server_out.write(req.getBytes());
+ else System.out.println("Server_out is null");
+ }
+ catch(IOException e) {
+ String errMsg=e.getMessage();
+ System.out.println(e.getMessage());
+ }
- code = readHeader(bufferedStream);
- reporter.addTest(TEST_SUITE_ID,requestLine );
- reporter.addTestCase(TEST_SUITE_ID,requestLine, requestLine );
+ code = readHeader(bufferedStream);
+ reporter.addTest(TEST_SUITE_ID,requestLine );
+ reporter.addTestCase(TEST_SUITE_ID,requestLine, requestLine );
- if(code==500 || code==404) {
- if(code==404){
- System.out.println("WebServer returned error code 404");
- System.out.println("Request Resource not available");
- System.out.println("There is some deployment error");
- }
- System.out.println("!!Server returned error..Application Exiting");
- reporter.setTestCaseStatus(TEST_SUITE_ID,requestLine,requestLine,ReporterConstants.FAIL);
- //stat.addStatus("WEBCLIENT "+ requestLine,stat.FAIL);
- System.out.println(TEST_SUITE_ID+"\t"+requestLine+"\t FAIL");
+ if(code==500 || code==404) {
+ if(code==404){
+ System.out.println("WebServer returned error code 404");
+ System.out.println("Request Resource not available");
+ System.out.println("There is some deployment error");
+ }
+ System.out.println("!!Server returned error..Application Exiting");
+ reporter.setTestCaseStatus(TEST_SUITE_ID,requestLine,requestLine,ReporterConstants.FAIL);
+ //stat.addStatus("WEBCLIENT "+ requestLine,stat.FAIL);
+ System.out.println(TEST_SUITE_ID+"\t"+requestLine+"\t FAIL");
reporter.generateValidReport();
- return 0;
- }
- if (code==200){
- reporter.setTestCaseStatus(TEST_SUITE_ID,requestLine,requestLine,ReporterConstants.PASS);
- //stat.addStatus("WEBCLIENT"+" "+ requestLine,stat.PASS);
- System.out.println(TEST_SUITE_ID+"\t"+requestLine+"\t"+"PASS");
- }
+ return 0;
+ }
+ if (code==200){
+ reporter.setTestCaseStatus(TEST_SUITE_ID,requestLine,requestLine,ReporterConstants.PASS);
+ //stat.addStatus("WEBCLIENT"+" "+ requestLine,stat.PASS);
+ System.out.println(TEST_SUITE_ID+"\t"+requestLine+"\t"+"PASS");
+ }
- }
- i=i+3;
- j=i;
+ }
+ i=i+3;
+ j=i;
- default:
+ default:
- i=i+1;
- }
- if(time>=temp)
- temp=time;
+ i=i+1;
+ }
+ if(time>=temp)
+ temp=time;
- }
- // System.out.println("while loop ended");
- bufferedStream.close();
- server_out.close();
- reporter.generateValidReport();
- return code;
- }
- catch(Exception e) {
- e.printStackTrace();
- String msg=e.getMessage();
- }
- return code;
+ }
+ // System.out.println("while loop ended");
+ bufferedStream.close();
+ server_out.close();
+ reporter.generateValidReport();
+ return code;
+ }
+ catch(Exception e) {
+ e.printStackTrace();
+ String msg=e.getMessage();
+ }
+ return code;
}
-
+
public synchronized int readHeader(BufferedReader inStream) {
int status=0;
String reasonPhrase = new String("");
@@ -252,7 +252,7 @@
st=inStream.readLine();
/*if(st!=null)
System.out.println("*****Server Response Starts *****\n"+st );*/
-
+
//st should be of form HTTP/1.1 200 OK
int fsp=st.indexOf(' ');
int nsp=st.indexOf(' ',fsp+1);
@@ -260,7 +260,7 @@
status=Integer.parseInt(st.substring(fsp+1,nsp));
String line;
while((line=inStream.readLine())!=null) {
-
+
//Trying to parse
//Set-Cookie: JSESSIONID=E649A94960EB0304CFA985067EF90893;Path=/bookstore1
if(line.startsWith("Set-Cookie:") && !setCookie) {
@@ -268,7 +268,7 @@
// System.out.println("Setting cookie from server");
// System.out.println("COOKIES\t"+line);
}
-
+
int colon=line.indexOf(':');
int firstEquals=line.indexOf('=');
int semicolon=line.indexOf(';');
@@ -281,24 +281,24 @@
StringBuffer server_response=new StringBuffer();
server_response.append(line);
String response=server_response.toString();
-
+
//System.out.println(line);
}
-
-
+
+
}
//System.out.println("************Server Response Ends*****************");
-
+
}
catch(Exception e) {
System.err.println("-------------------- Read Header Fail---------------------------");
System.err.println("Error details:" + e.getMessage());
e.printStackTrace();
-
+
return status;
}
-
+
return status;
}
-
+
}
diff --git a/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/WebTest.java b/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/WebTest.java
index b965b8b..2264292 100644
--- a/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/WebTest.java
+++ b/appserver/tests/v2-tests/appserv-tests/util/webrunner/webtest/WebTest.java
@@ -32,16 +32,16 @@
private String testsuite_id="";
WebTest(){}
-
+
public void setTestSuiteID(String testsuiteid)
{
this.testsuite_id=testsuiteid;
- }
+ }
public void setResultFileLocation(String workspace_root)
{
this.ws_root=workspace_root;
- }
+ }
/**
*Reads script file and converts into a byte array.Sends byte array to SendRequest class.
@@ -74,7 +74,7 @@
fin.close();
SendRequest sendRequest=new SendRequest(ws_root,testsuite_id);
int port=new Integer(s_port).intValue();
- sendRequest.setServerProperties(s_host,port);
+ sendRequest.setServerProperties(s_host,port);
sendRequest.processUrl(buffer);
}
catch(Exception e)
@@ -84,11 +84,11 @@
}
}
-
-
+
+
public static void main(String [] args)
{
-
+
if(args.length<4)
{
System.err.println("usage:\t WebTest <<full_file_name>> <<web_server_host_name>> <<web_server_port>> <<outputfile>> <<testsuiteid>>");
@@ -100,12 +100,12 @@
String ws_root=args[3];
String testsuiteid=args[4];
- WebTest webTest=new WebTest();
+ WebTest webTest=new WebTest();
webTest.setResultFileLocation(ws_root);
webTest.setTestSuiteID(testsuiteid);
webTest.readFile(file,serverhost,serverport);
-
+
}
}
-
+